-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy patheslint.config.js
More file actions
119 lines (118 loc) · 2.78 KB
/
Copy patheslint.config.js
File metadata and controls
119 lines (118 loc) · 2.78 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
const js = require('@eslint/js');
const globals = require('globals');
const prettier = require('eslint-config-prettier');
module.exports = [
{
ignores: [
'dist/**',
'build/**',
'node_modules/**',
'src/site/vendor/**',
'*.min.js',
'.cache/**',
'*.log',
],
},
js.configs.recommended,
prettier,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.browser,
...globals.es2021,
},
},
rules: {
'no-console': 'off',
'no-debugger': 'warn',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-undef': 'error',
'no-unreachable': 'error',
'no-dupe-keys': 'error',
'no-dupe-args': 'error',
'no-extra-semi': 'warn',
'no-func-assign': 'error',
'no-obj-calls': 'error',
'no-sparse-arrays': 'warn',
'valid-typeof': 'error',
'eqeqeq': ['warn', 'smart'],
curly: ['warn', 'multi-line'],
'no-eval': 'error',
'no-implied-eval': 'error',
'no-new-func': 'error',
'no-return-assign': 'warn',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-sequences': 'warn',
'no-throw-literal': 'warn',
'no-unused-expressions': 'off',
'no-useless-call': 'warn',
'no-useless-concat': 'warn',
'no-void': 'warn',
'wrap-iife': ['warn', 'inside'],
'no-use-before-define': ['error', { functions: false, classes: true }],
'no-var': 'warn',
'prefer-const': 'warn',
semi: ['warn', 'always'],
quotes: ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
indent: 'off',
'linebreak-style': 'off',
'no-process-exit': 'off',
'no-sync': 'off',
},
},
{
files: ['src/site/scripts/**/*.js'],
languageOptions: {
globals: {
...globals.browser,
mermaid: 'readonly',
ForceGraph: 'readonly',
lucide: 'readonly',
Alpine: 'readonly',
FlexSearch: 'readonly',
},
},
rules: {
'no-console': 'off',
},
},
{
files: ['src/client/**/*.js'],
languageOptions: {
sourceType: 'module',
globals: {
...globals.browser,
...globals.es2021,
ForceGraph: 'readonly',
FlexSearch: 'readonly',
lucide: 'readonly',
},
},
rules: {
'no-console': 'off',
},
},
{
files: ['scripts/**/*.mjs', '*.config.mjs'],
languageOptions: {
sourceType: 'module',
globals: {
...globals.node,
...globals.es2021,
},
},
rules: {
'no-console': 'off',
},
},
{
files: ['*.config.js', '*.config.mjs'],
rules: {
'no-console': 'off',
},
},
];