-
Notifications
You must be signed in to change notification settings - Fork 852
Expand file tree
/
Copy patheslint.config.js
More file actions
55 lines (54 loc) · 1.44 KB
/
Copy patheslint.config.js
File metadata and controls
55 lines (54 loc) · 1.44 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
51
52
53
54
55
import js from "@eslint/js";
import eslintConfigPrettier from "eslint-config-prettier";
export default [
js.configs.recommended,
eslintConfigPrettier,
// AudioWorklet processor runs in a worklet scope with its own globals
{
files: ["src/browser/audio-worklet-processor.js"],
languageOptions: {
globals: {
AudioWorkletProcessor: "readonly",
registerProcessor: "readonly",
Float32Array: "readonly",
},
},
},
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
// Browser globals
window: "readonly",
document: "readonly",
navigator: "readonly",
console: "readonly",
AudioContext: "readonly",
AudioWorkletNode: "readonly",
Blob: "readonly",
URL: "readonly",
requestAnimationFrame: "readonly",
cancelAnimationFrame: "readonly",
setTimeout: "readonly",
clearTimeout: "readonly",
setInterval: "readonly",
clearInterval: "readonly",
localStorage: "readonly",
Image: "readonly",
XMLHttpRequest: "readonly",
Float32Array: "readonly",
Uint8ClampedArray: "readonly",
Uint32Array: "readonly",
ArrayBuffer: "readonly",
// Node globals
process: "readonly",
Buffer: "readonly",
},
},
rules: {
eqeqeq: ["error", "always"],
"no-alert": "error",
},
},
];