forked from nextcloud/nextcloud-filelink
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (48 loc) · 1.08 KB
/
eslint.config.mjs
File metadata and controls
50 lines (48 loc) · 1.08 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
// Copyright (C) 2024 Johannes Endres
//
// SPDX-License-Identifier: MIT
import globals from "globals";
import pluginJs from "@eslint/js";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: [
"**/src/background/punycode.es6.js",
"**/src/photon-components-web/",
"**/src/punycode/",
"**/*config.*js",
]
},
{
languageOptions: {
// Currently we still support Thunderbird 68.2.1 which has an old JS engine
ecmaVersion: 9,
sourceType: "script",
globals: {
...globals.browser,
...globals.webextensions,
// Use messenger instead of browser for Thunderbird API to keep
// "web-ext lint" happy
"messenger": "readonly",
}
}
},
pluginJs.configs.recommended,
{
rules: {
"no-unused-vars": [
"error",
{
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_$"
}],
}
},
{
files: ["build-tools/**/*.{js,mjs,cjs}"],
languageOptions: {
sourceType: "module",
"ecmaVersion": 2020,
},
},
];