This packages is a set of eslint rules, recommended for all React Projects.
ESLint statically analyzes your code to quickly find problems. ESLint is built into most text editors and you can run ESLint as part of your continuous integration pipeline. More Info
This Project is also bundled with Prettier in order to ensure company wide Code formatting.
yarn add eslint typescript eslint-config-react-stockulus -D
Now add the config to either your package.json
:
{
"eslintConfig": {
"extends": "eslint-config-react-stockulus"
}
}
to your .eslintrc
:
{
"extends": "eslint-config-react-stockulus"
}
or .eslintrc.js
:
module.exports = {
extends: 'eslint-config-react-stockulus'
}
Its recommended to install eslint Extension. and configure your settings like
"eslint.alwaysShowStatus": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
You properly have a Prettier Extension installed. This might cause conflicts with the eslint formatter. I'd recommend to deactivate or uninstall it.
This ESLint configuration comes with some fundamental assumptions:
- React environment
- TailwindCSS
- parser: typescript
- node.js (18 recommended)
- yarn
git clone [email protected]:stockulus/eslint-config-react.git
cd eslint-config-react
yarn
yarn test
other useful scripts
yarn run
or check package.json
Create a Tag on master with
yarn version:patch
yarn version:minor
yarn version:major