1.0.1 • Published 4 years ago

eslint-plugin-cognite v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

eslint-plugin-cognite

Custom eslint rules for Cognite's front-end applications.

Installation

You will need to install ESLint:

$ yarn add --dev eslint

And install eslint-config-cognite:

$ yarn add --dev @cognite/eslint-config

Next, install eslint-plugin-cognite:

$ yarn add --dev eslint-plugin-cognite

Usage

Add cognite to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "cognite"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "cognite/no-number-z-index-styled-components": "error"
    }
}

Supported Presets

Presets are enabled by adding a line to the extends list in your config file. For example, to enable the all preset, use:

{
    "extends": [
        "plugin:cognite/all"
    ]
}
  • all enables all rules from this plugin.
  • noNumZIndex enables all the rules that prevent numbers with z-indexes.
1.0.1

4 years ago