-
-
Notifications
You must be signed in to change notification settings - Fork 703
Expand file tree
/
Copy patheslint.config.mjs
More file actions
39 lines (38 loc) · 1.02 KB
/
Copy patheslint.config.mjs
File metadata and controls
39 lines (38 loc) · 1.02 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
import js from "@eslint/js";
import globals from "globals";
// Lint for the native-ESM codebase (#155 PR 2 of 10).
//
// Every first-party file is now a real ES module with explicit imports, so
// no-undef is ON: any bare identifier that isn't imported or a known browser
// global is an error. THREE stays a classic CDN global (r128), so it is
// declared here instead of imported. no-unused-vars stays off until the
// split PRs land (game.js still exports a wide surface).
export default [
{
ignores: ["node_modules/**", "assets/**", "market/**"],
},
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
THREE: "readonly",
},
},
rules: {
"no-unused-vars": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
},
},
{
files: ["tests/**/*.mjs", "eslint.config.mjs"],
languageOptions: {
sourceType: "module",
globals: {
...globals.node,
},
},
},
];