chore: reuse gitignore in eslint ignores
This commit is contained in:
parent
24a5aebafd
commit
4966cbbce0
3 changed files with 27 additions and 9 deletions
|
@ -5,6 +5,14 @@ import tseslint from 'typescript-eslint'
|
|||
import astroSwGlobals from '@ayco/astro-sw/globals'
|
||||
import astroParser from 'astro-eslint-parser'
|
||||
|
||||
import { includeIgnoreFile } from '@eslint/compat'
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
const gitignorePath = path.resolve(__dirname, '.gitignore')
|
||||
|
||||
export default [
|
||||
{
|
||||
languageOptions: {
|
||||
|
@ -20,16 +28,9 @@ export default [
|
|||
...tseslint.configs.recommended,
|
||||
...eslintPluginAstro.configs['recommended'],
|
||||
...eslintPluginAstro.configs['jsx-a11y-recommended'],
|
||||
includeIgnoreFile(gitignorePath),
|
||||
{
|
||||
ignores: [
|
||||
'dist/*',
|
||||
'.output/*',
|
||||
'.astro/*',
|
||||
'site/*',
|
||||
'templates/*',
|
||||
'**/node_modules/*',
|
||||
'**/env.d.ts',
|
||||
],
|
||||
ignores: ['**/env.d.ts'],
|
||||
},
|
||||
{
|
||||
files: ['**/*.astro'],
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"@astro-reactive/validator": "^0.5.0",
|
||||
"@astrojs/sitemap": "^3.2.1",
|
||||
"@ayco/astro-sw": "^0.8.12",
|
||||
"@eslint/compat": "^1.2.4",
|
||||
"@eslint/js": "^9.17.0",
|
||||
"@typescript-eslint/parser": "^8.18.2",
|
||||
"astro": "^5.0.5",
|
||||
|
|
|
@ -20,6 +20,9 @@ importers:
|
|||
'@ayco/astro-sw':
|
||||
specifier: ^0.8.12
|
||||
version: 0.8.12
|
||||
'@eslint/compat':
|
||||
specifier: ^1.2.4
|
||||
version: 1.2.4(eslint@9.17.0)
|
||||
'@eslint/js':
|
||||
specifier: ^9.17.0
|
||||
version: 9.17.0
|
||||
|
@ -656,6 +659,15 @@ packages:
|
|||
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
|
||||
'@eslint/compat@1.2.4':
|
||||
resolution: {integrity: sha512-S8ZdQj/N69YAtuqFt7653jwcvuUj131+6qGLUyDqfDg1OIoBQ66OCuXC473YQfO2AaxITTutiRQiDwoo7ZLYyg==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^9.10.0
|
||||
peerDependenciesMeta:
|
||||
eslint:
|
||||
optional: true
|
||||
|
||||
'@eslint/config-array@0.19.1':
|
||||
resolution: {integrity: sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
@ -3914,6 +3926,10 @@ snapshots:
|
|||
|
||||
'@eslint-community/regexpp@4.12.1': {}
|
||||
|
||||
'@eslint/compat@1.2.4(eslint@9.17.0)':
|
||||
optionalDependencies:
|
||||
eslint: 9.17.0
|
||||
|
||||
'@eslint/config-array@0.19.1':
|
||||
dependencies:
|
||||
'@eslint/object-schema': 2.1.5
|
||||
|
|
Loading…
Reference in a new issue