Skip to content

Commit

Permalink
✨ feat: 更新 prettier 配置
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed May 9, 2023
1 parent ad964e3 commit b451843
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 42 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ LICENSE
.eslintcache
*.lock
yarn-error.log
package.json
5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

19 changes: 19 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
pluginSearchDirs: false,
plugins: [
require.resolve('prettier-plugin-organize-imports'),
require.resolve('prettier-plugin-packagejson'),
],
printWidth: 100,
proseWrap: 'never',
singleQuote: true,
trailingComma: 'all',
overrides: [
{
files: '*.md',
options: {
proseWrap: 'preserve',
},
},
],
};
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "monorepo-template",
"private": true,
"author": "arvinxx(arvinx@foxmail.com)",
"description": "monorepo develop template",
"workspaces": [
"packages/*"
],
"homepage": "https://github.com/arvinxx/monorepo-template#readme",
"bugs": {
"url": "https://github.com/arvinxx/monorepo-template"
},
"repository": "git+https://github.com/arvinxx/monorepo-template.git",
"license": "MIT",
"author": "arvinxx(arvinx@foxmail.com)",
"workspaces": [
"packages/*"
],
"scripts": {
"start": "concurrently \"npm run api:dev\" \"npm run site:dev\"",
"build": "father build",
Expand Down Expand Up @@ -58,35 +58,33 @@
"@testing-library/react-hooks": "^3.2.1",
"@types/classnames": "^2.2.7",
"@types/fs-extra": "^9.0.1",
"@umijs/lint": "^4",
"@types/jsdom": "^16.2.3",
"@types/node": "^14.14.10",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/uuid": "^8.3.0",
"@umijs/lint": "^4",
"@vitest/coverage-c8": "latest",
"antd": "^5",
"commitlint": "^17",
"commitlint-config-gitmoji": "^2",
"conventional-changelog-gitmoji-config": "^1.4.0",
"concurrently": "^7",
"conventional-changelog-gitmoji-config": "^1.4.0",
"cross-env": "^7",
"dpdm": "^3",
"dumi": "^2",
"antd": "^5",
"jsdom": "^21",
"dumi-theme-antd-style": "latest",
"dumi-assets-types": "^1",
"dpdm": "^3",
"dumi-theme-antd-style": "latest",
"eslint": "^8",
"father": "^4",
"husky": "^8",
"jsdom": "^21",
"lint-staged": "^13",
"multi-semantic-release": "^3",
"onchange": "^7",
"prettier": "^2",
"prettier-plugin-organize-imports": "^3",
"prettier-plugin-packagejson": "^2",
"react": "^18",
"react-dom": "^18",
"multi-semantic-release": "^3",
"semantic-release": "^21",
"semantic-release-config-gitmoji": "^1",
"stylelint": "^14",
Expand Down
25 changes: 13 additions & 12 deletions packages/bar/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
{
"name": "@arvinxu/bar",
"version": "2.0.0",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"files": [
"lib",
"es",
"dist"
],
"main": "lib/index.js",
"module": "es/index.js",
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
"scripts": {
"build": "father build",
"clean": "rm -rf es lib dist build coverage .umi",
"cov": "jest --coverage",
"doctor": "father doctor",
"test": "vitest",
"test:update": "vitest -u"
},
"dependencies": {
"@arvinxu/foo": "2.0.0"
Expand All @@ -19,12 +24,8 @@
"react": "^18",
"react-dom": "^18"
},
"scripts": {
"build": "father build",
"test": "vitest",
"test:update": "vitest -u",
"cov": "jest --coverage",
"doctor": "father doctor",
"clean": "rm -rf es lib dist build coverage .umi"
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
}
}
25 changes: 13 additions & 12 deletions packages/foo/package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
{
"name": "@arvinxu/foo",
"version": "2.0.0",
"main": "lib/index.js",
"module": "es/index.js",
"types": "lib/index.d.ts",
"files": [
"lib",
"es",
"dist"
],
"main": "lib/index.js",
"module": "es/index.js",
"publishConfig": {
"registry": "https://registry.npmjs.org",
"access": "public"
"scripts": {
"build": "father build",
"clean": "rm -rf es lib dist build coverage .dumi",
"doctor": "father doctor",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"test:update": "vitest -u"
},
"peerDependencies": {
"react": "^18",
"react-dom": "^18"
},
"scripts": {
"build": "father build",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"test:update": "vitest -u",
"doctor": "father doctor",
"clean": "rm -rf es lib dist build coverage .dumi"
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
}
}

0 comments on commit b451843

Please sign in to comment.