Skip to content

Instantly share code, notes, and snippets.

@luxplanjay
Last active October 28, 2021 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save luxplanjay/d0eece25b635f39556ee62dd0eef69e9 to your computer and use it in GitHub Desktop.
Save luxplanjay/d0eece25b635f39556ee62dd0eef69e9 to your computer and use it in GitHub Desktop.
// Install packages
// npm install --save-dev prettier eslint-config-airbnb eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y husky lint-staged
{
"extends": [
"eslint:recommended",
"react-app",
"airbnb",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
"plugin:prettier/recommended",
"prettier/react"
],
"plugins": ["react", "import", "prettier", "jsx-a11y"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"rules": {
"no-console": 1,
"linebreak-style": ["error", "unix"],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"jsx-a11y/no-onchange": 0,
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
"react/destructuring-assignment": [
2,
"always",
{ "ignoreClassFields": true }
],
"react/static-property-placement": [1, "static public field"],
"react/state-in-constructor": [1, "never"],
"react/sort-comp": [
2,
{
"order": [
"static-methods",
"static-variables",
"instance-variables",
"lifecycle",
"everything-else",
"render"
]
}
]
},
"globals": {
"window": true,
"document": true,
"localStorage": true,
"FormData": true,
"FileReader": true,
"Blob": true,
"navigator": true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment