ESLint + Prettier Setup for React Project
{ | |
"env": { | |
"browser": true, | |
"es2020": true, | |
"node": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
// "plugin:prettier/recommended", | |
"plugin:jsx-a11y/recommended", | |
"plugin:import/errors", | |
"plugin:import/warnings", | |
"airbnb", | |
"airbnb/hooks" | |
], | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true | |
}, | |
"ecmaVersion": 11, | |
"sourceType": "module" | |
}, | |
"plugins": ["react", "import", "jsx-a11y"], | |
"rules": { | |
"no-console": "warn", | |
"no-use-before-define": "error", | |
"quotes": "warn", | |
"jsx-quotes": "off", | |
"object-curly-newline": "warn", | |
"comma-dangle": "off", | |
"arrow-body-style": "off", | |
"no-unused-vars": "warn", | |
"operator-linebreak": "off", | |
"import/prefer-default-export": "warn", | |
"react/jsx-fragments": "off", | |
"react/prop-types": "off", | |
"react/no-array-index-key": "warn", | |
"react/jsx-filename-extension": [ | |
2, | |
{ | |
"extensions": [".js", ".jsx"] | |
} | |
] | |
} | |
} |
{ | |
"printWidth": 85, | |
"arrowParens": "always", | |
"semi": true, | |
"trailingComma": "es5", | |
"tabWidth": 2, | |
"singleQuote": true, | |
"jsxSingleQuote": true | |
} |
This comment has been minimized.
This comment has been minimized.
Init Command - devDependencies required are:
Command to install them all: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment