-
Notifications
You must be signed in to change notification settings - Fork 9
/
eslint.config.mjs
78 lines (77 loc) · 2.4 KB
/
eslint.config.mjs
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
import js from '@eslint/js';
import globals from 'globals';
export default [
{
ignores: [
'**/dropzone.js',
'interfaces/MIR100/index_old.js',
'interfaces/robot',
'**/*.min.js',
'tools/machine-gltf/resources',
'tools/motion/assets',
'tools/motion/js',
'tools/pushMe/resources',
'tools/spatialDraw/resources',
'tools/spatialAnalytics/resources',
'tools/spatialSensor/resources',
'tools/sphere/resources',
'tools/path/js/THREE.MeshLine.js',
'tools/path/thirdPartyCode',
'tools/pathPoint/resources',
'tools/path/resources',
],
},
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2018,
globals: {
...globals.node,
...globals.browser,
Atomics: 'readonly',
THREE: 'readonly',
SharedArrayBuffer: 'readonly',
// Constants from server's objectDefaultFiles/object.js and
// related files
Envelope: 'readonly',
EnvelopeContents: 'readonly',
LanguageInterface: 'readonly',
SpatialInterface: 'readonly',
ThreejsInterface: 'readonly',
spatialObject: 'readonly',
},
},
rules: {
'indent': [
'warn',
4
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'warn',
'single'
],
'semi': [
'warn',
'always'
],
'comma-spacing': [
'warn', {before: false, after: true}
],
'key-spacing': 'warn',
'keyword-spacing': 'warn',
'no-trailing-spaces': 'warn',
'brace-style': ['warn', '1tbs', {allowSingleLine: true}],
'space-before-blocks': 'warn',
'space-infix-ops': 'warn',
'no-prototype-builtins': 'off',
'no-unused-vars': ['warn', {argsIgnorePattern: '^_', varsIgnorePattern: '^_'}],
'no-redeclare': 'warn',
'no-inner-declarations': 'warn',
'no-extra-semi': 'warn',
},
}
];