Installation
yarn add -D @seasonedsoftware/eslint-config
You may also need to install aditions dependencies if yarn complains, such as:
yarn add -D eslint-config-airbnb-base eslint-config-universe
Setup
create a .eslintrc.js
file to the root of the app with the following content:
module.exports = {
extends: '@seasonedsoftware/eslint-config',
}
To avoid conflicts, delete your own .prettierrc
. You can still overwrite your eslint rules if you want to change the way prettier behaves by it to .eslintrc.js
like so:
rules: {
'global-require': 2,
'prettier/prettier': ['error', { jsxBracketSameLine: false }],
}
You can still overwrite the env
, globals
and parser
in your local
.eslintrc.js
. But if you keep doing so, consider opening an issue or Pull Request
at @seasonedsoftware/eslint-config
with your proposal.
ESLint and Prettier
-
This ESLint configuration should work together with prettier, thanks to eslint-plugin-prettier
-
For better development experience, use it with prettier-atom plugin.