-
Notifications
You must be signed in to change notification settings - Fork 1
/
eslint.config.mjs
45 lines (44 loc) · 1.21 KB
/
eslint.config.mjs
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
import js from '@eslint/js';
import * as tsParser from '@typescript-eslint/parser';
import eslintConfigPrettier from 'eslint-config-prettier';
import pluginPromise from 'eslint-plugin-promise';
import solid from 'eslint-plugin-solid/configs/typescript';
import tailwind from 'eslint-plugin-tailwindcss';
import globals from 'globals';
import ts from 'typescript-eslint';
export default [
{ files: ['**/*.{ts,tsx}'] },
{ languageOptions: { globals: globals.browser } },
js.configs.recommended,
...ts.configs.recommended,
...tailwind.configs['flat/recommended'],
pluginPromise.configs['flat/recommended'],
eslintConfigPrettier,
{
files: ['**/*.{ts,tsx}'],
...solid,
languageOptions: {
parser: tsParser,
parserOptions: {
project: 'tsconfig.json',
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-function': ['error'],
'@typescript-eslint/no-unused-vars': [
2,
{
argsIgnorePattern: '^_',
},
],
'no-console': 'error',
},
},
{
ignores: ['dist/*', 'src-tauri/target', '*.config.*[t|j]s'],
},
];