Skip to content

Commit 7e926b2

Browse files
committed
chore: use prettier
1 parent 7dce94c commit 7e926b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+32543
-26526
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
with:
4141
file: "build/chrome-mv3-prod.zip;build/firefox-mv3-prod.zip;build/safari-mv3-prod.zip"
4242
tags: true
43-
draft: false
43+
draft: false

.github/workflows/submit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
chrome-file: build/chrome-mv3-prod.zip
3535
edge-file: build/chrome-mv3-prod.zip
3636
firefox-file: build/firefox-mv3-prod.zip
37-
notes: "RSSHub Radar is an open source project, you can find the source code at https://github.com/DIYgod/RSSHub-Radar"
37+
notes: "RSSHub Radar is an open source project, you can find the source code at https://github.com/DIYgod/RSSHub-Radar"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
path: |
3939
build/safari-mv3-prod.zip
4040
build/chrome-mv3-prod.zip
41-
build/firefox-mv3-prod.zip
41+
build/firefox-mv3-prod.zip

.prettierrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
module.exports = {
2+
singleQuote: false,
3+
semi: false,
4+
trailingComma: "all",
5+
endOfLine: "lf",
6+
plugins: ["prettier-package-json", "@ianvs/prettier-plugin-sort-imports"],
7+
8+
importOrderParserPlugins: [
9+
"classProperties",
10+
"decorators-legacy",
11+
"typescript",
12+
"jsx",
13+
],
14+
importOrder: [
15+
"<THIRD_PARTY_MODULES>",
16+
"",
17+
"^@(.*)/(.*)$",
18+
"",
19+
"^~/(.*)$",
20+
"",
21+
"^@/(.*)$",
22+
"",
23+
"^[./]",
24+
],
25+
}

.prettierrc.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ export default {
2121
"",
2222
"^~(.*)$",
2323
"",
24-
"^[./]"
25-
]
24+
"^[./]",
25+
],
2626
}

assets/locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@
149149
"current": {
150150
"message": "Current"
151151
}
152-
}
152+
}

assets/locales/zh_CN/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@
149149
"current": {
150150
"message": "当前"
151151
}
152-
}
152+
}

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
"components": "~/lib/components",
1414
"utils": "~/lib/utils"
1515
}
16-
}
16+
}

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"safari-convert": "xcrun safari-web-extension-converter build/safari-mv3-prod --project-location build --bundle-identifier app.rsshub.RSSHub-Radar",
1414
"safari-zip": "zip -r build/safari-mv3-prod.zip \"build/RSSHub Radar\"",
1515
"build:safari:zip": "npm run build:safari && npm run safari-convert && npm run safari-zip",
16-
"package": "plasmo package"
16+
"package": "plasmo package",
17+
"prepare": "husky install"
1718
},
1819
"dependencies": {
1920
"@iconify-json/mingcute": "^1.1.15",
@@ -51,12 +52,18 @@
5152
"@types/react": "18.2.48",
5253
"@types/react-dom": "18.2.18",
5354
"autoprefixer": "^10.4.17",
55+
"husky": "9.0.9",
56+
"lint-staged": "15.2.1",
5457
"postcss": "^8.4.33",
5558
"prettier": "3.2.4",
59+
"prettier-package-json": "2.8.0",
5660
"shadcn-ui": "^0.8.0",
5761
"tailwindcss": "^3.4.1",
5862
"typescript": "5.3.3"
5963
},
64+
"lint-staged": {
65+
"**/*": "prettier --write --ignore-unknown"
66+
},
6067
"manifest": {
6168
"default_locale": "en",
6269
"host_permissions": [

0 commit comments

Comments
 (0)