-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy patheslint.config.js
112 lines (110 loc) · 3.05 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
107
108
109
110
111
112
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import noOnlyTests from 'eslint-plugin-no-only-tests';
import { globalIgnores } from 'eslint/config';
// import { qwikEslint9Plugin } from 'eslint-plugin-qwik';
const ignores = [
'**/.history',
'**/.vscode',
'**/dist',
'**/dist-dev',
'**/lib',
'**/node_modules',
'**/tsc-out',
'**/external',
'**/*.',
'**/*.log',
'**/etc',
'**/target',
'**/temp',
'**/tsdoc-metadata.json',
'**/.DS_Store',
'**/*.mp4',
'scripts',
'**/server/**/*.js',
'**/*.tsbuildinfo',
'packages/docs/api',
'packages/docs/public/repl/repl-sw.js*',
'packages/docs/src/routes/examples/apps',
'packages/docs/src/routes/playground/app',
'packages/docs/src/routes/tutorial',
'packages/qwik-labs/lib',
'packages/qwik-labs/lib-types',
'packages/qwik-labs/vite',
'packages/insights/drizzle.config.ts',
'packages/insights/panda.config.ts',
'starters/apps/base',
'starters/apps/library',
'starters/templates',
'**/vite.config.ts',
// packages with eslint.config.mjs
'packages/qwik-labs',
'packages/insights',
'starters',
// eslint.config.*
'**/eslint.config.mjs',
'**/eslint.config.js',
];
export default tseslint.config(
globalIgnores(ignores),
js.configs.recommended,
tseslint.configs.recommended,
// qwikEslint9Plugin.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.es2021,
},
parserOptions: {
// Needed when using the qwik plugin
// projectService: true,
// tsconfigRootDir: import.meta.dirname,
},
},
},
{
plugins: {
'no-only-tests': noOnlyTests,
},
rules: {
'no-only-tests/no-only-tests': 'error',
},
name: 'no-only-tests',
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'prefer-spread': 'off',
'no-case-declarations': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-only-tests/no-only-tests': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
curly: 'error',
'no-new-func': 'error',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
},
},
{
files: ['packages/docs/**/*.{ts,tsx}'],
rules: {
'no-console': 'off',
},
}
);