Skip to content

Commit 6b2dfe1

Browse files
renovate[bot]renovate-botota-meshi
authored
Update dependency @ota-meshi/eslint-plugin to ^0.8.0 (#47)
* 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 b501d3c commit 6b2dfe1

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
}
6262
},
6363
"devDependencies": {
64-
"@ota-meshi/eslint-plugin": "^0.7.1",
64+
"@ota-meshi/eslint-plugin": "^0.8.0",
6565
"@types/eslint": "^7.2.10",
6666
"@types/eslint-scope": "^3.7.0",
6767
"@types/eslint-visitor-keys": "^1.0.0",

src/rules/prefer-class-directive.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export default createRule("prefer-class-directive", {
273273
let canTransform = true
274274
for (const className of map.values()) {
275275
if (className) {
276-
if (!/^\s*[\w-]*\s*$/u.test(className)) {
276+
if (!/^[\w-]*$/u.test(className.trim())) {
277277
// Cannot be transformed to an attribute.
278278
canTransform = false
279279
break

src/utils/regexp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const RE_REGEXP_CHAR = /[$()*+.?[\\\]^{|}]/gu
22
const RE_HAS_REGEXP_CHAR = new RegExp(RE_REGEXP_CHAR.source)
33

4-
const RE_REGEXP_STR = /^\/(.+)\/(.*)$/u
4+
const RE_REGEXP_STR = /^\/(.+)\/([A-Za-z]*)$/u
55

66
/**
77
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",

tools/update-readme.ts

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ fs.writeFileSync(
3535
)
3636
.replace(/<!--DOCS_IGNORE_START-->[\s\S]*?<!--DOCS_IGNORE_END-->/gu, "")
3737
.replace(
38+
// eslint-disable-next-line regexp/no-super-linear-backtracking -- ignore
3839
/\(https:\/\/ota-meshi.github.io\/eslint-plugin-svelte(.*?)([^/]*\.html)?\)/gu,
3940
(_ptn, c1: string, c2: string) => {
4041
let result = `(.${c1}`

0 commit comments

Comments
 (0)