forked from browserslist/browserslist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
67 lines (64 loc) · 1.57 KB
/
eslint.config.mjs
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
import { FlatCompat } from '@eslint/eslintrc'
import loguxConfig from '@logux/eslint-config'
import es5Plugin from 'eslint-plugin-es5'
let compat = new FlatCompat({
baseDirectory: import.meta.dirname
})
let es5 = compat.extends('plugin:es5/no-es2015')
/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
{ ignores: ['coverage'] },
...loguxConfig,
...es5,
{
plugins: {
es5: es5Plugin
},
rules: {
'node-import/prefer-node-protocol': 'off',
'perfectionist/sort-objects': 'off',
'n/prefer-node-protocol': 'off',
'prefer-let/prefer-let': 'off',
'prefer-arrow-callback': 'off',
'no-unused-vars': ['error', { caughtErrors: 'none' }],
'n/global-require': 'off',
'object-shorthand': 'off',
'no-console': 'off',
'no-var': 'off'
}
},
{
files: ['cli.js'],
rules: {
'n/no-unsupported-features/es-syntax': [
'error',
{
version: '>=12.5.0',
ignores: []
}
]
}
},
{
files: ['test/**/*', 'eslint.config.mjs'],
rules: {
'n/no-unsupported-features/es-syntax': 'off',
'es5/no-shorthand-properties': 'off',
'es5/no-template-literals': 'off',
'es5/no-rest-parameters': 'off',
'es5/no-arrow-functions': 'off',
'es5/no-destructuring': 'off',
'es5/no-block-scoping': 'off',
'es5/no-es6-methods': 'off',
'es5/no-spread': 'off',
'es5/no-for-of': 'off',
'no-console': 'off'
}
},
{
files: ['eslint.config.mjs'],
rules: {
'es5/no-modules': 'off'
}
}
]