-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy patheslint.config.base.js
More file actions
37 lines (35 loc) · 1.16 KB
/
Copy patheslint.config.base.js
File metadata and controls
37 lines (35 loc) · 1.16 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
/**
* Shared ESLint flat-config base.
* Extend in each package's eslint.config.js:
*
* import base from '../../eslint.config.base.js';
* export default [...base, { ... package-specific rules ... }];
*/
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
/** @type {import('typescript-eslint').ConfigArray} */
const base = tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'import/no-cycle': ['error', { maxDepth: 'infinity' }],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', ['parent', 'sibling'], 'index', 'object', 'type'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
},
},
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**', '*.d.ts'],
},
);
export default base;