-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
30 lines (29 loc) · 1.01 KB
/
eslint.config.js
File metadata and controls
30 lines (29 loc) · 1.01 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
// @ts-check
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['dist/**', 'node_modules/**'],
},
...tseslint.configs.recommended,
{
files: ['src/**/*.ts', 'tests/**/*.ts'],
rules: {
// TypeScript handles unused vars — disable the base rule, use TS-aware version
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
// Allow explicit any in test helpers and hardware codec shims
'@typescript-eslint/no-explicit-any': 'warn',
// Allow empty catch blocks in tests
'@typescript-eslint/no-empty-function': 'off',
// Allow require() in CJS usage examples (none in src, but tests may use it)
'@typescript-eslint/no-require-imports': 'off',
},
},
{
// Test files use dynamic imports from dist/ with no type info — any is unavoidable
files: ['tests/**/*.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
);