Skip to content

Commit

Permalink
chore(tools): 代码规范工具配置
Browse files Browse the repository at this point in the history
  • Loading branch information
kaze-k committed Jun 19, 2024
1 parent bae9930 commit 017dc49
Showing 3 changed files with 4 additions and 30 deletions.
28 changes: 2 additions & 26 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -18,38 +18,14 @@
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"prettier"
],
"plugins": ["@typescript-eslint", "eslint-plugin-react"],
"plugins": ["@typescript-eslint", "eslint-plugin-react", "react-hooks", "react-refresh"],
"settings": {
"react": {
"pragma": "React",
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"{}": false
}
}
],
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": ["constructors"]
}
],
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true,
"ignoreProperties": true
}
]
}
}
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"src/**/*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"src/**/*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix", "tsc"],
"src/**/*.scss": ["stylelint --fix"]
}
4 changes: 1 addition & 3 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -3,9 +3,7 @@
"extends": ["stylelint-config-standard", "stylelint-config-standard-scss"],
"rules": {
"prettier/prettier": true,
"color-hex-length": "long",
"selector-class-pattern": "^([a-z][a-z0-9]*)(_[a-z0-9]+)*$",
"selector-pseudo-class-no-unknown": null
"color-hex-length": "long"
},
"overrides": [
{

0 comments on commit 017dc49

Please sign in to comment.