Skip to content

Commit

Permalink
chore⚡️: add rome format (ant-design#38512)
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Nov 11, 2022
1 parent d52b8c6 commit 4aa7874
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install pretty-quick --staged
npx --no-install lint-staged
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"lint:style": "stylelint '{site,components}/**/*.less'",
"pre-publish": "npm run test-all -- --skip-build",
"prettier": "prettier -c --write **/*",
"pretty-quick": "pretty-quick",
"rome:format": "rome format --write .",
"pub": "npm run version && antd-tools run pub",
"prepublishOnly": "antd-tools run guard",
"postpublish": "node ./scripts/post-script.js",
Expand Down Expand Up @@ -245,14 +245,14 @@
"jsdom": "^20.0.0",
"jsonml.js": "^0.1.0",
"less-vars-to-js": "^1.3.0",
"lint-staged": "^13.0.3",
"lz-string": "^1.4.4",
"mini-css-extract-plugin": "^1.6.2",
"mockdate": "^3.0.0",
"open": "^8.0.1",
"prettier": "^2.3.2",
"prettier-plugin-jsdoc": "^0.4.2",
"pretty-format": "^29.0.0",
"pretty-quick": "^3.0.0",
"qs": "^6.10.1",
"rc-footer": "^0.6.6",
"rc-tween-one": "^3.0.3",
Expand Down Expand Up @@ -281,6 +281,7 @@
"remark-preset-lint-recommended": "^6.0.0",
"remove-files-webpack-plugin": "1.5.0",
"rimraf": "^3.0.0",
"rome": "^10.0.1",
"scrollama": "^3.0.0",
"semver": "^7.3.5",
"simple-git": "^3.0.0",
Expand Down Expand Up @@ -350,5 +351,8 @@
],
"tnpm": {
"mode": "npm"
},
"lint-staged": {
"*.{ts,tsx,js,json,less,md}": "rome format --write"
}
}
14 changes: 14 additions & 0 deletions rome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"formatter": {
"enabled": true,
"ignore": ["./dist/*", "./es/**/*", "./lib/**/*", "_site/**/*"],
"indentStyle": "space",
"lineWidth": 100,
"indentSize": 2
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}
1 change: 0 additions & 1 deletion scripts/check-version-md.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ if (changeLog) {
console.log(chalk.blue('[check-version-md]: Check Passed'));
console.log('\n');
process.exit(0);
return;
}
}
console.log('\n');
Expand Down

0 comments on commit 4aa7874

Please sign in to comment.