-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 chore(config): 更新 eslint 配置并移除 package-lock.json
- 新增 eslint 配置以支持 TypeScript - 移除 package-lock.json,使用 pnpm 管理依赖
- Loading branch information
1 parent
16b9a09
commit d95e6b3
Showing
10 changed files
with
498 additions
and
23,021 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
npx lint-staged | ||
|
||
echo "\033[33m ------------------- 正在校验提交信息格式 -------------------- \033[0m" | ||
npx --no-install commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import stylisticTs from "@stylistic/eslint-plugin-ts"; | ||
import parserTs from "@typescript-eslint/parser"; | ||
|
||
export default [ | ||
{ | ||
ignores: ["**/out", "**/dist", "**/*.d.ts"], | ||
}, | ||
{ | ||
files: ["src/**/*.ts"], | ||
plugins: { | ||
"@stylistic/ts": stylisticTs, | ||
}, | ||
|
||
languageOptions: { | ||
parser: parserTs, | ||
ecmaVersion: 6, | ||
sourceType: "module", | ||
}, | ||
|
||
rules: { | ||
// "@stylistic/ts/naming-convention": [ | ||
// "warn", | ||
// { | ||
// selector: "import", | ||
// format: ["camelCase", "PascalCase"], | ||
// }, | ||
// ], | ||
|
||
"@stylistic/ts/semi": "warn", | ||
curly: "warn", | ||
eqeqeq: "warn", | ||
"no-throw-literal": "warn", | ||
semi: "off", | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.