@rwxmad/eslint-plugin
v1.0.8
Published
ESLint configuration
Downloads
3
Readme
eslint-plugin
Install
If you don't already have a
package.json
file, create one withnpm init
.Then you need to install everything needed by the config:
npm i @rwxmad/eslint-plugin
- Then, add this to your
.eslintrc
file:
- Default config
{
"extends": ["plugin:@rwxmad/eslint-plugin/default"]
}
- Typescript config
{
"extends": ["plugin:@rwxmad/eslint-plugin/typescript"]
}
- React config
{
"extends": ["plugin:@rwxmad/eslint-plugin/react"]
}
- React + typescript config
{
"extends": ["plugin:@rwxmad/eslint-plugin/react-typescript"]
}
- Vue
{
"extends": ["plugin:@rwxmad/eslint-plugin/vue"]
}
- Vue + typescript config
{
"extends": ["plugin:@rwxmad/eslint-plugin/vue-typescript"]
}
- You can add two scripts to your package.json to lint and/or fix:
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
- Now you can manually lint your code by running
npm run lint
and fix all fixable issues withnpm run lint:fix
.