Skip to content

Commit c1d7732

Browse files
committed
🐛 Fix: types && lint error
1 parent 2f8bc55 commit c1d7732

File tree

10 files changed

+583
-424
lines changed

10 files changed

+583
-424
lines changed

.eslintrc

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

eslint.config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
module.exports = (async () => {
2+
const { default: love } = await import('eslint-config-love')
3+
4+
return [
5+
{
6+
ignores: ['test.js', 'dist/**']
7+
},
8+
{
9+
...love,
10+
files: ['src/**/*.{ts,tsx,js,jsx}'],
11+
languageOptions: {
12+
...love.languageOptions,
13+
parserOptions: {
14+
...(love.languageOptions?.parserOptions ?? {}),
15+
ecmaVersion: 6,
16+
sourceType: 'module'
17+
}
18+
},
19+
rules: {
20+
...love.rules,
21+
'@typescript-eslint/strict-boolean-expressions': 'off',
22+
'@typescript-eslint/restrict-template-expressions': 'off',
23+
'@typescript-eslint/no-unnecessary-type-conversion': 'off',
24+
'@typescript-eslint/no-explicit-any': 'off',
25+
'@typescript-eslint/no-unsafe-return': 'off',
26+
'@typescript-eslint/no-unsafe-member-access': 'off',
27+
'@typescript-eslint/no-unsafe-call': 'off',
28+
'@typescript-eslint/no-unsafe-assignment': 'off',
29+
'@typescript-eslint/no-unsafe-argument': 'off',
30+
'@typescript-eslint/no-unnecessary-condition': 'off',
31+
'@typescript-eslint/no-magic-numbers': 'off',
32+
'@typescript-eslint/consistent-indexed-object-style': 'off',
33+
'@typescript-eslint/consistent-type-imports': 'off',
34+
'@typescript-eslint/require-await': 'off',
35+
'@typescript-eslint/non-nullable-type-assertion-style': 'off',
36+
'@typescript-eslint/init-declarations': 'off',
37+
'@typescript-eslint/prefer-regexp-exec': 'off',
38+
'no-prototype-builtins': 'off',
39+
'no-throw-literal': 'error',
40+
'no-unused-expressions': 'error',
41+
'no-redeclare': 'error',
42+
'no-await-in-loop': 'off',
43+
'no-param-reassign': 'off',
44+
'no-console': 'off',
45+
'prefer-destructuring': 'off',
46+
'@typescript-eslint/no-unsafe-type-assertion': 'off',
47+
'no-negated-condition': 'off',
48+
'arrow-body-style': 'off',
49+
'promise/avoid-new': 'off',
50+
'@typescript-eslint/prefer-destructuring': 'off',
51+
'@typescript-eslint/class-methods-use-this': 'off',
52+
'eslint-comments/require-description': 'off',
53+
curly: 'error',
54+
eqeqeq: 'error'
55+
}
56+
}
57+
]
58+
})()

package.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dev": "tsc -w -p .",
1414
"cz": "git-cz",
1515
"release": "bump-version",
16-
"lint": "tsc --noEmit"
16+
"lint": "eslint src && tsc --noEmit"
1717
},
1818
"keywords": [
1919
"picgo",
@@ -42,22 +42,23 @@
4242
"license": "MIT",
4343
"devDependencies": {
4444
"@commitlint/cli": "^7.6.1",
45+
"@eslint/eslintrc": "^3.3.1",
4546
"@picgo/bump-version": "^1.1.2",
46-
"@types/node": "18.7.13",
47-
"@typescript-eslint/eslint-plugin": "^5.34.0",
48-
"@typescript-eslint/parser": "^5.34.0",
47+
"@types/node": "24.10.1",
48+
"@typescript-eslint/eslint-plugin": "^8.48.0",
49+
"@typescript-eslint/parser": "^8.48.0",
4950
"commitizen": "^3.1.2",
5051
"conventional-changelog": "^3.1.25",
5152
"cz-customizable": "5.8.0",
52-
"eslint": "^8.22.0",
53-
"eslint-config-standard-with-typescript": "^22.0.0",
54-
"eslint-plugin-import": "^2.26.0",
55-
"eslint-plugin-n": "^15.2.5",
53+
"eslint": "^9.39.1",
54+
"eslint-config-love": "^134.0.0",
55+
"eslint-plugin-import": "^2.32.0",
56+
"eslint-plugin-n": "^17.23.1",
5657
"eslint-plugin-node": "^11.1.0",
57-
"eslint-plugin-promise": "^6.0.0",
58+
"eslint-plugin-promise": "^7.2.1",
5859
"husky": "^2.7.0",
5960
"picgo": "1.5.11",
60-
"typescript": "^4.7.4"
61+
"typescript": "^5.9.3"
6162
},
6263
"dependencies": {
6364
"compare-versions": "^5.0.0",

0 commit comments

Comments
 (0)