-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.mjs
More file actions
41 lines (40 loc) · 1.36 KB
/
Copy patheslint.config.mjs
File metadata and controls
41 lines (40 loc) · 1.36 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
import js from '@eslint/js';
import { defineConfig, globalIgnores } from 'eslint/config';
import importPlugin from 'eslint-plugin-import';
import unusedImports from 'eslint-plugin-unused-imports';
import tseslint from 'typescript-eslint';
export default defineConfig([
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{ts,js,mjs}'],
plugins: {
import: importPlugin,
'unused-imports': unusedImports,
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/order': ['error', {
alphabetize: { caseInsensitive: true, order: 'asc' },
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'type'],
'newlines-between': 'never',
}],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'prefer-const': 'error',
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': ['warn', {
args: 'after-used',
argsIgnorePattern: '^_',
vars: 'all',
varsIgnorePattern: '^_',
}],
},
},
globalIgnores(['dist/**', 'node_modules/**']),
]);