forked from swup/swup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.compat.cjs
44 lines (41 loc) · 974 Bytes
/
.eslintrc.compat.cjs
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
/* eslint-env node */
// Tweak these and run "npm run lint:compat" to see the compatibliity against these browsers
const browsers = [
'defaults',
'Chrome >= 80',
'Safari >= 13.1',
'iOS >= 13.4',
'Firefox >= 74',
'Edge >= 80',
'>=1%',
'not op_mini all',
'not dead',
];
// Required to fix an issue when combining existing browserslist config with the one from this file
// where any negations ("not op_mini all") are removed
process.env.BROWSERSLIST = browsers.join(',');
module.exports = {
root: true,
/* First exclude everything, then re-include /dist */
ignorePatterns: ['/*', '!/dist'],
env: {
browser: true,
es2024: true
},
extends: [
'plugin:compat/recommended',
'plugin:ecmascript-compat/recommended'
],
plugins: ['compat'],
rules: {
'compat/compat': 'error',
'ecmascript-compat/compat': ['error', { 'overrideBrowserslist': browsers }]
},
parserOptions: {
project: true,
sourceType: 'module'
},
settings: {
browsers
}
};