2.1.1 • Published 2 years ago

@cognite/eslint-plugin v2.1.1

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
2 years ago

@cognite/eslint-plugin

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 @cognite/eslint-plugin:

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

Usage

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

{
  "plugins": ["@cognite"]
}

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

{
  "rules": {
    "@cognite/no-number-z-index": "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.
  • insight enables all rules native to insight.
  • opsup enables all rules native to operations support.

Supported Rules

Here are all the individual rules you can use:

@cognite/no-number-z-index

z-index util should be used.

@cognite/no-sdk-submodule-imports

Importing from @cognite/sdk should only happen from the top-level.

@cognite/no-unissued-todos

TODO's in code require a JIRA ticket.

@cognite/hellip

Ensures that ... is rendered as a horizontal ellipsis.

@cognite/require-t-function

<Trans /> should be passed t as a prop.

@cognite/styled-macro

Make sure that styled-components/macro is correctly used.

2.1.1

2 years ago

2.1.0

2 years ago

2.0.3

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.4.0

4 years ago

1.3.8

4 years ago

1.3.7

4 years ago

1.3.6

4 years ago

1.3.5

4 years ago

1.3.4

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago