Skip to content

Commit 247c013

Browse files
chore(deps): update dependency eslint-plugin-regexp to v2 (#267)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yosuke Ota <[email protected]>
1 parent 72dc912 commit 247c013

8 files changed

+9
-9
lines changed

.github/workflows/NodeCI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ jobs:
5858
runs-on: ubuntu-latest
5959
strategy:
6060
matrix:
61-
node-version: [12.x, 14.x, 16.x, 17.x]
61+
node-version: [12.x, 14.x, 16.x, 17.x, 18.x, 20.x]
6262
steps:
6363
- uses: actions/checkout@v4
6464
- name: Use Node.js ${{ matrix.node-version }}
6565
uses: actions/setup-node@v3
6666
with:
6767
node-version: ${{ matrix.node-version }}
6868
- name: Install Packages
69-
run: npm install
69+
run: npm install -f
7070
- name: Test
7171
run: npm test
7272
test-with-eslint6:

lib/rules/no-binary-numeric-literals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { AST } from "jsonc-eslint-parser";
22
import { createRule } from "../utils";
33
import { getSourceCode } from "eslint-compat-utils";
44

5-
const binaryNumericLiteralPattern = /^0[Bb]/u;
5+
const binaryNumericLiteralPattern = /^0b/iu;
66

77
export default createRule("no-binary-numeric-literals", {
88
meta: {

lib/rules/no-hexadecimal-numeric-literals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { AST } from "jsonc-eslint-parser";
22
import { createRule } from "../utils";
33
import { getSourceCode } from "eslint-compat-utils";
44

5-
const hexadecimalNumericLiteralPattern = /^0[Xx]/u;
5+
const hexadecimalNumericLiteralPattern = /^0x/iu;
66

77
export default createRule("no-hexadecimal-numeric-literals", {
88
meta: {

lib/rules/no-octal-numeric-literals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { AST } from "jsonc-eslint-parser";
22
import { createRule } from "../utils";
33
import { getSourceCode } from "eslint-compat-utils";
44

5-
const octalNumericLiteralPattern = /^0[Oo]/u;
5+
const octalNumericLiteralPattern = /^0o/iu;
66

77
export default createRule("no-octal-numeric-literals", {
88
meta: {

lib/rules/sort-array-values.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function parseOptions(options: UserOptions): ParsedOption[] {
265265
while (p) {
266266
if (p.type === "JSONProperty") {
267267
const name = getPropertyName(p);
268-
if (/^[$_a-z][\w$]*$/iu.test(name)) {
268+
if (/^[$a-z_][\w$]*$/iu.test(name)) {
269269
path = `.${name}${path}`;
270270
} else {
271271
path = `[${JSON.stringify(name)}]${path}`;

lib/rules/sort-keys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class JSONObjectData {
118118
while (p) {
119119
if (p.type === "JSONProperty") {
120120
const name = getPropertyName(p);
121-
if (/^[$_a-z][\w$]*$/iu.test(name)) {
121+
if (/^[$a-z_][\w$]*$/iu.test(name)) {
122122
path = `.${name}${path}`;
123123
} else {
124124
path = `[${JSON.stringify(name)}]${path}`;

lib/rules/valid-json-number.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { RuleListener } from "../types";
55
import { createRule } from "../utils";
66
import { getSourceCode } from "eslint-compat-utils";
77

8-
const nonDecimalNumericLiteralPattern = /^0[\dBOXbox]/u;
8+
const nonDecimalNumericLiteralPattern = /^0[\dbox]/iu;
99

1010
/**
1111
* Checks if the given string is valid number as JSON.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"eslint-plugin-n": "^16.0.0",
103103
"eslint-plugin-node-dependencies": "^0.11.0",
104104
"eslint-plugin-prettier": "^5.0.0",
105-
"eslint-plugin-regexp": "^1.0.0",
105+
"eslint-plugin-regexp": "^2.0.0",
106106
"eslint-plugin-vue": "^9.0.0",
107107
"eslint-plugin-yml": "^1.0.0",
108108
"events": "^3.3.0",

0 commit comments

Comments
 (0)