-
Notifications
You must be signed in to change notification settings - Fork 108
Expand file tree
/
Copy patheslint.config.js
More file actions
76 lines (74 loc) · 2.3 KB
/
Copy patheslint.config.js
File metadata and controls
76 lines (74 loc) · 2.3 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
import js from '@eslint/js';
import userscripts from 'eslint-plugin-userscripts';
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default defineConfig([
{
ignores: ['node_modules/**/*', 'dist/**/*'],
},
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.greasemonkey,
...globals.jquery,
},
parserOptions: {
projectService: true,
},
},
files: ['**/*.ts'],
extends: [tseslint.configs.strictTypeChecked],
rules: {
'@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }],
'@typescript-eslint/no-non-null-assertion': 'off', // TODO: add correct guardrails and remove this in the future
},
},
{
files: ['*.user.js'],
plugins: {
userscripts: {
rules: userscripts.rules,
},
},
rules: {
...userscripts.configs.recommended.rules,
'userscripts/no-invalid-headers': ['error', { allowed: ['licence'] }],
'no-console': 'off',
},
},
{
files: ['**/*.js'],
rules: {
'no-unused-vars': 'warn',
},
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.greasemonkey,
...globals.jquery,
LOGGER: true,
MBImportStyle: true,
MBImport: true,
MBLinks: true,
MBSearchItStyle: true,
},
},
rules: {
'prefer-template': 'off', // migrated to oxlint
'no-inner-declarations': 'off', // migrated to oxlint
'no-global-assign': 'off', // migrated to oxlint
'no-redeclare': 'off', // migrated to oxlint
'no-self-assign': 'off', // migrated to oxlint
'no-undef': 'warn',
'no-useless-concat': 'off', // migrated to oxlint
'no-useless-escape': 'off', // migrated to oxlint
'no-var': 'off', // migrated to oxlint
},
},
]);