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

Creates new command to report ESLint fixable rules #12517

Closed
wants to merge 1 commit into from

Conversation

oandregal
Copy link
Contributor

@oandregal oandregal commented Mar 24, 2017

The goal of this PR is creating a new command (tentatively npm run lint-fixable) for reporting the ESLint fixable rules, so we can focus our janitorial efforts on them. See #8562 for context.

TODO

  • Extract formatter to its own npm package and allow passing --fixable to report only fixable rules or all (by default)
  • Group report by rules. Now, it is reporting each one separately.
  • Fix run script error message.

@matticbot
Copy link
Contributor

@oandregal
Copy link
Contributor Author

oandregal commented Mar 24, 2017

This is just a proof of concept. Needs more work. Commits from others welcome directly in this PR.

@@ -151,6 +151,7 @@
"test-server:watch": "nodemon -e js,jsx --exec npm run test-server",
"test-test:watch": "nodemon -e js,jsx --exec npm run test-test",
"lint": "bin/run-lint .",
"lint-fixable": "`npm bin`/eslint --ext=.js,.jsx --format=./bin/formatter.js client/ server/ test/",
Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't need npm bin. The ./node_modules/.bin directory is effectively added to PATH for any npm scripts.

@@ -0,0 +1,129 @@
const fixableRules = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any way to extract these automatically from our ESLint config?

@matticbot matticbot added the [Size] L Large sized issue label Mar 29, 2017
@alisterscott
Copy link
Contributor

Closing as this PR is stale - please reopen if necessary

@alisterscott alisterscott deleted the add/lint-fixable-rules branch October 24, 2017 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build [Size] L Large sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants