Skip to content
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
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,10 @@
"markdownlint-cli": "^0.47.0",
"prettier": "^3.8.1",
"prettier-plugin-pkg": "^0.21.2"
},
"pnpm": {
"patchedDependencies": {
"eslint-plugin-case-police@2.1.1": "patches/eslint-plugin-case-police@2.1.1.patch"
}
}
}
25 changes: 25 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Patches

This directory contains patches applied to npm dependencies to fix compatibility issues or bugs that
have not yet been fixed upstream.

## Current Patches

### eslint-plugin-case-police@2.1.1

**Issue:** The plugin uses the deprecated `context.getFilename()` method which was removed in ESLint
v10.

**Fix:** Replace `context.getFilename()` with the new `context.filename` property.

**Changes:**

- Line 118: `context.getFilename()` → `context.filename`

**Upstream Status:** This is a breaking change introduced in ESLint v10.0.0 where
`context.getFilename()` method was removed in favor of the `context.filename` property. This patch
can be removed once the plugin is updated to support ESLint v10.

**Related:**

- ESLint v10.0.0 deprecated `context.getFilename()` in favor of `context.filename`

Copilot AI Feb 7, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README states that ESLint v10.0.0 “deprecated” context.getFilename() (line 25), but in v10 it was removed; the deprecation happened earlier. Please reword this section to avoid contradicting the earlier statement that it was removed in v10 (e.g., “Removed in ESLint v10 in favor of context.filename”).

Suggested change
- ESLint v10.0.0 deprecated `context.getFilename()` in favor of `context.filename`
- Removed in ESLint v10.0.0 in favor of `context.filename`

Copilot uses AI. Check for mistakes.
13 changes: 13 additions & 0 deletions patches/eslint-plugin-case-police@2.1.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/dist/index.cjs b/dist/index.cjs
index e2fd6fcc92634706ef0d1c316eb6194cdca27464..528a5c58490e921c6a60d45e46e7fadacc1ae8bc 100644
--- a/dist/index.cjs
+++ b/dist/index.cjs
@@ -115,7 +115,7 @@ const stringCheck = createEslintRule({
};
const dict = loadDict(options);
const code = context.sourceCode.text;
- const extension = node_path.extname(context.getFilename());
+ const extension = node_path.extname(context.filename);
const isMarkdown = extension === ".md" || extension === ".mdx";
const checkText = (node) => {
const start = node.range[0];
9 changes: 7 additions & 2 deletions pnpm-lock.yaml

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