chore️: add rome format (#38512)

This commit is contained in:
afc163 2022-11-11 18:15:33 +08:00 committed by GitHub
parent d52b8c6afb
commit 4aa7874990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 4 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

View File

@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install pretty-quick --staged
npx --no-install lint-staged

View File

@ -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",
@ -245,6 +245,7 @@
"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",
@ -252,7 +253,6 @@
"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",
@ -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",
@ -350,5 +351,8 @@
],
"tnpm": {
"mode": "npm"
},
"lint-staged": {
"*.{ts,tsx,js,json,less,md}": "rome format --write"
}
}

14
rome.json Normal file
View File

@ -0,0 +1,14 @@
{
"formatter": {
"enabled": true,
"ignore": ["./dist/*", "./es/**/*", "./lib/**/*", "_site/**/*"],
"indentStyle": "space",
"lineWidth": 100,
"indentSize": 2
},
"javascript": {
"formatter": {
"quoteStyle": "single"
}
}
}

View File

@ -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');