Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linter fixes #302

Merged
merged 6 commits into from
Jul 17, 2019
Merged

Linter fixes #302

merged 6 commits into from
Jul 17, 2019

Conversation

alecgibson
Copy link
Collaborator

This change addresses three things:

  1. Move us from jshint to eslint (which is the more commonly used
    linter)
  2. Fix our linting glob patterns, which currently only address files
    at the top of their respective directories (and ignore all files in
    subdirectories)
  3. Enforce stricter linting rules, based roughly on the Google
    rules

Note that the change is split into two commits:

  1. The first one adds eslint and fixes most of the issues
  2. The second one only addresses indentation issues in a couple of files, which would have made the change very noisy

@coveralls
Copy link

coveralls commented Jul 4, 2019

Coverage Status

Coverage increased (+0.006%) to 95.954% when pulling 40abc17 on eslint into 0b65164 on master.

Alec Gibson added 2 commits July 4, 2019 15:25
This change addresses three things:

  1. Move us from `jshint` to `eslint` (which is the more commonly used
     linter)
  2. Fix our linting glob patterns, which currently only address files
     at the top of their respective directories (and ignore all files in
     subdirectories)
  3. Enforce stricter linting rules, based roughly on the [Google][1]
     rules

[1]: https://github.com/google/eslint-config-google
Large indentation fixes were skipped in the previous commit in order to
keep the diff a bit less noisy. This change purely removes the eslint
ignore comments, and fixes the indentation in those files.
lib/backend.js Outdated Show resolved Hide resolved
lib/agent.js Outdated Show resolved Hide resolved
.eslintrc Outdated Show resolved Hide resolved
.eslintrc Outdated Show resolved Hide resolved
lib/agent.js Outdated Show resolved Hide resolved
Alec Gibson added 4 commits July 15, 2019 12:29
This change actively extends the Google ESLint config. We move the
config into a `.js` file so that we can add comments about particular
rules that we've overridden.

This change also fixes some trailing comma and indentation linting
errors.
This change uses our `.gitignore` file to define which files ESLint
should ignore, so that all of our committed JavaScript has a consistent
style.
This change makes some linting review markups:

  - pre-comupte long, concatenated strings
  - only allow one statement per line
Copy link
Contributor

@nateps nateps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nateps nateps merged commit 9851465 into master Jul 17, 2019
@nateps nateps deleted the eslint branch July 17, 2019 16:25
alecgibson pushed a commit to share/sharedb-mongo that referenced this pull request Jul 18, 2019
This change adds linting through `eslint`, with config read across from
[ShareDB][1]

[1]: share/sharedb#302
alecgibson pushed a commit to share/sharedb-mongo that referenced this pull request Jul 18, 2019
This change adds linting through `eslint`, with config read across from
[ShareDB][1]

[1]: share/sharedb#302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants