forked from CesiumGS/cesium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
106 lines (105 loc) · 2.24 KB
/
eslint.config.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import globals from "globals";
import html from "eslint-plugin-html";
import configCesium from "eslint-config-cesium";
export default [
{
ignores: [
"**/Build/",
"Documentation/**/*",
"Source/*",
"**/ThirdParty/",
"Tools/**/*",
"index.html",
"index.release.html",
"Apps/HelloWorld.html",
"Apps/Sandcastle/jsHintOptions.js",
"Apps/Sandcastle/gallery/gallery-index.js",
"packages/engine/Source/Scene/GltfPipeline/**/*",
"packages/engine/Source/Shaders/**/*",
"Specs/jasmine/*",
"**/*/SpecList.js",
],
},
{
...configCesium.configs.recommended,
languageOptions: {
sourceType: "module",
},
},
{
files: ["**/*.cjs"],
...configCesium.configs.node,
},
{
files: [".github/**/*.js", "scripts/**/*.js", "gulpfile.js", "server.js"],
...configCesium.configs.node,
languageOptions: {
...configCesium.configs.node.languageOptions,
sourceType: "module",
},
},
{
files: ["packages/**/*.js", "Apps/**/*.js", "Specs/**/*.js", "**/*.html"],
...configCesium.configs.browser,
plugins: { html },
rules: {
...configCesium.configs.browser.rules,
"no-unused-vars": [
"error",
{ vars: "all", args: "none", caughtErrors: "none" },
],
},
},
{
files: ["Apps/Sandcastle/**/*", "Apps/TimelineDemo/**/*"],
languageOptions: {
sourceType: "script",
globals: {
...globals.amd,
JSON: true,
console: true,
Sandcastle: true,
Cesium: true,
},
},
rules: {
"no-alert": ["off"],
"no-unused-vars": ["off"],
},
},
{
files: ["Apps/Sandcastle/load-cesium-es6.js"],
languageOptions: {
sourceType: "module",
},
},
{
files: ["Specs/**/*", "packages/**/Specs/**/*"],
languageOptions: {
globals: {
...globals.jasmine,
},
},
rules: {
"no-self-assign": "off",
},
},
{
files: ["Specs/e2e/**/*"],
languageOptions: {
globals: {
...globals.node,
Cesium: true,
},
},
rules: {
"no-unused-vars": "off",
},
},
{
files: [".github/**/*"],
rules: {
"n/no-missing-import": "off",
},
},
];