-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Expand file tree
/
Copy patheslint.config.mjs
More file actions
76 lines (74 loc) · 2 KB
/
eslint.config.mjs
File metadata and controls
76 lines (74 loc) · 2 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 tseslint from 'typescript-eslint';
import reactHooks from 'eslint-plugin-react-hooks';
import nextCoreWebVitals from 'eslint-config-next/core-web-vitals';
import localRules from './eslint-local-rules/index.js';
import mdxParser from './eslint-local-rules/parser.js';
const config = [
{
ignores: [
'.next/**',
'node_modules/**',
'coverage/**',
'dist/**',
'out/**',
'**/.*/**',
'scripts/**',
'plugins/**',
'.claude/**',
'worker-bundle.dist.js',
'src/components/MDX/Sandpack/generatedHooksLint.ts',
'src/components/MDX/Sandpack/sandpack-rsc/generatedSources.ts',
'src/components/MDX/Sandpack/sandpack-rsc/sandbox-code/**',
'next-env.d.ts',
'next.config.js',
],
},
...nextCoreWebVitals,
{
files: ['**/*.{js,jsx,ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
'react-hooks': reactHooks,
'local-rules': localRules,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {varsIgnorePattern: '^_'}],
'react-hooks/exhaustive-deps': 'error',
'react/no-unknown-property': ['error', {ignore: ['meta']}],
'local-rules/lint-markdown-code-blocks': 'error',
},
},
{
files: ['src/content/**/*.md'],
languageOptions: {
parser: mdxParser,
parserOptions: {
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint.plugin,
'react-hooks': reactHooks,
'local-rules': localRules,
},
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'react-hooks/exhaustive-deps': 'off',
'react/no-unknown-property': 'off',
'local-rules/lint-markdown-code-blocks': 'error',
},
},
];
export default config;