JSHint to ESLint && modifying code (i.e. ES2015)#64
Open
segandiaye wants to merge 1 commit intorepo-utils:masterfrom
segandiaye:jshint-to-eslint
Open
JSHint to ESLint && modifying code (i.e. ES2015)#64segandiaye wants to merge 1 commit intorepo-utils:masterfrom segandiaye:jshint-to-eslint
segandiaye wants to merge 1 commit intorepo-utils:masterfrom
segandiaye:jshint-to-eslint
Conversation
JSHint to ESLint && making code compatible to ES2015 JSHint to ESLint && modifying code (i.e ES2015)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JSHint to ESLint && modifying code (i.e ES2015), for the migration see migrating-to-eslint
Why changed the code?
I changed the code to make it compatible with the ES2015 standard, and for that you used ESLint. And I removed everything related to JSHint whose configuration is no longer compatible with the new code.
Why Switching from JSHint to ESLint?
ESlint integration and configuration
I start by installing the necessary by typing :
$ npm install -g polyjuicefor more details of polyjuice Click here.$ polyjuice --jshint .jshintrc> .eslintrcfor automatic conversion from jshint to eslint and automatic creation of.eslintrc.And then add extends:
'usecases/usecase/nodejs'in .eslintrcThen go to
package.jsonand add in the script:For the
.eslintignorefile create it manually and add the lines of the.jshintignorefile:Manual correct of errors
To fix some errors automatically I run
$ npm run eslint:fixand there will be still some errors to fix manually.To fix them or ignore them I follow ESLint rules.
If you choose to stay on JSHint you will need to add a configuration
An example of a minimal configuration :
and not forget to run
$ npm install --save-dev jshint