-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
41 lines (40 loc) · 1.12 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
import eslintPluginAstro from 'eslint-plugin-astro';
import eslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
export default [
// add more generic rule sets here, such as:
// js.configs.recommended,
...eslintPluginAstro.configs.recommended,
{
files: ['**/*.astro'], // Specify Astro files
plugins: {
astro: eslintPluginAstro // Register the Astro plugin
},
rules: {
// Add any Astro-specific rules here
'astro/no-set-html-directive': 'error'
},
settings: {
astro: {
root: true // Add Astro settings if necessary
}
}
},
{
files: ['**/*.ts', '**/*.tsx'],
plugins: {
'@typescript-eslint': eslintPlugin
},
languageOptions: {
parser: typescriptParser
},
ignores: ['node_modules', '/build', 'astro.config.mjs'],
rules: {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': 'error',
curly: 'error'
}
}
];