-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy patheslint.config.mjs
More file actions
93 lines (92 loc) · 2.31 KB
/
eslint.config.mjs
File metadata and controls
93 lines (92 loc) · 2.31 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import { defineConfig, globalIgnores } from 'eslint/config';
import cheminfo from 'eslint-config-cheminfo/base';
import unicorn from 'eslint-config-cheminfo/unicorn';
import globals from 'globals';
export default defineConfig(
globalIgnores([
'src/components',
'src/lib/*',
'src/browserified',
'src/modules/types/legacy',
'src/modules/types/science/chemistry/jsmol/lib',
'src/modules/types/science/chemistry/jsme/lib',
'src/modules/types/edition/slick_grid/slick.*',
'src/modules/types/science/chemistry/jsme/jquery.min.js',
'src/src/util/workers',
]),
cheminfo,
unicorn,
{
rules: {
'unicorn/consistent-function-scoping': 'off',
'unicorn/no-array-reverse': 'off',
'unicorn/no-array-sort': 'off',
'unicorn/no-immediate-mutation': 'off',
'unicorn/no-this-assignment': 'off',
'unicorn/prefer-code-point': 'off',
'unicorn/prefer-default-parameters': 'off',
'unicorn/prefer-dom-node-text-content': 'off',
'unicorn/prefer-number-properties': 'off',
'unicorn/prefer-structured-clone': 'off',
},
},
{
files: ['src/**/*.js'],
languageOptions: {
sourceType: 'script',
},
},
{
files: ['gruntfile.js'],
languageOptions: {
sourceType: 'script',
globals: {
...globals.node,
},
},
rules: {
'no-console': 'off',
},
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.amd,
...globals.jquery,
setImmediate: false,
DataArray: false,
DataBoolean: false,
DataNumber: false,
DataObject: false,
DataString: false,
},
},
rules: {
'import/no-dynamic-require': 'off',
'array-callback-return': 'off',
camelcase: 'off',
'default-case': 'off',
eqeqeq: 'off',
'func-names': 'off',
'new-cap': 'off',
'no-await-in-loop': 'off',
'no-empty-function': 'off',
'no-eval': 'off',
'no-invalid-this': 'off',
'no-var': 'off',
'prefer-named-capture-group': 'off',
'prefer-object-spread': 'off',
'prefer-rest-params': 'off',
'prefer-spread': 'off',
},
},
{
rules: {
'import/no-extraneous-dependencies': [
'error',
{ packageDir: import.meta.dirname },
],
},
},
);