eslint-config-jonyamo-react
React specific ESLint and Prettier configuration.
Installation
Install ESLint and Prettier:
$ yarn add eslint prettier --dev
Install this package:
$ yarn add eslint-config-jonyamo-react --dev
Configuration
Add an extends
section to your .eslintrc
(or equivalent) and specify jonyamo-react
as an extended configuration. Rules can be adjusted by overriding them in the rules
section. E.g.:
module.exports = {
extends: ['jonyamo-react'],
rules: {
'react/jsx-curly-newline': 'off',
},
};
Create React App
For apps built with create-react-app
, in order to extend the included base config follow these instructions, which basically state:
- In
.env
set:
EXTEND_ESLINT=true
- In
package.json
:
{
"eslintConfig": {
"extends": ["react-app", "jonyamo-react"]
}
}