Skip to content

Commit e56943e

Browse files
committed
chore(deps): update remaining eslint packages
1 parent deb156d commit e56943e

File tree

4 files changed

+343
-168
lines changed

4 files changed

+343
-168
lines changed

.eslintrc.json

Lines changed: 0 additions & 40 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// @ts-check
2+
3+
import jsEslint from "@eslint/js";
4+
import eslintConfigPrettier from "eslint-config-prettier";
5+
import eslintPluginImportX from "eslint-plugin-import-x";
6+
import * as tsEslint from "typescript-eslint";
7+
8+
export default tsEslint.config(
9+
jsEslint.configs.recommended,
10+
eslintPluginImportX.flatConfigs.recommended,
11+
eslintPluginImportX.flatConfigs.typescript,
12+
...tsEslint.configs.strictTypeChecked,
13+
...tsEslint.configs.stylisticTypeChecked,
14+
{
15+
languageOptions: {
16+
parserOptions: {
17+
projectService: {
18+
allowDefaultProject: ["*.js", "*.mjs"],
19+
},
20+
tsconfigRootDir: import.meta.dirname,
21+
},
22+
},
23+
},
24+
{
25+
ignores: [
26+
"**/coverage",
27+
"**/dist",
28+
"**/esbuild.config.mjs",
29+
"**/lib/__fixtures__/**/*.ts",
30+
"**/jest.config.mjs",
31+
"**/smoke-tests",
32+
],
33+
},
34+
{
35+
rules: {
36+
"@typescript-eslint/await-thenable": "warn",
37+
"@typescript-eslint/explicit-function-return-type": "warn",
38+
"@typescript-eslint/no-floating-promises": [
39+
"warn",
40+
{ ignoreIIFE: true, ignoreVoid: false },
41+
],
42+
"@typescript-eslint/no-unused-vars": [
43+
"warn",
44+
{ argsIgnorePattern: "^_" },
45+
],
46+
"@typescript-eslint/restrict-template-expressions": [
47+
"error",
48+
{
49+
allowNever: true,
50+
allowNumber: true,
51+
},
52+
],
53+
"import-x/no-named-as-default-member": "off",
54+
"import-x/no-unresolved": "off",
55+
"import-x/order": [
56+
"warn",
57+
{ "newlines-between": "always", alphabetize: { order: "asc" } },
58+
],
59+
"no-console": ["warn"],
60+
},
61+
},
62+
{
63+
files: ["**/*.spec.ts"],
64+
rules: {
65+
"@typescript-eslint/explicit-function-return-type": "off",
66+
"@typescript-eslint/no-non-null-assertion": "off",
67+
"@typescript-eslint/no-unsafe-argument": "off",
68+
"@typescript-eslint/no-unsafe-assignment": "off",
69+
"@typescript-eslint/no-unsafe-member-access": "off",
70+
},
71+
},
72+
{
73+
files: ["**/*.js", "**/*.mjs"],
74+
...tsEslint.configs.disableTypeChecked,
75+
},
76+
eslintConfigPrettier,
77+
);

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"check:types": "tsc -p tsconfig.json",
3838
"format": "pnpm format:check --write",
3939
"format:check": "prettier --check \"{**/*,*}.{js,cjs,mjs,ts}\"",
40-
"lint": "eslint --ext \".js,.cjs,.mjs,.ts\" .",
40+
"lint": "eslint",
4141
"lint:fix": "pnpm lint --fix",
4242
"release": "release-it",
4343
"test": "jest",
@@ -63,14 +63,14 @@
6363
"cosmiconfig": "^9.0.0",
6464
"esbuild": "^0.24.0",
6565
"eslint": "^9.13.0",
66-
"eslint-config-airbnb-typescript": "^18.0.0",
6766
"eslint-config-prettier": "^9.1.0",
68-
"eslint-plugin-import": "^2.30.0",
69-
"eslint-plugin-prettier": "^5.2.1",
67+
"eslint-import-resolver-typescript": "^3.6.3",
68+
"eslint-plugin-import-x": "^4.3.1",
7069
"jest": "^29.7.0",
7170
"prettier": "^3.3.3",
7271
"release-it": "^17.6.0",
73-
"typescript": "^5.6.2"
72+
"typescript": "^5.6.2",
73+
"typescript-eslint": "^8.10.0"
7474
},
7575
"keywords": [
7676
"cosmiconfig",

0 commit comments

Comments
 (0)