1.0.0 • Published 6 years ago
eslint-config-wrld v1.0.0
ESlint Config WRLD
This project is a ESLint plugin that contains shared code styling rules for WRLD React projects.
Installation
Make sure you have eslint >= 6 and react >= 16 installed. They are required as a peer dependency, so you need to install them yourself.
Install the plugin:
npm install eslint-config-wrldor
yarn add eslint-config-wrldThen configure your .eslintrc.json as follows:
{
"extends": ["eslint-config-wrld"],
"rules": {
...custom rules
}
}Running lint
To run eslint execute from the root of your project:
eslint --ext .js --ext .jsx path/to/src -c .eslintrc.jsonThis can be configured as an npm script in your package.json:
{
"name": "example",
"scripts": {
"lint": "eslint --ext .js --ext .jsx path/to/src -c .eslintrc.json"
},So that then you can just run:
npm run lintor
yarn run lint1.0.0
6 years ago