Skip to content

Commit

Permalink
💄 style: Update lint
Browse files Browse the repository at this point in the history
  • Loading branch information
canisminor1990 committed Jul 1, 2024
1 parent 2b8d1f4 commit 63251ad
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .stylelintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const config = require('@lobehub/lint').stylelint;

module.exports = {
...config,
rules: {
'custom-property-pattern': null,
'selector-pseudo-element-no-unknown': null,
'no-descending-specificity': null,
...config.rules,
},
};
22 changes: 15 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"i18n-md": "lobe-i18n md",
"lint": "eslint \"{src,api,lib}/**/*.{js,jsx,ts,tsx}\" --fix",
"lint:md": "remark . --quiet --frail --output",
"lint:style": "stylelint \"{src,tests}/**/*.{js,jsx,ts,tsx}\" --fix",
"prepare": "husky install",
"prepublishOnly": "npm run build",
"prettier": "prettier -c --write \"**/**\"",
Expand All @@ -68,12 +69,18 @@
"*.json": [
"prettier --write --no-error-on-unmatched-pattern"
],
"*.{mjs,cjs}": [
"prettier --write",
"eslint --fix"
],
"*.{js,jsx}": [
"prettier --write",
"stylelint --fix",
"eslint --fix"
],
"*.{ts,tsx}": [
"prettier --parser=typescript --write",
"stylelint --fix",
"eslint --fix"
]
},
Expand All @@ -98,17 +105,17 @@
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@lobehub/i18n-cli": "^1.18.1",
"@lobehub/lint": "^1.23.4",
"@lobehub/ui": "^1.145.2",
"@lobehub/lint": "^1.24.3",
"@lobehub/ui": "^1.146.4",
"@types/lodash-es": "^4.17.12",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^9.0.8",
"@vercel/node": "^3.1.7",
"@vercel/node": "^3.2.0",
"commitlint": "^19.3.0",
"dumi": "^2.3.8",
"dumi-theme-lobehub": "^1.8.0",
"dumi": "^2.4.3",
"dumi-theme-lobehub": "^1.8.1",
"eslint": "^8.57.0",
"father": "4.3.1",
"husky": "^9.0.11",
Expand All @@ -117,7 +124,8 @@
"remark": "^14.0.3",
"remark-cli": "^11.0.0",
"semantic-release": "^21.1.2",
"tsx": "^4.15.7",
"stylelint": "^15.11.0",
"tsx": "^4.16.0",
"typescript": "^5.5.2",
"vercel": "^28.20.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/core/utils/splitTextIntoSegments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const toHalfWidthAndCleanSpace = (str: string): string => {
export const splitTextIntoSegments = (text: string, maxChars: number = 100): string[] => {
text = toHalfWidthAndCleanSpace(text);

const sentences = text.match(/[^.!;?]+[.!;?]+/g) || [];
const sentences = text.match(/[^!.;?]+[!.;?]+/g) || [];
const segments: string[] = [];
let currentSegment = '';

Expand Down

0 comments on commit 63251ad

Please sign in to comment.