@cityscience/eslint-config

Central project for all our ESLint rules and plugins.

Usage no npm install needed!

<script type="module">
  import cityscienceEslintConfig from 'https://cdn.skypack.dev/@cityscience/eslint-config';
</script>

README

ESLint - CityScience Flavour

Central project for all our ESLint rules and plugins.

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 6.7.1
eslint-plugin-cypress 2.0.1
eslint-plugin-mocha 6.2.2
eslint-plugin-vue 6.0.1