README
ESLint - CityScience Flavour
Central project for all our ESLint rules and plugins.
Node v12 required
Install
yarn add @cityscience/eslint-config -D
or
npm install @cityscience/eslint-config --save-dev
Usage
An .eslintrc
file needs specifying alongside the package.json
:
{
"extends": [
"@cityscience/eslint-config"
]
}
Any extra rules and overrides can be applied as normal to this file:
{
"env": {
"browser": false
},
"extends": [
"@cityscience/eslint-config"
],
"overrides": [
{
"files": ["*.worker.js"],
"rules": {
"no-console": "off"
}
}
]
}
Alternatively, supplementary configs can be placed in sub-directories that will apply to any
descendant files. ESLint will walk up the directory structure, combining config files until it
considers it has reached the root. To stop ESLint from perusing above the level of your
package.json
in a mono-repo, consider using root: true
in the highest config you want it to
include otherwise you may come across unexpected behaviour.
Includes
Package | Version |
---|---|
ESLint | 7.23.0 |
eslint-plugin-cypress | 2.11.0 |
eslint-plugin-mocha | 8.1.0 |
eslint-plugin-vue | 7.8.0 |