ESLint configuration

ESLint requires configuration via a .eslintrc.* (for example .eslintrc.yml) configuration file as detailed in ESLint's documentation.

If you don't specify your custom configuration file we use our default below. We suggest to add your own configuration file into your repository root directory to be able to specify your coding and quality standards.

.eslintrc.yml

env:
  browser: true
  es6: true
  mocha: true
  node: true
parser: 'babel-eslint'
extends:
  - 'eslint:recommended'
parserOptions:
  ecmaVersion: 6
  sourceType: 'module'
rules:
  brace-style:
    - warn
    - 1tbs
  camelcase: warn
  comma-dangle:
    - warn
    - always-multiline
  comma-style:
    - error
    - last
  complexity: error
  curly: warn
  eol-last:
    - error
    - always
  id-length: error
  max-lines: error
  max-params:
    - error
    - 4
  no-duplicate-imports: error
  no-eq-null: error
  no-eval: error
  no-implied-eval: error
  no-invalid-this: error
  no-shadow: error
  no-undefined: error
  no-warning-comments:
    - warn
    - location: anywhere
      terms:
        - todo
        - fixme
  prefer-promise-reject-errors: error
  semi: error

Usage with React

To get started linting React applications, you can use the following ESLint configuration:

.eslintrc.yml

env:
  browser: true
  es6: true
  mocha: true
parser: 'babel-eslint'
extends:
  - 'eslint:recommended'
  - 'plugin:react/recommended'
parserOptions:
  ecmaVersion: 6
  sourceType: 'module'
  ecmaFeatures:
    classes: true
settings:
  react:
    pragma: React
    version: 16.8.0

Supported plugins

For security concerns related to executing code within a docker container, our ESLint engine currently ignores all but a select number of ESLint plugins. Please see the list below of plugins we currently support: