Skip to content

Commit ce4b76d

Browse files
authored
chore: always use @typescript-eslint v8 linting rules (#1778)
1 parent 81d56a7 commit ce4b76d

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

.eslintrc.js

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
11
'use strict';
22

3-
const {
4-
version: typescriptESLintPluginVersion,
5-
} = require('@typescript-eslint/eslint-plugin/package.json');
6-
const semver = require('semver');
73
const globals = require('./src/globals.json');
84

9-
const typescriptBanTypesRules = () => {
10-
if (semver.major(typescriptESLintPluginVersion) === 8) {
11-
return {
12-
'@typescript-eslint/no-empty-object-type': 'error',
13-
'@typescript-eslint/no-unsafe-function-type': 'error',
14-
'@typescript-eslint/no-wrapper-object-types': 'error',
15-
};
16-
}
17-
18-
return {
19-
'@typescript-eslint/ban-types': 'error',
20-
};
21-
};
22-
235
module.exports = {
246
ignorePatterns: ['!.eslint-doc-generatorrc.js', '!.eslintrc.js'],
257
parser: require.resolve('@typescript-eslint/parser'),
@@ -49,7 +31,9 @@ module.exports = {
4931
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
5032
'@typescript-eslint/no-require-imports': 'error',
5133
'@typescript-eslint/ban-ts-comment': 'error',
52-
...typescriptBanTypesRules(),
34+
'@typescript-eslint/no-empty-object-type': 'error',
35+
'@typescript-eslint/no-unsafe-function-type': 'error',
36+
'@typescript-eslint/no-wrapper-object-types': 'error',
5337
'@typescript-eslint/consistent-type-imports': [
5438
'error',
5539
{ disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' },

0 commit comments

Comments
 (0)