@zenklub/eslint-config-react
v0.1.1
Published
Quite opinionated ESLint config for react projects
Downloads
6
Readme
Zenklub ESLint config react
Quite opinionated ESLint config for react projects
Installation
$ npm i -D @zenklub/eslint-config-react @zenklub/eslint-config eslint eslint-plugin-prettier eslint-plugin-react @typescript-eslint/eslint-plugin prettier
or
$ yarn add -D @zenklub/eslint-config @zenklub/eslint-config eslint eslint-plugin-prettier eslint-plugin-react @typescript-eslint/eslint-plugin prettier
Usage
In your .eslintrc.json
:
{
"extends": ["@zenklub/eslint-config-react"]
}
and in yourt .prettierrc
:
{
"singleQuote": true,
"useTabs": true
}
(Optional) Import sort
To have import working just install prettier-plugin-import-sort
and a sort style (ie. import-sort-style-module
)
$ npm i -D prettier-plugin-import-sort import-sort-style-module
$ yarn add -D prettier-plugin-import-sort import-sort-style-module
and in package.json
{
[...],
"importSort": {
".js, .jsx, .ts, .tsx": {
"style": "module"
}
}
}