-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
62 lines (62 loc) · 2 KB
/
.eslintrc.js
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
module.exports = {
root: true,
env: {
es2022: true,
browser: true,
node: true,
},
extends: ['semistandard', 'plugin:import/recommended', 'plugin:sonarjs/recommended', 'plugin:promise/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'global-require': 'off',
'no-restricted-exports': 'off',
'no-console': 'off',
'sonarjs/no-duplicate-string': 'off',
'func-names': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'sort-imports': 'off', // turned off in favour of import/order rule
'import/no-unresolved': ['error', { ignore: ['^virtual:'] }],
'import/order': [
'error',
{
'newlines-between': 'ignore',
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
},
],
},
plugins: ['only-warn', 'import', 'sonarjs', 'promise', 'html', '@html-eslint'],
overrides: [
{
files: ['*.html'],
parser: '@html-eslint/parser',
extends: ['plugin:@html-eslint/recommended'],
rules: {
'spaced-comment': 'off',
'@html-eslint/indent': 'off',
'@html-eslint/require-meta-charset': 'error',
'@html-eslint/require-meta-viewport': 'error',
'@html-eslint/require-meta-description': 'off',
'@html-eslint/require-button-type': 'error',
'@html-eslint/element-newline': 'off',
'@html-eslint/no-target-blank': 'error',
'@html-eslint/no-duplicate-id': 'error',
'@html-eslint/no-extra-spacing-attrs': ['error', { enforceBeforeSelfClose: true }],
'@html-eslint/require-closing-tags': ['error', { selfClosing: 'always' }],
'@html-eslint/id-naming-convention': ['error', 'camelCase'],
},
},
],
settings: {
'import/resolver': {
alias: {
map: [['appConfig', './appConfig']],
extensions: ['.js', '.json'],
},
},
},
};