Skip to content

Commit

Permalink
chore: 更新 typescript/eslint/prettier 等基础依赖, 调整 lint-staged 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
lexmin0412 committed Jul 1, 2024
1 parent ff8c3b4 commit 739231a
Show file tree
Hide file tree
Showing 4 changed files with 324 additions and 412 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
'react/jsx-indent-props': 0, // 不验证jsx缩进
'no-unused-vars': [
// 不允许未使用的变量
'error',
'warn',
{
varsIgnorePattern: 'Taro', // Taro框架要求在使用class组件的时候必须在文件中声明Taro 但是不是所有文件都会显式使用到 所以忽略
},
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
...require('@lexmin0412/prettier-config-standard'),
}
...require("@lexmin0412/prettier-config-base")
};
27 changes: 13 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@
}
},
"lint-staged": {
"**/*.js": "eslint --ext .js",
"src/**/*.ts": "eslint --ext .ts",
"src/**/*.tsx": "eslint --ext .tsx",
"**/*.md": "markdownlint-cli2 .md"
"*.{cjs,mjs,js,ts,tsx}": ["eslint", "prettier --write"],
"*.{css,less}": ["stylelint --fix", "prettier --write"],
"*.{json,jsonc,html,yml,yaml,md}": ["markdownlint-cli2 .md", "prettier --write"]
},
"browserslist": [
"last 3 versions",
Expand Down Expand Up @@ -76,41 +75,41 @@
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/lint": "^17.0.3",
"@lexmin0412/prettier-config-standard": "^2.0.0",
"@lexmin0412/prettier-config-base": "^0.0.10",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.4",
"@tarojs/cli": "3.6.32",
"@tarojs/webpack5-runner": "3.6.32",
"@tarox/plugin-init-app": "^1.0.0-alpha.16",
"@types/react": "18.0.15",
"@types/webpack-env": "^1.13.6",
"@typescript-eslint/eslint-plugin": "^4.0.0",
"@typescript-eslint/parser": "^4.0.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@youtils/commitlint-plugin-standard": "^0.0.1",
"babel-loader": "^8.2.5",
"babel-plugin-import": "^1.13.6",
"babel-preset-taro": "3.6.32",
"cache-loader": "^4.1.0",
"cross-env": "^7.0.2",
"eslint": "^6.8.0",
"eslint-config-taro": "3.6.32",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-hooks": "^1.6.1",
"eslint": "^8.12.0",
"eslint-config-taro": "3.6.32",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^4.3.0",
"lint-staged": "^10.4.0",
"markdownlint": "^0.25.1",
"markdownlint-cli2": "^0.4.0",
"miniprogram-automator": "^0.11.0",
"miniprogram-automator-scripts": "0.0.2",
"plop": "^2.7.4",
"prettier": "^2.1.2",
"prettier": "^3.3.2",
"pretty-quick": "^3.0.2",
"react-refresh": "0.11.0",
"stylelint": "9.3.0",
"taro-plugin-compiler-optimization": "^1.0.1",
"taro-plugin-dotenv": "^1.0.1",
"thread-loader": "^3.0.4",
"typescript": "^4.1.0",
"typescript": "^5.1.0",
"webpack": "^5.74.0"
}
}
Loading

0 comments on commit 739231a

Please sign in to comment.