-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrict.js
More file actions
22 lines (19 loc) · 864 Bytes
/
strict.js
File metadata and controls
22 lines (19 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import base from './base.js';
export default defineConfig(...base, tseslint.configs.strictTypeChecked, {
rules: {
// @typescript-eslint: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin/docs/rules
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/restrict-template-expressions': [
'error',
{
...tseslint.plugin.rules['restrict-template-expressions'].meta.docs.recommended.strict[0],
allowNumber: true,
},
],
// eslint-plugin-import: https://github.com/import-js/eslint-plugin-import/tree/main/docs/rules
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
},
});