Skip to content

Instantly share code, notes, and snippets.

@yavir-me
Created March 1, 2019 15:39
Show Gist options
  • Save yavir-me/c379759f9930284cac6f12e75ffd228c to your computer and use it in GitHub Desktop.
Save yavir-me/c379759f9930284cac6f12e75ffd228c to your computer and use it in GitHub Desktop.
Eslint configuration
{
"root": true,
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"object-curly-newline": [
"error",
"always"
]
},
"env": {
"es6": true,
"node": true
},
"extends": [
"airbnb-base",
"eslint:recommended",
"prettier"
],
"plugins": [
"babel"
],
"rules": {
"object-curly-newline": 0,
"import/newline-after-import": 0,
"import/no-dynamic-require": 0,
"import/no-extraneous-dependencies": 0,
"no-console":"warn",
"semi": ["error", "never"],
"quotes": [2, "single"],
"global-require": 0,
"comma-dangle": ["error", "always-multiline"],
"space-before-function-paren": ["error", "never"]
}
}

README


ES linter alse requires a dev dependedcies:

npm i -D eslint eslint-config-airbnb eslint-config-prettier eslint-config-standard eslint-plugin-babel eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-react; \
npm audit fix

or for yarn:

npm i -D eslint eslint-config-airbnb eslint-config-prettier eslint-config-standard eslint-plugin-babel eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-react; \
yarn audit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment