Skip to content

Commit 479afca

Browse files
committed
fix: fix eslint
1 parent 1c02dd4 commit 479afca

File tree

4 files changed

+74
-2
lines changed

4 files changed

+74
-2
lines changed

eslint.config.mjs

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin';
2+
import globals from 'globals';
3+
import tsParser from '@typescript-eslint/parser';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default [
18+
...compat.extends('plugin:@typescript-eslint/recommended'),
19+
{
20+
plugins: {
21+
'@typescript-eslint': typescriptEslintEslintPlugin,
22+
},
23+
24+
languageOptions: {
25+
globals: {
26+
...globals.node,
27+
...globals.jest,
28+
},
29+
30+
parser: tsParser,
31+
ecmaVersion: 5,
32+
sourceType: 'module',
33+
34+
parserOptions: {
35+
project: 'tsconfig.json',
36+
},
37+
},
38+
39+
rules: {
40+
'@typescript-eslint/interface-name-prefix': 'off',
41+
'@typescript-eslint/explicit-function-return-type': 'off',
42+
'@typescript-eslint/explicit-module-boundary-types': 'off',
43+
'@typescript-eslint/no-explicit-any': 'off',
44+
'@typescript-eslint/no-unsafe-function-type': 'off',
45+
'@typescript-eslint/no-empty-object-type': 'off',
46+
},
47+
},
48+
];

package-lock.json

Lines changed: 23 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
"ulid": "^2.3.0"
4646
},
4747
"devDependencies": {
48+
"@eslint/eslintrc": "^3.2.0",
49+
"@eslint/js": "^9.16.0",
4850
"@nestjs/cli": "^10.4.8",
4951
"@nestjs/schematics": "^10.2.3",
5052
"@nestjs/testing": "^10.4.12",
@@ -58,6 +60,7 @@
5860
"eslint": "^9.16.0",
5961
"eslint-config-prettier": "^9.1.0",
6062
"eslint-plugin-prettier": "^5.2.1",
63+
"globals": "^15.12.0",
6164
"jest": "^29.7.0",
6265
"prettier": "^3.4.1",
6366
"source-map-support": "^0.5.21",

src/__lib__/readonly.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/ban-types */
21
export type DeepReadonly<T> = T extends (infer R)[]
32
? DeepReadonlyArray<R>
43
: T extends Function

0 commit comments

Comments
 (0)