-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy patheslint.config.mjs
More file actions
105 lines (104 loc) · 2.69 KB
/
eslint.config.mjs
File metadata and controls
105 lines (104 loc) · 2.69 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
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
export default [
{
ignores: [
'migrations/**/*',
'next-env.d.ts',
'**/contentTypes.d.ts',
'**/storybook-static/**/*',
'.next/**/*',
'**/.next/**/*',
'**/.next/types/**/*',
'**/.next/server/**/*',
'**/.next/static/**/*',
'**/.next/trace/**/*',
'**/.next/cache/**/*',
'**/.next/standalone/**/*',
'**/.next/swc/**/*',
'**/.next/webpack/**/*',
'**/.next/on-demand-entries/**/*',
'**/.next/prerender-manifest.json',
'**/.next/routes-manifest.json',
'**/.next/build-manifest.json',
'**/.next/required-server-files-manifest.json',
'**/.next/static/chunks/**/*',
'**/.next/static/css/**/*',
'**/.next/static/media/**/*',
'**/.next/static/webpack/**/*',
'node_modules/**/*',
'**/dist/**/*',
'**/build/**/*',
'**/coverage/**/*',
'**/.turbo/**/*',
'**/storybook-static/**/*',
'**/.storybook/**/*',
'**/public/**/*',
'**/backend/**/*',
'**/docker/**/*',
'**/migrations/**/*',
'**/*.min.js',
'**/*.bundle.js',
'**/vendor/**/*',
'**/chunks/**/*',
'**/webpack-runtime.js',
'**/polyfills.js',
'**/fallback/**/*',
'**/vendor-chunks/**/*',
'**/types/**/*.d.ts',
'**/generated/**/*',
'**/auto-imports.d.ts',
'**/components.d.ts',
'**/nuxt.d.ts',
'**/imports.d.ts',
'**/composables.d.ts',
'**/utils.d.ts'
],
},
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
// Basic rules
'no-unused-vars': 'warn',
'no-console': 'warn',
'prefer-const': 'error',
'no-var': 'error',
// Indentation rules
'indent': ['error', 2],
'no-mixed-spaces-and-tabs': 'error',
},
},
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'@typescript-eslint': tsPlugin,
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'error',
// TypeScript indentation rules
'@typescript-eslint/indent': ['error', 2],
'no-mixed-spaces-and-tabs': 'error',
},
},
];