-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
50 lines (49 loc) · 1.37 KB
/
Copy patheslint.config.mjs
File metadata and controls
50 lines (49 loc) · 1.37 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
import eslintPluginSvelte from 'eslint-plugin-svelte';
import eslintConfigPrettier from '@electron-toolkit/eslint-config-prettier';
import tseslint from '@electron-toolkit/eslint-config-ts';
export default tseslint.config(
{ ignores: ['**/node_modules', '**/dist', '**/out', './archive'] },
tseslint.configs.recommended,
eslintPluginSvelte.configs['flat/recommended'],
{
files: ['**/*.{tsx,svelte,ts}'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
{
files: ['**/*.{tsx,svelte,ts}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
selector: 'variable',
},
{
format: ['camelCase', 'PascalCase'],
selector: 'function',
},
{
format: ['camelCase'],
selector: ['objectLiteralProperty', 'typeProperty'],
},
{
format: ['PascalCase'],
selector: ['enum', 'enumMember', 'class', 'interface', 'typeAlias'],
},
{
format: ['camelCase'],
leadingUnderscore: 'require',
modifiers: ['unused'],
selector: 'parameter',
},
],
},
},
eslintConfigPrettier,
);