-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
79 lines (78 loc) · 1.96 KB
/
Copy patheslint.config.mjs
File metadata and controls
79 lines (78 loc) · 1.96 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
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import astro from 'eslint-plugin-astro';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
export default [
{
ignores: [
'*.cjs',
'node_modules/',
'dist/',
'dev-dist/',
'.astro/',
'build/',
'.env',
'.env.*',
'!.env.example',
'pnpm-lock.yaml',
'yarn.lock',
// generated by Astro
'src/env.d.ts',
],
},
js.configs.recommended,
...tseslint.configs.recommended,
...svelte.configs['flat/recommended'],
...astro.configs['flat/recommended'],
prettierRecommended,
{
files: ['**/*.svelte'],
languageOptions: {
globals: globals.browser,
parserOptions: {
parser: tseslint.parser,
},
},
rules: {
// Bug in eslint-plugin-svelte@3.19.0: uses removed ESLint 10 API isSpaceBetweenTokens
'svelte/no-reactive-functions': 'off',
// integerInput in Number.svelte is a deliberate reactive bridge ($: integerInput = integer,
// then mutated by controls). Fixing requires refactoring the full control flow; defer to runes migration.
'svelte/no-reactive-reassign': 'off',
},
},
{
files: ['**/*.astro'],
languageOptions: {
globals: globals.browser,
},
},
{
// prettier-plugin-astro cannot parse partytown inline scripts
files: ['src/components/app/GATag.astro'],
rules: {
'prettier/prettier': 'off',
},
},
{
// prettier-plugin-astro cannot parse IntersectionObserver callback syntax
files: ['src/components/app/Title.astro'],
rules: {
'prettier/prettier': 'off',
},
},
{
// prettier-plugin-astro cannot parse virtual module imports
files: ['src/components/app/PWA.astro'],
rules: {
'prettier/prettier': 'off',
},
},
{
languageOptions: {
ecmaVersion: 2020,
},
},
];