-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy patheslint.config.js
More file actions
73 lines (72 loc) · 2.05 KB
/
Copy patheslint.config.js
File metadata and controls
73 lines (72 loc) · 2.05 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const eslint = require("@eslint/js");
const prettier = require("eslint-plugin-prettier/recommended");
const globals = require("globals");
module.exports = [
{
ignores: [
"dist/",
"node_modules/",
"__mocks__/",
"config/",
"src/loaders/ColladaLoader.js",
"src/loaders/GLTFLoader.js",
"src/loaders/FBXLoader.js",
"src/lib/fflate.js",
"src/models/SkeletonUtils.js",
"src/controls/Orbit.js",
"src/controls/Transform.js",
"src/controls/TransformGizmo.js",
"src/fx/materials/Ocean.js",
"src/fx/materials/Water.old.js",
"src/fx/materials/Mirror.js",
"src/scripts/builtin/SmoothCameraFollow.js",
],
},
eslint.configs.recommended,
prettier,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
requestNextFrame: "readonly",
global: "readonly",
},
},
rules: {
"no-unused-vars": ["warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"no-console": "off",
"no-dupe-class-members": "warn",
"no-empty": ["error", { allowEmptyCatch: true }],
"prettier/prettier": ["error", { endOfLine: "auto" }],
},
},
{
files: ["**/__tests__/**/*.js", "**/*.test.js"],
languageOptions: {
globals: {
...globals.jest,
...globals.commonjs,
},
},
},
{
files: ["src/physics/worker/**/*.js"],
languageOptions: {
globals: {
Ammo: "readonly",
postMessage: "readonly",
importScripts: "readonly",
},
},
},
{
files: ["src/lib/features.js"],
languageOptions: {
globals: {
ActiveXObject: "readonly",
},
},
},
];