-
-
Notifications
You must be signed in to change notification settings - Fork 177
/
eslint.config.js
95 lines (93 loc) · 2.8 KB
/
eslint.config.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import ashNazg from 'eslint-config-ash-nazg';
export default [
{
ignores: [
'.github',
'.idea',
'dist',
'docs/ts',
'coverage',
'ignore'
]
},
...ashNazg(['sauron', 'node', 'browser']),
{
settings: {
polyfills: [
'document.querySelector'
]
}
},
{
files: ['src/jsonpath-node.js', 'test-helpers/node-env.js'],
rules: {
'n/no-unsupported-features/es-syntax': ['error', {
ignores: [
'regexpNamedCaptureGroups', 'modules', 'dynamicImport'
]
}]
}
},
{
files: ['*.md/*.js', '*.md/*.html'],
rules: {
'import/unambiguous': 0,
'import/no-commonjs': 0,
'import/no-unresolved': ['error', {
ignore: ['jsonpath-plus']
}],
'sonarjs/no-internal-api-use': 0,
'no-multiple-empty-lines': ['error', {
max: 1, maxEOF: 2, maxBOF: 2
}],
'no-undef': 0,
'no-unused-vars': ['error', {
varsIgnorePattern: 'json|result'
}],
'import/no-extraneous-dependencies': 0,
'n/no-extraneous-import': ['error', {
allowModules: ['jsonpath-plus']
}],
'n/no-missing-require': ['error', {
allowModules: ['jsonpath-plus']
}],
// Unfortunately, with the new processor approach, the filename
// is now README.md so our paths must be `../`. However, even
// with that, eslint-plugin-node is not friendly to such
// imports, so we disable
'n/no-missing-import': 'off',
'n/no-unpublished-import': 'off'
}
},
{
files: ['test/**'],
languageOptions: {
globals: {
assert: 'readonly',
expect: 'readonly',
jsonpath: 'readonly'
}
},
rules: {
'@stylistic/quotes': 0,
'@stylistic/quote-props': 0,
'import/unambiguous': 0,
// Todo: Reenable
'@stylistic/max-len': 0
}
},
{
rules: {
'@stylistic/indent': ['error', 4, {outerIIFEBody: 0}],
'promise/prefer-await-to-callbacks': 0,
'require-jsdoc': 0,
// Disable for now
'new-cap': 0,
'@stylistic/dot-location': 0,
// Reenable as have time and confirming no longer needing:
// https://github.com/babel/babel/issues/8951#issuecomment-508045524 is no
'prefer-named-capture-group': 0,
'unicorn/prefer-spread': 0
}
}
];