-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy patheslint.config.js
More file actions
63 lines (62 loc) · 1.59 KB
/
eslint.config.js
File metadata and controls
63 lines (62 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import js from '@eslint/js';
import json from 'eslint-plugin-json';
import globals from 'globals';
export default [
js.configs.recommended,
{
plugins: {
json,
},
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.node,
},
},
rules: {
camelcase: ['error', {
properties: 'never', // Ignore snake_case in JSON properties, which are often params.
allow: ['^opt_'], // Allow opt_varname arguments.
}],
'comma-dangle': ['error', 'always-multiline'],
'max-len': ['error', {
code: 120,
tabWidth: 2,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
}],
'prefer-promise-reject-errors': ['error', {
allowEmptyReject: true,
}],
'max-lines': ['warn', { max: 300, skipBlankLines: true, skipComments: true }],
quotes: ['error', 'single', { allowTemplateLiterals: true }],
complexity: ['warn', 8],
},
},
{
files: ['**/*.json'],
plugins: {
json,
},
processor: 'json/json',
rules: {
'json/*': 'error',
},
},
{
ignores: [
'dist',
'node_modules',
'**/common/emoji/index.js',
'packages/dialtone-vue/index.js',
'**/common/storybook_utils.js',
'**/components/emoji/emoji.test.js',
'**/components/emoji_text_wrapper/emoji_text_wrapper.test.js',
'**/components/icon/icon_constants.js',
'**/components/illustration/illustration_constants.js',
'packages/language-server/sample/*',
],
},
];