-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
52 lines (51 loc) · 1.32 KB
/
eslint.config.js
File metadata and controls
52 lines (51 loc) · 1.32 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
import js from '@eslint/js';
import astro from 'eslint-plugin-astro';
import globals from 'globals';
export default [
js.configs.recommended,
...astro.configs.recommended,
{
ignores: [
'node_modules/**',
'dist/**',
'.astro/**',
'public/**',
'apps/**',
'azure-functions/**',
'scripts/**',
'*.config.*',
'assets/**',
'data-exports/**',
'infrastructure/**',
'shared/**',
'tests/**',
'**/partnerships/guidelines.astro', // Parser issue with complex nested HTML
'**/map.astro', // Parser issue with complex TypeScript in script tags
'**/privacy.astro', // Parser issue with complex nested HTML
'workers/**', // Separate Cloudflare Worker project
],
},
{
files: ['**/*.js', '**/*.mjs', '**/*.cjs'],
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'prefer-const': 'error',
'no-var': 'error',
},
},
{
files: ['**/*.astro', '**/*.astro/*.js', '**/*.astro/*.ts'],
rules: {
'no-unused-vars': 'off', // Astro frontmatter has complex scoping
'no-empty': 'off',
'no-undef': 'off', // TypeScript and Astro handle this
},
},
];