-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
33 lines (30 loc) · 887 Bytes
/
eslint.config.js
File metadata and controls
33 lines (30 loc) · 887 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
import { fileURLToPath, URL } from 'node:url';
import js from '@eslint/js';
import { includeIgnoreFile } from '@eslint/compat';
import ts from 'typescript-eslint';
import astro from 'eslint-plugin-astro';
import prettier from 'eslint-plugin-prettier/recommended';
const ignoreGit = fileURLToPath(new URL('.gitignore', import.meta.url));
const ignorePrettier = fileURLToPath(
new URL('.prettierignore', import.meta.url),
);
export default ts.config(
includeIgnoreFile(ignoreGit),
includeIgnoreFile(ignorePrettier),
js.configs.recommended,
ts.configs.recommended,
astro.configs.recommended,
prettier,
// https://github.com/withastro/prettier-plugin-astro/issues/407#issuecomment-2498306376
{
files: [
'**/*.astro/*.js',
'*.astro/*.js',
'**/*.astro/*.ts',
'*.astro/*.ts',
],
rules: {
'prettier/prettier': 'off',
},
},
);