Skip to content

Commit 181c483

Browse files
committed
Wip - probably culprit rule
1 parent 06b092a commit 181c483

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

tooling/eslint/base.js

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import * as path from 'node:path';
22
import { includeIgnoreFile } from '@eslint/compat';
33
import eslint from '@eslint/js';
4-
import prettierConfigPlugin from 'eslint-config-prettier';
54
import importPlugin from 'eslint-plugin-import';
65
import * as jsoncPlugin from 'eslint-plugin-jsonc';
76
import onlyWarn from 'eslint-plugin-only-warn';
@@ -48,20 +47,35 @@ export default tseslint.config(
4847
...tseslint.configs.recommended,
4948
...tseslint.configs.recommendedTypeChecked,
5049
...tseslint.configs.stylisticTypeChecked,
51-
prettierConfigPlugin,
5250
],
5351
rules: {
5452
'prettier/prettier': ['error', prettierConfig],
55-
'@typescript-eslint/array-type': 'off',
56-
'@typescript-eslint/consistent-type-definitions': 'off',
53+
'@typescript-eslint/no-unused-vars': [
54+
'error',
55+
{
56+
args: 'all',
57+
argsIgnorePattern: '^_',
58+
varsIgnorePattern: '^_',
59+
},
60+
],
5761
'@typescript-eslint/consistent-type-imports': [
5862
'warn',
59-
{ prefer: 'type-imports', fixStyle: 'separate-type-imports' },
63+
{ prefer: 'type-imports', fixStyle: 'inline-type-imports' },
64+
],
65+
'@typescript-eslint/no-misused-promises': [
66+
2,
67+
{ checksVoidReturn: { attributes: false } },
68+
],
69+
'@typescript-eslint/no-unnecessary-condition': [
70+
'error',
71+
{
72+
allowConstantLoopConditions: true,
73+
},
6074
],
61-
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
62-
'@typescript-eslint/require-await': 'off',
63-
'@typescript-eslint/no-misused-promises': 'warn',
64-
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
75+
'@typescript-eslint/no-non-null-assertion': 'error',
76+
// Disable this rule because it conflicts with @typescript-eslint/consistent-type-imports
77+
// when using prettier's import sorter
78+
'import/consistent-type-specifier-style': 'off',
6579
},
6680
},
6781
{

0 commit comments

Comments
 (0)