Skip to content

Instantly share code, notes, and snippets.

@trungpv1601
Last active December 26, 2019 07:23
Show Gist options
  • Save trungpv1601/2f0f1ac199358deebf8dbb6f4a8abbfa to your computer and use it in GitHub Desktop.
Save trungpv1601/2f0f1ac199358deebf8dbb6f4a8abbfa to your computer and use it in GitHub Desktop.
Config React + ESLINT + PRETTIER
{
"extends": [
"eslint:recommended",
"prettier",
"prettier/react",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended"
],
"rules": {
"react/prop-types": 0,
"no-console": 1
},
"plugins": ["react", "import", "jsx-a11y"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"es6": true,
"browser": true,
"node": true
},
"settings": {
"react": {
"version": "detect"
}
}
}
sudo npm install -g eslint
npm install -D prettier eslint eslint-config-prettier
npm install -D babel-eslint eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment