@goodrequest/eslint-config-javascript-react
v1.2.0
Published
GoodRequest ESLint config for JavaScript + React projects
Downloads
51
Readme
eslint-config-javascript-react
ESLint config for JavaScript + React projects
Usage
- If using npm 7+ you can install this package and npm automatically installs all peer dependencies.
npm install @goodrequest/eslint-config-javascript-react --save-dev
If you are using an older npm version, then the next step is to install all the peer dependencies listed with:
npm info "@goodrequest/eslint-config-javascript-react" peerDependencies
{
eslint: '^8.2.0',
'eslint-plugin-import': '^2.25.3',
'eslint-plugin-jsx-a11y': '^6.5.1',
'eslint-plugin-prettier': '^4.0.0',
'eslint-plugin-react': '^7.27.0',
'eslint-plugin-react-hooks': '^4.3.0',
prettier: '^2.4.1'
}
Here is npm install
command you can use:
npm install eslint@^8.2.0 eslint-plugin-import@^2.25.3 eslint-plugin-jsx-a11y@^6.5.1 eslint-plugin-prettier@^4.0.0 eslint-plugin-react@^7.27.0 eslint-plugin-react-hooks@^4.3.0 prettier@^2.4.1 --save-dev
- Create
.eslintrc.json
file in your project root directory and add following lines:
{
"extends": ["@goodrequest/eslint-config-javascript-react"]
}
- Create
.prettierrc.json
file in your project root directory and add following lines:
{
"useTabs": true,
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "none",
"printWidth": 160,
"tabWidth": 4
}
- Create
.editorconfig
file in your project root directory and add following lines:
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true