nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: ota-meshi/eslint-plugin-regexp
Pull request #525 (2023-05-09 03:17:49)

Add metadata object
This PR makes the plugin export metadata objects.

ESLint now recommends that plugins have metadata.
https://eslint.org/docs/latest/extend/plugins#metadata-in-plugins


Patch:
diff --git a/lib/index.ts b/lib/index.ts
index 939451d..cda4b32 100644
--- a/lib/index.ts
+++ b/lib/index.ts
@@ -2,6 +2,7 @@ import type { RuleModule } from "./types"
 import { rules as ruleList } from "./utils/rules"
 import * as recommended from "./configs/recommended"
 import * as all from "./configs/all"
+export * as meta from "./meta"
 
 export const configs = {
     recommended,
diff --git a/lib/meta.ts b/lib/meta.ts
new file mode 100644
index 0000000..da2bd9f
--- /dev/null
+++ b/lib/meta.ts
@@ -0,0 +1,3 @@
+// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
+// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -- Get meta data
+export const { name, version } = require("../package.json")
diff --git a/tsconfig.json b/tsconfig.json
index dc3b702..d435819 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -18,6 +18,7 @@
             "*": ["typings/*"]
         },
         "esModuleInterop": true,
+        "resolveJsonModule": true,
 
         "skipLibCheck": true
     },


Test patch:
diff --git a/tests/lib/meta.ts b/tests/lib/meta.ts
new file mode 100644
index 0000000..d50ea75
--- /dev/null
+++ b/tests/lib/meta.ts
@@ -0,0 +1,13 @@
+import assert from "assert"
+import * as plugin from "../../lib"
+import { version } from "../../package.json"
+const expectedMeta = {
+    name: "eslint-plugin-regexp",
+    version,
+}
+
+describe("Test for meta object", () => {
+    it("A plugin should have a meta object.", () => {
+        assert.deepStrictEqual(plugin.meta, expectedMeta)
+    })
+})
Repository: ota-meshi/eslint-plugin-regexp
Pull request #596 (2023-09-12 10:04:36)

Add support for v flag to `regexp/no-non-standard-flag` rule
related to https://github.com/ota-meshi/eslint-plugin-regexp/issues/545

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 3c2330eb8c76e7792221905eae2515f49ae5dee0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/ota-meshi/eslint-plugin-regexp/new/no-non-standard-flag?filename=.changeset/brown-dragons-dance.md&value=---%0A%22eslint-plugin-regexp%22%3A%20patch%0A---%0A%0AAdd%20support%20for%20v%20flag%20to%20%60regexp%2Fno-non-standard-flag%60%20rule%0A)



Patch:
diff --git a/.changeset/brown-dragons-dance.md b/.changeset/brown-dragons-dance.md
new file mode 100644
index 0000000..7191629
--- /dev/null
+++ b/.changeset/brown-dragons-dance.md
@@ -0,0 +1,5 @@
+---
+"eslint-plugin-regexp": minor
+---
+
+Add support for v flag to `regexp/no-non-standard-flag` rule
diff --git a/lib/rules/no-non-standard-flag.ts b/lib/rules/no-non-standard-flag.ts
index 6db73a9..b353291 100644
--- a/lib/rules/no-non-standard-flag.ts
+++ b/lib/rules/no-non-standard-flag.ts
@@ -1,7 +1,7 @@
 import type { RegExpContext, UnparsableRegExpContext } from "../utils"
 import { createRule, defineRegexpVisitor } from "../utils"
 
-const STANDARD_FLAGS = "dgimsuy"
+const STANDARD_FLAGS = "dgimsuvy"
 
 export default createRule("no-non-standard-flag", {
     meta: {


Test patch:
diff --git a/tests/lib/rules/no-non-standard-flag.ts b/tests/lib/rules/no-non-standard-flag.ts
index 5488168..56eeed8 100644
--- a/tests/lib/rules/no-non-standard-flag.ts
+++ b/tests/lib/rules/no-non-standard-flag.ts
@@ -3,14 +3,14 @@ import rule from "../../../lib/rules/no-non-standard-flag"
 
 const tester = new RuleTester({
     parserOptions: {
-        ecmaVersion: 2020,
+        ecmaVersion: "latest",
         sourceType: "module",
     },
     parser: require.resolve("@typescript-eslint/parser"),
 })
 
 tester.run("no-non-standard-flag", rule as any, {
-    valid: [`/foo/gimsuy`],
+    valid: [`/foo/gimsuy`, `/foo/v`],
     invalid: [
         {
             code: `/fo*o*/l`,