-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
94 lines (89 loc) · 2.09 KB
/
.eslintrc.cjs
File metadata and controls
94 lines (89 loc) · 2.09 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = {
root: true,
env: {
browser: true,
es2022: true,
node: true,
},
ignorePatterns: [
// Playwright
'srcs/e2e/test-results/',
'srcs/e2e/playwright-report/',
'srcs/e2e/blob-report/',
'srcs/e2e/playwright/.cache/',
// Typescript
'tsconfig.tsbuildinfo',
'srcs/slate-solid/lib',
'srcs/slate-yjs-solid/lib',
// Rust
'srcs/tauri',
'target',
// Vite
'dist',
// NPM
'node_modules',
// General
'*.config.*',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
impliedStrict: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'solid',
'unicorn',
'import',
'prettier',
'sort-destructure-keys',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:solid/typescript',
'plugin:prettier/recommended',
'plugin:unicorn/recommended',
],
overrides: [
{
files: ['**/*.md'],
plugins: ['markdown'],
processor: 'markdown/markdown',
},
],
rules: {
'import/consistent-type-specifier-style': ['error', 'prefer-inline'],
'import/default': 'error',
'import/extensions': ['error', 'ignorePackages'],
'import/first': 'error',
'import/no-duplicates': ['error', { 'prefer-inline': true }],
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
groups: [
'builtin',
'external',
'internal',
['parent', 'sibling', 'index'],
'object',
],
'newlines-between': 'always',
warnOnUnassignedImports: true,
},
],
'prettier/prettier': 'error',
'solid/reactivity': 'error',
'solid/self-closing-comp': 'off',
'solid/event-handlers': 'error',
'unicorn/filename-case': 'off',
'unicorn/no-console-spaces': 'off',
'unicorn/prevent-abbreviations': 'off',
'sort-destructure-keys/sort-destructure-keys': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
},
};