Skip to content

Conversation

ntwb
Copy link
Member

@ntwb ntwb commented Jan 28, 2018

Description

Add an npm script implementing ESLint's --fix option

How Has This Been Tested?

  • Test by removing a semi-colon from a JavaScript file
  • Run npm run lint to confirm that ESLint reports the error
  • Run npm run lint:fix to fix the error
  • Run npm run lint again to confirm that no ESLint error or warnings are reported
  • Run git status to confirm the modified file you tested above is not in a Git dirty state

Screenshots (jpeg or gifs if applicable):

Types of changes

Build tooling change only

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@ntwb ntwb added the [Type] Build Tooling Issues or PRs related to build tooling label Jan 28, 2018
@ntwb ntwb requested review from noisysocks and gziolo January 28, 2018 03:21
Copy link
Member

@noisysocks noisysocks left a comment

Choose a reason for hiding this comment

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

This works well and I think it's a really useful addition!

I think we ought to update testing-overview.md to mention that we have this command.

@ntwb
Copy link
Member Author

ntwb commented Jan 29, 2018

Good call @noisysocks, added in c524285

@ntwb ntwb merged commit 477e27e into master Jan 29, 2018
@ntwb ntwb deleted the add/eslint-fix-script branch January 29, 2018 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants