forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
36 lines (34 loc) · 1.14 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
/* 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/. */
"use strict";
module.exports = {
rules: {
"no-undef-init": "error",
// This is usually only applied to jsm or jsm.js files.
// But marionette modules are JS files without a jsm extension and use
// the EXPORT_SYMBOLS syntax.
"mozilla/mark-exported-symbols-as-used": "error",
},
overrides: [
{
// The mozilla recommended configuration is not strict enough against
// regular javascript files, compared to JSM. Enforce no-unused-vars on
// "all" variables, not only "local" ones.
files: ["*"],
// test head files and html files typically define global variables
// intended to be used by other files and should not be affected by
// this override.
excludedFiles: ["**/test/**/head.js", "**/test/**/*.html"],
rules: {
"no-unused-vars": [
"error",
{
args: "none",
vars: "all",
},
],
},
},
],
};