-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
53 lines (52 loc) · 1.74 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access */
import globals from 'globals'
import js from '@eslint/js'
import ts from 'typescript-eslint'
import tailwind from 'eslint-plugin-tailwindcss'
import solid from 'eslint-plugin-solid/configs/typescript.js'
import stylistic from '@stylistic/eslint-plugin'
export default [
{
languageOptions: { globals: globals.browser },
ignores: ['.github', '.husky', '.vscode', 'node_modules', 'dist'],
},
js.configs.recommended,
...ts.configs.recommendedTypeChecked,
{
...solid,
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
...tailwind.configs['flat/recommended'],
{
plugins: {
'@stylistic': stylistic,
},
rules: {
'@stylistic/brace-style': ['error', '1tbs'],
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/eol-last': ['error', 'always'],
'@stylistic/indent': ['error', 2],
'@stylistic/indent-binary-ops': ['error', 2],
'@stylistic/jsx-indent': ['error', 2, { indentLogicalExpressions: true }],
'@stylistic/jsx-indent-props': ['error', 2],
'@stylistic/jsx-quotes': ['error', 'prefer-double'],
'@stylistic/linebreak-style': ['error', 'unix'],
'@stylistic/max-len': ['error', {
code: 120,
ignoreComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true,
}],
'@stylistic/no-extra-parens': ['error', 'functions'],
'@stylistic/no-extra-semi': 'error',
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
'@stylistic/semi': ['error', 'never'],
},
},
]