Skip to content

Commit

Permalink
chore: lint-staged and commitlint update (ant-design#6593)
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe authored Apr 10, 2024
1 parent d4ff76b commit ad988cf
Show file tree
Hide file tree
Showing 4 changed files with 598 additions and 487 deletions.
6 changes: 3 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit $1
PATH=$(pwd)/.node/bin:$(pwd)/node_modules/.bin:$PATH commitlint --edit ${1}
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm pretty-quick --staged
PATH=$(pwd)/.node/bin:$(pwd)/node_modules/.bin:$PATH lint-staged
85 changes: 48 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,57 @@
{
"name": "antd-mobile",
"version": "5.35.0",
"homepage": "https://github.com/ant-design/ant-design-mobile#readme",
"bugs": {
"url": "https://github.com/ant-design/ant-design-mobile/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ant-design/ant-design-mobile.git",
"branch": "master",
"platform": "github"
},
"license": "MIT",
"sideEffects": [
"**/*.css",
"**/*.less",
"./es/index.js",
"./src/index.ts",
"./es/global/index.js",
"./src/global/index.ts"
],
"main": "./cjs/index.js",
"unpkg": "./umd/antd-mobile.js",
"module": "./es/index.js",
"types": "./es/index.d.ts",
"typings": "./es/index.d.ts",
"files": [
"./lib"
],
"scripts": {
"start": "dumi dev",
"build": "gulp",
"build-doc": "dumi build && echo '!.*' > dist/.surgeignore",
"lint": "eslint .",
"postinstall": "husky install",
"test": "jest",
"test-with-coverage": "jest --coverage",
"lint": "eslint .",
"lint:fix": "prettier --write . && eslint --fix .",
"package-diff": "antd-tools run package-diff --path=./lib",
"prepare": "husky install",
"pub": "npm run package-diff && npm publish ./lib",
"pub:alpha": "npm publish ./lib --tag alpha",
"pub:dev": "npm publish ./lib --tag dev",
"size-limit": "size-limit",
"size-limit:ci": "size-limit --json"
"size-limit:ci": "size-limit --json",
"start": "dumi dev",
"test": "jest",
"test-with-coverage": "jest --coverage"
},
"lint-staged": {
"*.{cjs,cts,js,jsx,mjs,mts,ts,tsx,vue}": "eslint --fix",
"*.{cjs,css,cts,html,js,json,jsx,less,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}": "prettier --write"
},
"resolutions": {
"@types/react": "18",
"@types/react-dom": "18"
},
"dependencies": {
"@floating-ui/dom": "^1.4.2",
Expand Down Expand Up @@ -47,7 +83,7 @@
"@babel/preset-env": "^7.21.4",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.4",
"@commitlint/cli": "^17.6.1",
"@commitlint/cli": "^19.2.1",
"@commitlint/config-conventional": "^17.6.1",
"@docsearch/react": "^3.3.3",
"@jest/types": "^28.1.3",
Expand Down Expand Up @@ -82,8 +118,9 @@
"csstype": "^3.1.2",
"del": "^6.1.1",
"dumi": "^1.1.50",
"eslint": "^8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"gulp": "^4.0.2",
Expand All @@ -100,15 +137,15 @@
"jest-environment-jsdom": "^28.1.3",
"jest-watch-typeahead": "^1.1.0",
"less": "^4.1.3",
"lint-staged": "^15.2.2",
"lodash": "^4.17.21",
"lorem-ipsum": "^2.0.8",
"lz-string": "^1.5.0",
"mockdate": "^3.0.5",
"postcss": "^8.4.23",
"postcss-px-multiple": "^0.1.5",
"postcss-pxtorem": "^6.0.0",
"prettier": "^2.8.7",
"pretty-quick": "^3.1.3",
"prettier": "^3.1.1",
"prism-react-renderer": "^1.3.5",
"prismjs": "^1.29.0",
"qrcode.react": "^3.1.0",
Expand All @@ -133,36 +170,10 @@
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
},
"resolutions": {
"@types/react": "18",
"@types/react-dom": "18"
},
"main": "./cjs/index.js",
"module": "./es/index.js",
"types": "./es/index.d.ts",
"typings": "./es/index.d.ts",
"unpkg": "./umd/antd-mobile.js",
"GravityCDN": "./umd/antd-mobile.js",
"files": [
"./lib"
],
"sideEffects": [
"**/*.css",
"**/*.less",
"./es/index.js",
"./src/index.ts",
"./es/global/index.js",
"./src/global/index.ts"
],
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ant-design/ant-design-mobile.git",
"branch": "master",
"platform": "github"
},
"GravityCDN": "./umd/antd-mobile.js",
"size-limit": [
{
"path": "./lib/bundle/antd-mobile.es.js",
Expand Down
Loading

0 comments on commit ad988cf

Please sign in to comment.