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.
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
To get started linting React applications, you can use the following ESLint configuration:
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
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: