forked from mozilla-rally/rally-core-addon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
68 lines (65 loc) · 1.66 KB
/
.eslintrc.js
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
68
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
module.exports = {
env: {
browser: true,
es6: true,
node: true,
webextensions: true,
},
extends: [
"eslint:recommended",
"plugin:import/warnings",
"plugin:node/recommended",
],
globals: {
ChromeUtils: false,
ExtensionAPI: false,
// NOTE: These get injected via Rollup.
__API_ENDPOINT__: false,
__ION_STUDIES_LIST__: false,
__ION_WEBSITE_URL__: false,
__STORE_IMPLEMENTATION__: false,
},
overrides: [
{
files: "tests/**",
env: {
mocha: true,
},
extends: [
"plugin:mocha/recommended",
],
},
{
files: ["*.svelte"],
processor: "svelte3/svelte3",
},
],
parserOptions: {
ecmaVersion: 2021,
sourceType: "module",
},
plugins: [
"import",
"mocha",
"node",
"notice",
"svelte3",
],
root: true,
rules: {
"node/no-deprecated-api": "error",
"node/no-extraneous-require": "off",
"node/no-missing-import": "off",
"node/no-unpublished-import": "off",
"node/no-unpublished-require": "off",
"node/no-unsupported-features/es-syntax": "off",
"notice/notice":[ "error", { mustMatch: "This Source Code Form is subject to the terms of the Mozilla Public", "templateFile": "copyright.txt" } ],
"eol-last": "warn",
"no-unused-vars": [ "error", { vars: "all", args: "none", ignoreRestSiblings: false } ],
"no-var": "off", // TODO: "warn",
"prefer-const": "off", // TODO: "warn",
},
};