Skip to content

Commit 0a175f0

Browse files
renovate[bot]renovate-botota-meshi
authored
chore(deps): update dependency @ota-meshi/eslint-plugin to ^0.8.0 (#150)
* chore(deps): update dependency @ota-meshi/eslint-plugin to ^0.8.0 * fix Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: yosuke ota <[email protected]>
1 parent d09c6b8 commit 0a175f0

File tree

9 files changed

+14
-10
lines changed

9 files changed

+14
-10
lines changed

lib/styles/context/vue-components/find-vue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function findVueComponent(
6666
const sourceCode = context.getSourceCode()
6767
const componentComments = sourceCode
6868
.getAllComments()
69-
.filter((comment) => /@vue\/component/gu.test(comment.value))
69+
.filter((comment) => comment.value.includes("@vue/component"))
7070
const foundNodes: ASTNode[] = []
7171

7272
/**

lib/styles/selectors/resolver/stylus-selector-resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export class StylusSelectorResolver extends CSSSelectorResolver {
187187
}
188188

189189
if (
190-
/^(?:\.\.\/)+$/gu.test(nesting.node.value) &&
190+
/^(?:\.\.\/)+$/u.test(nesting.node.value) &&
191191
nesting.nestingIndex === 0
192192
) {
193193
// The nestingNode is relative reference. e.g. `../`

lib/styles/utils/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ export function isSupportedStyleLang(
1414
* @returns {string} The escape string
1515
*/
1616
export function escapeRegExp(value: string): string {
17+
// eslint-disable-next-line regexp/no-obscure-range -- ignore
1718
return value.replace(/[$(-+.?[-^{-}]/gu, "\\$&") // $& means the whole matched string
1819
}

lib/utils/regexp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const RE_REGEXP_STR = /^\/(.+)\/(.*)$/u
1+
const RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u
22

33
/**
44
* Convert a string to the `RegExp`.

package-lock.json

Lines changed: 3 additions & 3 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
@@ -46,7 +46,7 @@
4646
"dist"
4747
],
4848
"devDependencies": {
49-
"@ota-meshi/eslint-plugin": "^0.7.0",
49+
"@ota-meshi/eslint-plugin": "^0.8.0",
5050
"@types/eslint": "^7.2.0",
5151
"@types/eslint-visitor-keys": "^1.0.0",
5252
"@types/estree": "^0.0.50",

tests/lib/styles/parser/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,17 @@ function checkCSSNodeLocations(
139139
)
140140
postcssText = postcssText.replace(/^\s*\/\*([\s\S]*?)\*\/\s*/u, "")
141141
postcssText = postcssText.replace(/^\s*\/\/([^\n]*)\s*/u, "")
142+
// eslint-disable-next-line regexp/no-super-linear-backtracking -- for test
142143
postcssText = postcssText.replace(/\s*\/\/([^\n]*)\s*$/u, "")
143144
} else if (node.type === "VCSSSelectorCombinator") {
144145
postcssText = postcssText.replace(
145146
/\/\*(?![\s\S]*\*\/[\s\S]*\/\*)([\s\S]*?)\*\/\s*$/u,
146147
"",
147148
)
148149
postcssText = postcssText.replace(/^\s*\/\*([\s\S]*?)\*\//u, "")
150+
// eslint-disable-next-line regexp/no-super-linear-backtracking -- for test
149151
postcssText = postcssText.replace(/\/\/([^\n]*)\s*$/u, "")
152+
// eslint-disable-next-line regexp/no-super-linear-backtracking -- for test
150153
postcssText = postcssText.replace(/\s*\/\/([^\n]*)\s*$/u, "")
151154
}
152155
if (

tests/lib/styles/selectors/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function buildElementText(e: AST.VElement, context: RuleContext): string {
9393
const classText = className
9494
? `.${
9595
className.type === "value"
96-
? className.value.split(/\s+/gu).join(".")
96+
? className.value.split(/\s+/u).join(".")
9797
: `{${className.value}}`
9898
}`
9999
: ""

tools/update-docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,11 @@ class DocFile {
159159
public adjustCodeBlocks() {
160160
// Adjust the necessary blank lines before and after the code block so that GitHub can recognize `.md`.
161161
this.content = this.content.replace(
162-
/(<eslint-code-block[\s\S]*?>)\n+```/gmu,
162+
/(<eslint-code-block[\s\S]*?>)\n+```/gu,
163163
"$1\n\n```",
164164
)
165165
this.content = this.content.replace(
166-
/```\n+<\/eslint-code-block>/gmu,
166+
/```\n+<\/eslint-code-block>/gu,
167167
"```\n\n</eslint-code-block>",
168168
)
169169
return this

0 commit comments

Comments
 (0)