-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patheslint.config.js
28 lines (27 loc) · 1.04 KB
/
eslint.config.js
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
import eslint from '@eslint/js'
import astro from 'eslint-plugin-astro'
import a11y from 'eslint-plugin-jsx-a11y'
import sort from 'eslint-plugin-simple-import-sort'
import solid from 'eslint-plugin-solid'
import tseslint from 'typescript-eslint'
export default tseslint.config(
eslint.configs.recommended,
a11y.flatConfigs.recommended,
...tseslint.configs.recommendedTypeChecked,
...astro.configs.recommended,
{
languageOptions: { parserOptions: { project: true, tsconfigRootDir: import.meta.dirname } },
linterOptions: { reportUnusedDisableDirectives: 'off' },
plugins: { 'simple-import-sort': sort },
rules: {
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': [
'warn',
{ groups: [['^\\u0000'], ['^node:'], ['^(react|solid|vite|astro)', '^@?\\w'], ['^'], ['^\\.']] },
],
},
},
{ files: ['src/**/*.{ts,tsx}'], extends: [solid.configs['flat/recommended']] },
{ files: ['!src/**/*.{ts,tsx}'], extends: [tseslint.configs.disableTypeChecked] },
{ ignores: ['**/*.d.ts'] },
)