-
Notifications
You must be signed in to change notification settings - Fork 900
/
.eslintrc.js
62 lines (61 loc) · 1.2 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
const p5Globals = require("./p5Globals");
const p5SoundGlobals = require("./p5SoundGlobals");
module.exports = {
extends: ["airbnb-base", "prettier"],
globals: {
fetch: false,
document: true,
},
rules: {
"no-console": 0,
},
env: {
browser: true,
jasmine: true,
},
overrides: [
{
files: ["examples/**"],
globals: {
ml5: false,
p5: false,
...p5Globals,
...p5SoundGlobals,
},
rules: {
"no-use-before-define": [
"error",
{
functions: false,
classes: true,
variables: true,
},
],
"no-unused-vars": ["error", { varsIgnorePattern: "^setup$|^draw$|^preload$" }],
"new-cap": 0,
"no-underscore-dangle": 0,
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/**_test.js", "**/**.test.js", "setupTests.js"]
}
]
},
},
{
files: ["**/**_test.js"],
globals: {
ml5: false,
},
},
{
files: ["**/**.test.js"],
globals: {
ml5: false,
},
env: {
jest: true,
}
},
],
};