Bug 1925771 - Port bug 1881696 - Add ESLint flat config support to eslint-plugin-mozilla. r=aleca

Port of https://hg.mozilla.org/mozilla-central/rev/1489623017f8

Differential Revision: https://phabricator.services.mozilla.com/D226262

--HG--
extra : amend_source : 717c966d73c21146a55fec9a0f175d493a4ed7ce
This commit is contained in:
Geoff Lankow 2024-10-21 11:10:20 +13:00
Родитель c13b250cde
Коммит de7d74bcdd
1 изменённых файлов: 24 добавлений и 1 удалений

Просмотреть файл

@ -47,7 +47,9 @@ module.exports = {
},
// Ignore eslint configurations in parent directories.
root: true,
env: {
es2024: true,
},
ignorePatterns,
// We would like the same base rules as provided by
@ -71,6 +73,27 @@ module.exports = {
},
overrides: [
{
files: ["*.*"],
// The browser environment is not available for system modules, sjs, workers
// or any of the xpcshell-test files.
excludedFiles: [
"*.sys.mjs",
"*.sjs",
"**/?(*.)worker.?(m)js",
...xpcshellTestPaths.map(filePath => `${filePath}**`),
],
env: {
browser: true,
},
},
{
files: ["*.*"],
env: {
"mozilla/privileged": true,
"mozilla/specific": true,
},
},
{
files: [".eslintrc.js"],
env: {