1 | module.exports = {
|
2 | root: true,
|
3 | parserOptions: {
|
4 | parser: 'babel-eslint',
|
5 | ecmaVersion: 2017,
|
6 | sourceType: 'module',
|
7 | },
|
8 | extends: [
|
9 | 'standard',
|
10 | 'eslint:recommended',
|
11 | ],
|
12 | env: {
|
13 | browser: true,
|
14 | },
|
15 | globals: {
|
16 | 'expect': true,
|
17 | 'describe': true,
|
18 | 'it': true,
|
19 | 'jest': true,
|
20 | 'process': true,
|
21 | },
|
22 | plugins: [
|
23 | 'eslint-plugin-local-rules',
|
24 | ],
|
25 | rules: {
|
26 |
|
27 | 'arrow-parens': [2, 'as-needed'],
|
28 | 'local-rules/no-render-string-reference': 2,
|
29 |
|
30 | 'max-len': [2, 140, 4, {'ignoreUrls': true, 'ignoreTemplateLiterals': true, 'ignoreStrings': true}],
|
31 | 'max-statements': [2, 24],
|
32 | 'no-console': process.env.NODE_ENV === 'production' ? 2 : 0,
|
33 |
|
34 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
|
35 | 'no-return-assign': 0,
|
36 | 'prefer-promise-reject-errors': 0,
|
37 | 'space-before-function-paren': [
|
38 | 'error',
|
39 | {
|
40 | anonymous: 'never',
|
41 | named: 'never',
|
42 | asyncArrow: 'always',
|
43 | },
|
44 | ],
|
45 | },
|
46 | };
|