Last active
May 17, 2018 12:56
-
-
Save ogiermaitre/50340b7352696dd1487544c564c3717f to your computer and use it in GitHub Desktop.
[Some eslint tips] #javascript #eslint #node #es6
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
| module.exports = { | |
| 'env': { | |
| node: true, | |
| es6: true, | |
| browser: true, | |
| }, | |
| 'extends': [ | |
| 'airbnb-base', | |
| 'eslint:recommended', | |
| ], | |
| 'parserOptions': { | |
| 'ecmaFeatures': { | |
| 'experimentalObjectRestSpread': true, | |
| }, | |
| 'sourceType': 'module' | |
| }, | |
| rules: { | |
| 'consistent-this': 'off', | |
| 'no-tabs': 'off', | |
| 'indent': ['error', 'tab'], | |
| 'arrow-parens': ['error', 'as-needed'], | |
| 'no-unused-vars': [ | |
| 'error', | |
| { | |
| 'vars': 'all', | |
| 'args': 'after-used', | |
| 'ignoreRestSiblings': true | |
| } | |
| ], | |
| 'comma-dangle': [ | |
| 'error', | |
| { | |
| 'arrays': 'always-multiline', | |
| 'objects': 'always-multiline', | |
| 'imports': 'always-multiline', | |
| 'exports': 'always-multiline', | |
| 'functions': 'ignore' | |
| } | |
| ], | |
| 'no-underscore-dangle': 'off', | |
| 'max-len': [ | |
| 'off', | |
| 120 | |
| ], | |
| 'no-magic-numbers': 'off', | |
| 'no-extra-parens': 'error', | |
| eqeqeq: ['error', 'always'], | |
| 'no-var': 'error', | |
| 'quotes': [ | |
| 'error', | |
| 'single' | |
| ], | |
| 'semi': ['error','never'], | |
| 'no-console': 0, | |
| "strict": [1, 'global'], | |
| 'import/prefer-default-export':'off', | |
| } | |
| }; |
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
| /* eslint no-global-assign: 0 */ |
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
| { | |
| "devDependencies": { | |
| "eslint": "^4.19.1", | |
| "eslint-config-airbnb-base": "^12.1.0", | |
| "eslint-plugin-import": "^2.11.0" | |
| }, | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment