-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mts
More file actions
89 lines (84 loc) · 2.12 KB
/
Copy patheslint.config.mts
File metadata and controls
89 lines (84 loc) · 2.12 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
import js from '@eslint/js';
import markdown from '@eslint/markdown';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default defineConfig([
{
ignores: [
'**/node_modules/**',
'**/dist/**',
'**/coverage/**',
'**/build/**',
'eslint.config.mts',
'**/datastar-pro/**',
'**/datastar.js',
'**/assets/web-components/**',
],
},
eslintConfigPrettier,
eslintPluginPrettierRecommended,
{
files: ['**/*.{js,mjs,cjs}'],
plugins: { js },
extends: [js.configs.recommended],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
ecmaVersion: 2022,
sourceType: 'module',
},
},
{
files: ['**/*.{ts,mts,cts,tsx}'],
plugins: { js, tseslint },
extends: [
js.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
parser: tseslint.parser,
parserOptions: {
project: ['tsconfig.root.json', './packages/*/tsconfig.json', './apps/*/tsconfig.json'],
projectService: true,
tsconfigRootDir: import.meta.dirname,
allowDefaultProject: true,
},
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: ['tsconfig.root.json', './packages/*/tsconfig.json', './apps/*/tsconfig.json'],
},
},
},
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
},
},
{
files: ['**/*.md'],
plugins: {
markdown,
},
extends: ['markdown/recommended'],
rules: {
'markdown/no-inline-html': 'off',
'markdown/no-multiple-h1': 'off',
},
},
{
rules: {},
},
]);