@syteai/eslint-config v2.0.6
@syteai/eslint-config
ESLint ruleset for projects utilizing React and Jest with husky pre-commit hook.
Installation
Install dependencies and conventions by running:
npm i @syteai/eslint-config --save-dev
Setup
Make sure you have .eslintrc
file. If you don't, create it by running touch .eslintrc
in your project route folder. Then open this file and add the folowing:
{
"extends": "@syteai",
"rules": {
// your overrides
}
}
You can override any rule from this package in your local .eslintrc
file.
To make linting easy you can add linting scripts to your package.json
file:
"scripts": {
"lint": "eslint --ignore-pattern node_modules/ .",
"lint:fix": "npm run lint -- --fix"
}
To ensure that you do not commit files with errors, add pre-commit hook to your project by adding new property to your package.json
:
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
}
Happy linting!
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago