-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
50 lines (49 loc) · 1.18 KB
/
eslint.config.js
File metadata and controls
50 lines (49 loc) · 1.18 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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import astro from 'eslint-plugin-astro';
import globals from 'globals';
export default [
{
ignores: [
'dist/**',
'node_modules/**',
'.astro/**',
'.husky/**',
'public/**',
'docs/**',
'src/content/posts/**',
'**/*.mdx',
'*.config.mjs',
],
},
js.configs.recommended,
...tseslint.configs.recommended,
...astro.configs.recommended,
{
files: ['**/*.{js,mjs,jsx,ts,tsx,astro}'],
languageOptions: {
ecmaVersion: 2024,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'no-empty': ['error', { allowEmptyCatch: true }],
'no-console': ['warn', { allow: ['warn', 'error', 'info'] }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
],
'@typescript-eslint/no-empty-object-type': 'off',
},
},
{
files: ['src/content/posts/**/*.mdx'],
rules: {
'no-undef': 'off',
},
},
];