Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency prettier to ~3.1.0 #673

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/.vitepress/theme/components/rules/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ categories.sort((a, b) =>
a.categoryOrder > b.categoryOrder
? 1
: a.categoryOrder < b.categoryOrder
? -1
: a.title > b.title
? 1
: a.title < b.title
? -1
: 0,
? -1
: a.title > b.title
? 1
: a.title < b.title
? -1
: 0,
)

export const DEFAULT_RULES_CONFIG = allRules.reduce((c, r) => {
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-super-linear-backtracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export default createRule("no-super-linear-backtracking", {
const exp = report.exponential
? " This is going to cause exponential backtracking resulting in exponential worst-case runtime behavior."
: getUsageOfPattern() !== UsageOfPattern.whole
? " This might cause exponential backtracking."
: ""
? " This might cause exponential backtracking."
: ""

const attack = `/${report.character.literal.source}+/${
flags.ignoreCase ? "i" : ""
Expand Down
12 changes: 6 additions & 6 deletions lib/rules/no-useless-character-class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ export default createRule("no-useless-character-class", {
element.type === "Character"
? element.raw
: element.type === "CharacterClassRange"
? element.min.raw
: null
? element.min.raw
: null
if (char == null) {
return false
}
Expand Down Expand Up @@ -247,8 +247,8 @@ export default createRule("no-useless-character-class", {
element.type === "Character"
? element.raw
: element.type === "CharacterClassRange"
? element.max.raw
: null
? element.max.raw
: null
if (char == null) {
return false
}
Expand Down Expand Up @@ -290,8 +290,8 @@ export default createRule("no-useless-character-class", {
lastElement.type === "Character"
? lastElement.raw
: lastElement.type === "CharacterClassRange"
? lastElement.max.raw
: "" // never
? lastElement.max.raw
: "" // never
const prefix = lastElement.raw.slice(
0,
-lastRaw.length,
Expand Down
12 changes: 6 additions & 6 deletions lib/rules/no-useless-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,12 @@ function createUselessGlobalFlagVisitor(
data.kind === ReportKind.usedOnlyInSplit
? "uselessGlobalFlagForSplit"
: data.kind === ReportKind.usedOnlyInSearch
? "uselessGlobalFlagForSearch"
: data.kind === ReportKind.usedOnlyOnceInTest
? "uselessGlobalFlagForTest"
: data.kind === ReportKind.usedOnlyOnceInExec
? "uselessGlobalFlagForExec"
: "uselessGlobalFlag",
? "uselessGlobalFlagForSearch"
: data.kind === ReportKind.usedOnlyOnceInTest
? "uselessGlobalFlagForTest"
: data.kind === ReportKind.usedOnlyOnceInExec
? "uselessGlobalFlagForExec"
: "uselessGlobalFlag",
fix: data.fixable
? fixRemoveFlag(regExpReference.regExpContext, "g")
: null,
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/no-useless-non-capturing-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default createRule("no-useless-non-capturing-group", {
context.options[0]?.allowTop === true
? "always"
: context.options[0]?.allowTop === false
? "never"
: context.options[0]?.allowTop ?? "partial"
? "never"
: context.options[0]?.allowTop ?? "partial"

function createVisitor({
node,
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/optimal-lookaround-quantifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ export default createRule("optimal-lookaround-quantifier", {
q.min === 0
? ""
: q.min === 1
? `'${q.element.raw}' (no quantifier)`
: `'${q.element.raw}{${q.min}}'`
? `'${q.element.raw}' (no quantifier)`
: `'${q.element.raw}{${q.min}}'`

context.report({
node,
Expand Down
4 changes: 2 additions & 2 deletions lib/rules/prefer-quantifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ export default createRule("prefer-quantifier", {
buffer.target.type === "Character"
? "characters"
: buffer.target.kind === "any"
? "any characters"
: "character class escapes",
? "any characters"
: "character class escapes",
quantifier: buffer.getQuantifier(),
},
fix(fixer) {
Expand Down
8 changes: 4 additions & 4 deletions lib/rules/sort-character-class-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function getCharacterClassElementKind(
return node.kind === "word"
? "\\w"
: node.kind === "digit"
? "\\d"
: node.kind === "space"
? "\\s"
: "\\p"
? "\\d"
: node.kind === "space"
? "\\s"
: "\\p"
}
if (node.type === "ClassStringDisjunction") {
return "\\q"
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"pako": "^2.1.0",
"prettier": "~3.0.0",
"prettier": "~3.1.0",
"stylelint": "^15.0.0",
"stylelint-config-standard-vue": "^1.0.0",
"ts-node": "^10.2.1",
Expand Down