Skip to content

Commit d998fe2

Browse files
Switch to change-case (#591)
* chore(deps): Bump no-case from 3.0.4 to 4.0.0 Bumps [no-case](https://github.com/blakeembrey/change-case) from 3.0.4 to 4.0.0. - [Release notes](https://github.com/blakeembrey/change-case/releases) - [Commits](https://github.com/blakeembrey/change-case/compare/[email protected]@4.0.0) --- updated-dependencies: - dependency-name: no-case dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: switch to change-case --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 4201320 commit d998fe2

File tree

3 files changed

+14
-25
lines changed

3 files changed

+14
-25
lines changed

lib/rule-list.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import { EMOJIS_TYPE } from './rule-type.js';
3535
import { hasOptions } from './rule-options.js';
3636
import { getLinkToRule } from './rule-link.js';
3737
import { capitalizeOnlyFirstLetter, sanitizeMarkdownTable } from './string.js';
38-
import { noCase } from 'no-case';
38+
import { noCase } from 'change-case';
3939
import { getProperty } from 'dot-prop';
4040
import { boolean, isBooleanable } from 'boolean';
4141
import Ajv from 'ajv';
@@ -370,9 +370,10 @@ function getRulesAndHeadersForSplit(
370370
if (!ruleListSplitFinalPart) {
371371
throw new Error(`Invalid ruleListSplit value "${ruleListSplitItem}".`);
372372
}
373-
const ruleListSplitTitle = noCase(ruleListSplitFinalPart, {
374-
transform: (str) => capitalizeOnlyFirstLetter(str),
375-
});
373+
const ruleListSplitTitle = noCase(ruleListSplitFinalPart)
374+
.split(' ')
375+
.map((word) => capitalizeOnlyFirstLetter(word))
376+
.join(' ');
376377

377378
// Add a list for the rules with property set to this value.
378379
rulesAndHeadersForThisSplit.push({

package-lock.json

Lines changed: 8 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@typescript-eslint/utils": "^8.0.0",
4949
"ajv": "^8.11.2",
5050
"boolean": "^3.2.0",
51+
"change-case": "^5.0.0",
5152
"commander": "^12.1.0",
5253
"cosmiconfig": "^9.0.0",
5354
"deepmerge": "^4.2.2",
@@ -56,7 +57,6 @@
5657
"json-schema": "^0.4.0",
5758
"json-schema-traverse": "^1.0.0",
5859
"markdown-table": "^3.0.3",
59-
"no-case": "^3.0.4",
6060
"type-fest": "^4.0.0"
6161
},
6262
"devDependencies": {

0 commit comments

Comments
 (0)