diff --git a/.vscode/settings.json b/.vscode/settings.json index eaa889c..a5f8536 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,7 @@ { "cSpell.words": [ "alipay", + "autocorrect", "frontmatter", "Frontmatters", "giscus", diff --git a/package-lock.json b/package-lock.json index 2e16853..03bbd03 100644 --- a/package-lock.json +++ b/package-lock.json @@ -86,6 +86,7 @@ "@types/remark-prism": "^1.3.7", "@types/tar": "^6.1.11", "archiver": "^7.0.1", + "autocorrect-node": "^2.11.1", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", "feed": "^4.2.2", @@ -3086,6 +3087,105 @@ "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, + "node_modules/autocorrect-node": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node/-/autocorrect-node-2.11.1.tgz", + "integrity": "sha512-xalvvRcynT9BEKCq05SinOkaoINtmkqWk8qHQMh/R6ZA962we3W+zv1I4Qx6Ac3CcegSbGoJgCcYM59ZABhBNQ==", + "dev": true, + "bin": { + "autocorrect": "cli.js" + }, + "engines": { + "node": ">= 10" + }, + "optionalDependencies": { + "autocorrect-node-darwin-arm64": "2.11.1", + "autocorrect-node-darwin-x64": "2.11.1", + "autocorrect-node-linux-x64-gnu": "2.11.1", + "autocorrect-node-linux-x64-musl": "2.11.1", + "autocorrect-node-win32-x64-msvc": "2.11.1" + } + }, + "node_modules/autocorrect-node-darwin-arm64": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node-darwin-arm64/-/autocorrect-node-darwin-arm64-2.11.1.tgz", + "integrity": "sha512-7VdYsMAbJuLVHXPM6hv9+Sds91VX55DaMjiVvC6/p/orAg3pIy1wnk2JfJ0GKouKbkOKBp1fT2XFCJXVPBdh5w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/autocorrect-node-darwin-x64": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node-darwin-x64/-/autocorrect-node-darwin-x64-2.11.1.tgz", + "integrity": "sha512-oHiIq+RQm70DfgliW2W5/J8i7ov2cZyyK6l73fHxKOUzwVi7CSxMV6CHnthOZ7yUA07Y2QlFqVyYYPYbMykavA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/autocorrect-node-linux-x64-gnu": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node-linux-x64-gnu/-/autocorrect-node-linux-x64-gnu-2.11.1.tgz", + "integrity": "sha512-qWFiur7vXgnMLQ0zLpJ+ZRpBg23FQY0UrWIXgv+5uSVgPIUcDWa78FVpSDVmeWelpP3XTJ4ljUQuuXdok8oQEA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/autocorrect-node-linux-x64-musl": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node-linux-x64-musl/-/autocorrect-node-linux-x64-musl-2.11.1.tgz", + "integrity": "sha512-Hml5ZRdZMqpeM1p/j7TVy6xdv0+I5yxpRBAMCIkYJp6Le/NIz9EkEP9eYFxHOwdL+MexXvOd/1xSeHEjUL6JDw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/autocorrect-node-win32-x64-msvc": { + "version": "2.11.1", + "resolved": "https://registry.npmmirror.com/autocorrect-node-win32-x64-msvc/-/autocorrect-node-win32-x64-msvc-2.11.1.tgz", + "integrity": "sha512-1Cx2iI0eVz/tLyjnkaDx0uH+fXMRxV16tEjbnX0mWPV+LVp2KM5zqYYuzsSkm6f9O6dOFWGUn0ybKZ4QpZb/Dg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, "node_modules/autoprefixer": { "version": "10.4.20", "resolved": "https://registry.npmmirror.com/autoprefixer/-/autoprefixer-10.4.20.tgz", diff --git a/package.json b/package.json index 002b1a3..1f0e3d9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "build:turbo": "npx turbo build lint", "build": "next build", "start": "next start", - "format": "npx prettier . --write", + "format": "npx prettier . --write && npx autocorrect --fix", "lint": "next lint", "lint:fix": "npx eslint --fix .", "newpost": "node ./scripts/newpost.mjs", @@ -102,6 +102,7 @@ "@types/remark-prism": "^1.3.7", "@types/tar": "^6.1.11", "archiver": "^7.0.1", + "autocorrect-node": "^2.11.1", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", "feed": "^4.2.2",