Skip to content

Instantly share code, notes, and snippets.

@indigokidsgames
Created October 18, 2018 17:57
Show Gist options
  • Save indigokidsgames/2522562649d046c34e09c2d2d7787a80 to your computer and use it in GitHub Desktop.
Save indigokidsgames/2522562649d046c34e09c2d2d7787a80 to your computer and use it in GitHub Desktop.
Eslint config for node.js with ES2018 License: https://creativecommons.org/publicdomain/zero/1.0/
{
"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": []
}
}
{
"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