This repository was archived by the owner on Jun 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
83 lines (81 loc) · 2.2 KB
/
Copy patheslint.config.cjs
File metadata and controls
83 lines (81 loc) · 2.2 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
const js = require('@eslint/js');
const globals = require('globals');
const tsParser = require('@typescript-eslint/parser');
const tsPlugin = require('@typescript-eslint/eslint-plugin');
const simpleImportSort = require('eslint-plugin-simple-import-sort');
const unusedImports = require('eslint-plugin-unused-imports');
const sharedRules = {
indent: ['error', 2],
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'quote-props': ['error', 'as-needed'],
semi: ['error', 'always'],
'simple-import-sort/imports': 1,
'simple-import-sort/exports': 1,
'unused-imports/no-unused-imports': 1,
'prefer-const': 0,
'no-case-declarations': 0,
'no-console': 0,
};
module.exports = [
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/.tanstack/**',
'**/.output/**',
'**/routeTree.gen.ts',
],
},
{
...js.configs.recommended,
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
plugins: {
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,
},
rules: sharedRules,
},
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
globals: {
...globals.browser,
...globals.node,
...globals.jest,
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,
},
rules: {
...tsPlugin.configs.recommended.rules,
...sharedRules,
'@typescript-eslint/no-unused-vars': [
1,
{ argsIgnorePattern: 'React|res|next|^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-unsafe-declaration-merging': 0,
'@typescript-eslint/no-empty-object-type': 0,
'no-implicit-globals': 0,
},
},
];