-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
48 lines (44 loc) · 943 Bytes
/
Copy patheslint.config.js
File metadata and controls
48 lines (44 loc) · 943 Bytes
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
// @ts-check
import eslint from '@eslint/js'
import eslintPluginAstro from 'eslint-plugin-astro'
import tseslint from 'typescript-eslint'
export default [
{
ignores: [
'**/dist',
'**/node_modules',
'**/.astro',
'**/.github',
'**/.changeset',
'**/.wrangler',
],
},
// Global config
// JavaScript
eslint.configs.recommended,
// TypeScript
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
},
},
// Allow triple-slash references in `*.d.ts` files.
{
files: ['**/*.d.ts'],
rules: {
'@typescript-eslint/triple-slash-reference': 'off',
},
},
// Astro
...eslintPluginAstro.configs.recommended,
// Enable TypeScript in Astro frontmatter scripts
{
files: ['**/*.astro'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
]