Skip to content

Commit b45eaf8

Browse files
feat(ESLint): Use flatConfig (#574)
* chore: Improve lists * chore(ESLint): Use flatConfig
1 parent 54a4920 commit b45eaf8

26 files changed

+408
-619
lines changed

Diff for: .eslintignore

-1
This file was deleted.

Diff for: .eslintrc.js

-14
This file was deleted.

Diff for: eslint.config.mjs

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import tsPlugin from "@typescript-eslint/eslint-plugin";
2+
import tsParser from "@typescript-eslint/parser";
3+
import importPlugin from "eslint-plugin-import";
4+
5+
export default [
6+
{
7+
languageOptions: {
8+
ecmaVersion: 2022,
9+
sourceType: "module",
10+
parser: tsParser,
11+
parserOptions: {
12+
project: "./tsconfig.json"
13+
}
14+
},
15+
plugins: {
16+
"@typescript-eslint": tsPlugin,
17+
"import": importPlugin
18+
},
19+
files: ["**/*.{js,ts}"],
20+
ignores: ["dist/**", "**/*.js"],
21+
rules: {
22+
...tsPlugin.configs["recommended"].rules,
23+
"import/order": [
24+
"error",
25+
{
26+
"groups": [
27+
"builtin",
28+
"external",
29+
"internal",
30+
"parent",
31+
"sibling",
32+
"index"
33+
],
34+
"newlines-between": "always",
35+
"alphabetize": {
36+
"order": "asc",
37+
"caseInsensitive": true
38+
}
39+
}
40+
]
41+
},
42+
settings: {
43+
"import/resolver": {
44+
"typescript": {
45+
"alwaysTryTypes": true
46+
}
47+
}
48+
}
49+
}
50+
];

Diff for: ismaybenotvegan.json

-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,6 @@
402402
"lactoflavin",
403403
"laktoflavin",
404404
"lard",
405-
"lecithin",
406405
"leim",
407406
"leucin",
408407
"leucine",

Diff for: isvegan.json

+1
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,7 @@
28372837
"larcharabinogalactan",
28382838
"lavender",
28392839
"laver",
2840+
"lecithin",
28402841
"leek",
28412842
"leeks",
28422843
"lehua honey",

Diff for: package.json

+5-9
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"start:prod": "node dist/main",
1212
"build": "nest build",
1313
"lint": "eslint .",
14+
"lint:fix": "eslint . --fix",
1415
"get:peta": "node .github/scripts/peta-cron.js",
1516
"test": "jest",
1617
"test:cov": "jest --coverage",
@@ -29,10 +30,7 @@
2930
"@nestjs/platform-express": "^10.4.6",
3031
"@nestjs/swagger": "^7.4.2",
3132
"@nestjs/terminus": "^10.2.3",
32-
"@types/axios": "^0.14.4",
3333
"@types/body-parser": "^1.19.5",
34-
"@types/dotenv": "^8.2.3",
35-
"@types/iconv-lite": "^0.0.1",
3634
"@types/ini": "^4.1.1",
3735
"axios": "^1.7.7",
3836
"body-parser": "^1.20.3",
@@ -51,9 +49,7 @@
5149
"nestjs-pino": "^4.1.0",
5250
"pino": "^9.5.0",
5351
"pino-http": "^10.3.0",
54-
"querystring": "^0.2.1",
5552
"reflect-metadata": "^0.2.2",
56-
"request": "^2.88.2",
5753
"rxjs": "^7.8.1"
5854
},
5955
"devDependencies": {
@@ -66,10 +62,10 @@
6662
"@types/jsdom": "^21.1.7",
6763
"@types/lodash": "^4.17.12",
6864
"@types/pump": "^1.1.3",
69-
"@types/request": "^2.48.12",
70-
"@typescript-eslint/eslint-plugin": "^7.18.0",
71-
"@typescript-eslint/parser": "^7.18.0",
72-
"eslint": "^8.57.1",
65+
"@typescript-eslint/eslint-plugin": "^8.11.0",
66+
"@typescript-eslint/parser": "^8.11.0",
67+
"eslint": "^9.13.0",
68+
"eslint-import-resolver-typescript": "^3.6.3",
7369
"eslint-plugin-import": "^2.31.0",
7470
"eslint-plugin-n": "^17.11.1",
7571
"eslint-plugin-promise": "^7.1.0",

0 commit comments

Comments
 (0)