-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy patheslint.config.js
More file actions
71 lines (69 loc) · 1.63 KB
/
eslint.config.js
File metadata and controls
71 lines (69 loc) · 1.63 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
64
65
66
67
68
69
70
71
import ashNazg from 'eslint-config-ash-nazg';
export default [
{
ignores: [
'dist',
'docs/jsdoc'
]
},
...ashNazg(['sauron', 'polyglot']).map((cfg) => {
return {
...cfg,
languageOptions: {
...cfg.languageOptions,
ecmaVersion: 2023,
parserOptions: {
...cfg.languageOptions?.parserOptions,
sourceType: 'module'
}
}
};
}),
{
files: ['**/*.md/*.js'],
languageOptions: {
parserOptions: {
sourceType: 'module',
ecmaVersion: 2023
},
globals: {
require: true,
StackBlur: true,
width: true,
height: true,
topX: true,
topY: true,
radius: true,
imageData: true,
sourceImage: true,
targetCanvas: true,
blurAlphaChannel: true
}
},
rules: {
'import/unambiguous': 0,
'import/no-commonjs': 0,
'n/no-missing-import': 0,
'import/no-unresolved': ['error', {
ignore: ['stackblur-canvas']
}],
'n/no-missing-require': ['error', {
allowModules: ['stackblur-canvas']
}],
'no-shadow': 0,
'no-unused-vars': ['error', {varsIgnorePattern: 'StackBlur'}],
'sonarjs/no-internal-api-use': 0
}
},
{
rules: {
'jsdoc/require-returns': ['error', {exemptedBy: ['see']}],
// Handled by Babel
'n/no-unsupported-features/es-syntax': 0,
// Would be good, but as not supported in older Node and browsers,
// would need polyfill for `Number.isNaN`
'unicorn/prefer-number-properties': 0,
'unicorn/prefer-math-trunc': 0
}
}
];