Skip to content

Commit 2a053a2

Browse files
committed
🎨 #30
1 parent 8f114a9 commit 2a053a2

File tree

7 files changed

+1576
-1851
lines changed

7 files changed

+1576
-1851
lines changed

.eslintignore

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

.eslintrc.js

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

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## v0.4.2
44

5+
* [Upgrade ESLint to 9.33.0](https://github.com/siyuan-note/plugin-sample/issues/30)
56
* [Adjust `addTopBar` and `addStatusBar` from `onload` lifecycle to `onLayoutReady`](https://github.com/siyuan-note/siyuan/issues/15455)
67

78
## v0.4.1 2025-07-22

eslint.config.mjs

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import typescriptEslint 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+
ignores: [
19+
"dist",
20+
"node_modules",
21+
"index.js",
22+
],
23+
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), {
24+
plugins: {
25+
"@typescript-eslint": typescriptEslint,
26+
},
27+
28+
languageOptions: {
29+
globals: {
30+
...globals.node,
31+
...globals.browser,
32+
},
33+
34+
parser: tsParser,
35+
},
36+
37+
rules: {
38+
semi: [2, "always"],
39+
quotes: [2, "double", {
40+
avoidEscape: true,
41+
}],
42+
"@typescript-eslint/no-unused-vars": ["warn", {caughtErrors: "none"}],
43+
"no-async-promise-executor": "off",
44+
"no-prototype-builtins": "off",
45+
"no-useless-escape": "off",
46+
"no-irregular-whitespace": "off",
47+
"@typescript-eslint/ban-ts-comment": "off",
48+
"@typescript-eslint/no-var-requires": "off",
49+
"@typescript-eslint/explicit-function-return-type": "off",
50+
"@typescript-eslint/explicit-module-boundary-types": "off",
51+
"@typescript-eslint/no-explicit-any": "off",
52+
"@typescript-eslint/no-require-imports": "off",
53+
},
54+
}];

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@
1212
"author": "Vanessa",
1313
"license": "MIT",
1414
"devDependencies": {
15-
"@typescript-eslint/eslint-plugin": "5.29.0",
16-
"@typescript-eslint/parser": "5.29.0",
15+
"@typescript-eslint/eslint-plugin": "8.40.0",
16+
"@typescript-eslint/parser": "8.40.0",
1717
"copy-webpack-plugin": "^11.0.0",
1818
"css-loader": "^6.7.1",
1919
"esbuild-loader": "^3.0.1",
20-
"eslint": "^8.42.0",
20+
"eslint": "^9.33.0",
2121
"mini-css-extract-plugin": "2.3.0",
2222
"sass": "^1.62.1",
2323
"sass-loader": "^12.6.0",
2424
"siyuan": "1.1.2",
2525
"tslib": "2.4.0",
26-
"typescript": "4.7.4",
26+
"typescript": "4.8.4",
2727
"webpack": "^5.76.0",
2828
"webpack-cli": "^5.0.2",
29-
"zip-webpack-plugin": "^4.0.1"
29+
"zip-webpack-plugin": "^4.0.1",
30+
"globals": "^16.3.0"
3031
}
3132
}

0 commit comments

Comments
 (0)