| 1 |
/* eslint-env node */ |
| 2 |
|
| 3 |
// Tweak these and run "npm run lint:compat" to see the compatibliity against these browsers |
| 4 |
const browsers = [ |
| 5 |
'defaults', |
| 6 |
'Chrome >= 80', |
| 7 |
'Safari >= 13.1', |
| 8 |
'iOS >= 13.4', |
| 9 |
'Firefox >= 74', |
| 10 |
'Edge >= 80', |
| 11 |
'>=1%', |
| 12 |
'not op_mini all', |
| 13 |
'not dead', |
| 14 |
]; |
| 15 |
|
| 16 |
// Required to fix an issue when combining existing browserslist config with the one from this file |
| 17 |
// where any negations ("not op_mini all") are removed |
| 18 |
process.env.BROWSERSLIST = browsers.join(','); |
| 19 |
|
| 20 |
module.exports = { |
| 21 |
root: true, |
| 22 |
/* First exclude everything, then re-include /dist */ |
| 23 |
ignorePatterns: ['/*', '!/dist'], |
| 24 |
env: { |
| 25 |
browser: true, |
| 26 |
es2024: true |
| 27 |
}, |
| 28 |
extends: [ |
| 29 |
'plugin:compat/recommended', |
| 30 |
'plugin:ecmascript-compat/recommended' |
| 31 |
], |
| 32 |
plugins: ['compat'], |
| 33 |
rules: { |
| 34 |
'compat/compat': 'error', |
| 35 |
'ecmascript-compat/compat': ['error', { 'overrideBrowserslist': browsers }] |
| 36 |
}, |
| 37 |
parserOptions: { |
| 38 |
project: true, |
| 39 |
sourceType: 'module' |
| 40 |
}, |
| 41 |
settings: { |
| 42 |
browsers |
| 43 |
} |
| 44 |
}; |