Created
October 18, 2018 17:59
-
-
Save yura415/8b733e0db0f1f22ae6b8b90e3ccb6a5f to your computer and use it in GitHub Desktop.
Eslint config for node.js with ES2018 License: https://creativecommons.org/publicdomain/zero/1.0/
This file contains 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
Show hidden characters
{ | |
"env": { | |
"es6": true, | |
"node": true, | |
"mocha": true | |
}, | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, | |
"plugins": ["node", "babel", "import"], | |
"extends": [ | |
"eslint:recommended", | |
"plugin:node/recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings" | |
], | |
"rules": { | |
"no-shadow": [ | |
"error", | |
{ "builtinGlobals": false, "hoist": "functions", "allow": [] } | |
], | |
"node/no-unsupported-features/es-syntax": [ | |
"off" | |
], | |
"indent": [ | |
"error", | |
"tab", | |
{ | |
"SwitchCase": 1 | |
} | |
], | |
"linebreak-style": ["error", "unix"], | |
"quotes": ["error", "single", "avoid-escape"], | |
"semi": ["error", "never"], | |
"comma-dangle": [ | |
"error", | |
{ | |
"arrays": "always-multiline", | |
"objects": "always-multiline", | |
"functions": "always-multiline" | |
} | |
], | |
"space-before-function-paren": [ | |
"error", | |
{ | |
"anonymous": "never", | |
"named": "never", | |
"asyncArrow": "always" | |
} | |
], | |
"array-bracket-spacing": ["error", "never"], | |
"object-curly-spacing": ["error", "always"] | |
}, | |
"settings": { | |
"import/resolver": { | |
"babel-module": {} | |
}, | |
"import/ignore": [] | |
} | |
} |
This file contains 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": "^5.2.0", | |
"eslint-import-resolver-babel-module": "^5.0.0-beta.0", | |
"eslint-plugin-babel": "^5.1.0", | |
"eslint-plugin-import": "^2.13.0", | |
"eslint-plugin-node": "^7.0.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment