Skip to content

Commit

Permalink
chore: replace prettier with biome (#2629)
Browse files Browse the repository at this point in the history
Co-authored-by: lxr <1076629390@qq.com>
  • Loading branch information
ianzone and crazylxr authored Sep 25, 2024
1 parent 5ddd8c2 commit 2c0cf89
Show file tree
Hide file tree
Showing 7 changed files with 3,365 additions and 9,460 deletions.
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

19 changes: 0 additions & 19 deletions .prettierrc

This file was deleted.

48 changes: 48 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"files": {
"ignoreUnknown": true
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"linter": {
"rules": {
"style": {
"noNonNullAssertion": "off"
},
"correctness": {
"useHookAtTopLevel": "error"
},
"suspicious": {
"noExplicitAny": "off"
}
}
},
"formatter": {
"lineWidth": 100,
"indentStyle": "space"
},
"javascript": {
"parser": {
"unsafeParameterDecoratorsEnabled": true
},
"formatter": {
"quoteStyle": "single",
"jsxQuoteStyle": "single"
}
},
"css": {
"parser": {
"cssModules": true
},
"formatter": {
"enabled": true
},
"linter": {
"enabled": true
}
}
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "jest",
"coveralls": "jest --coverage --coverageReporters=text-lcov | coveralls",
"lint": "eslint --ignore-pattern **/__tests__/* --ignore-pattern **/demo/* \"packages/*/src/**/*.{ts,tsx}\" --cache",
"pretty": "pretty-quick --staged",
"pretty": "biome format --fix --staged",
"build:doc": "dumi build",
"pub:doc-surge": "surge ./dist --domain ahooks.js.org",
"pub:doc-gitee": "cd ./dist && rm -rf .git && touch .spa && touch .nojekyll && git init && git remote add origin git@gitee.com:ahooks/ahooks.git && git add -A && git commit -m \"publish docs\" && git push origin main -f && echo https://gitee.com/ahooks/ahooks/pages",
Expand All @@ -35,6 +35,7 @@
"@babel/cli": "^7.10.1",
"@babel/core": "^7.10.2",
"@babel/plugin-transform-runtime": "^7.19.6",
"@biomejs/biome": "^1.8.3",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@testing-library/jest-dom": "^5.16.5",
Expand Down Expand Up @@ -62,8 +63,6 @@
"jest-environment-jsdom": "^29.4.1",
"jest-localstorage-mock": "^2.4.18",
"mockjs": "^1.1.0",
"prettier": "^3.2.5",
"pretty-quick": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-drag-listview": "^0.1.6",
Expand All @@ -78,8 +77,6 @@
"webpack-merge": "^4.2.2"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
"extends": ["@commitlint/config-conventional"]
}
}
2 changes: 0 additions & 2 deletions packages/hooks/src/useSelections/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ const result: Result = useSelections<T>(items: T[], defaultSelected?: T[]);

### Params

<!-- prettier-ignore -->
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| items | Data items | `T[]` | - |
| options | Optional configuration | `Options` | - |

### Options

<!-- prettier-ignore -->
| Property | Description | Type | Default |
| --- | --- | --- | --- |
| defaultSelected | Default selected data | `T[]` | `[]` |
Expand Down
2 changes: 0 additions & 2 deletions packages/hooks/src/useSelections/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ const result: Result = useSelections<T>(items: T[], defaultSelected?: T[]);

### Params

<!-- prettier-ignore -->
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| items | 元素列表 | `T[]` | - |
| options | 可选配置项 | `Options` | - |

### Options

<!-- prettier-ignore -->
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| defaultSelected | 默认选择的数据 | `T[]` | `[]` |
Expand Down
Loading

0 comments on commit 2c0cf89

Please sign in to comment.