@rushstack/eslint-patch
Advanced tools
+12
-0
@@ -5,2 +5,14 @@ { | ||
| { | ||
| "version": "1.14.0", | ||
| "tag": "@rushstack/eslint-patch_v1.14.0", | ||
| "date": "Mon, 13 Oct 2025 15:13:02 GMT", | ||
| "comments": { | ||
| "minor": [ | ||
| { | ||
| "comment": "Bump `eslint` to `~9.37.0` and the `@typescript-eslint/*` packages to `~8.46.0`." | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| { | ||
| "version": "1.13.0", | ||
@@ -7,0 +19,0 @@ "tag": "@rushstack/eslint-patch_v1.13.0", |
+8
-1
| # Change Log - @rushstack/eslint-patch | ||
| This log was last generated on Fri, 03 Oct 2025 20:09:59 GMT and should not be manually modified. | ||
| This log was last generated on Mon, 13 Oct 2025 15:13:02 GMT and should not be manually modified. | ||
| ## 1.14.0 | ||
| Mon, 13 Oct 2025 15:13:02 GMT | ||
| ### Minor changes | ||
| - Bump `eslint` to `~9.37.0` and the `@typescript-eslint/*` packages to `~8.46.0`. | ||
| ## 1.13.0 | ||
@@ -6,0 +13,0 @@ Fri, 03 Oct 2025 20:09:59 GMT |
@@ -21,3 +21,4 @@ "use strict"; | ||
| '8.57.0', | ||
| '9.25.1' | ||
| '9.25.1', | ||
| '9.37.0' | ||
| ]); | ||
@@ -24,0 +25,0 @@ function getEslintPathAndVersion(packagePath) { |
@@ -8,4 +8,6 @@ export declare const ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME: 'RUSHSTACK_ESLINT_BULK_PATCH_PATH'; | ||
| export declare const VSCODE_PID_ENV_VAR_NAME: 'VSCODE_PID'; | ||
| export declare const ESLINT_BULK_STDOUT_START_DELIMETER: 'RUSHSTACK_ESLINT_BULK_START'; | ||
| export declare const ESLINT_BULK_STDOUT_END_DELIMETER: 'RUSHSTACK_ESLINT_BULK_END'; | ||
| export declare const ESLINT_PACKAGE_NAME_ENV_VAR_NAME: '_RUSHSTACK_ESLINT_PACKAGE_NAME'; | ||
| export declare const BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME: string; | ||
| //# sourceMappingURL=constants.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME = exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME = exports.VSCODE_PID_ENV_VAR_NAME = exports.ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME = exports.ESLINT_BULK_DETECT_ENV_VAR_NAME = exports.ESLINT_BULK_PRUNE_ENV_VAR_NAME = exports.ESLINT_BULK_ENABLE_ENV_VAR_NAME = exports.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME = exports.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME = void 0; | ||
| exports.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME = exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME = exports.ESLINT_BULK_STDOUT_END_DELIMETER = exports.ESLINT_BULK_STDOUT_START_DELIMETER = exports.VSCODE_PID_ENV_VAR_NAME = exports.ESLINT_BULK_FORCE_REGENERATE_PATCH_ENV_VAR_NAME = exports.ESLINT_BULK_DETECT_ENV_VAR_NAME = exports.ESLINT_BULK_PRUNE_ENV_VAR_NAME = exports.ESLINT_BULK_ENABLE_ENV_VAR_NAME = exports.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME = exports.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME = void 0; | ||
| exports.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME = 'RUSHSTACK_ESLINT_BULK_PATCH_PATH'; | ||
@@ -15,4 +15,6 @@ exports.ESLINT_BULK_SUPPRESS_ENV_VAR_NAME = 'RUSHSTACK_ESLINT_BULK_SUPPRESS'; | ||
| exports.VSCODE_PID_ENV_VAR_NAME = 'VSCODE_PID'; | ||
| exports.ESLINT_BULK_STDOUT_START_DELIMETER = 'RUSHSTACK_ESLINT_BULK_START'; | ||
| exports.ESLINT_BULK_STDOUT_END_DELIMETER = 'RUSHSTACK_ESLINT_BULK_END'; | ||
| exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME = '_RUSHSTACK_ESLINT_PACKAGE_NAME'; | ||
| exports.BULK_SUPPRESSIONS_CLI_ESLINT_PACKAGE_NAME = (_a = process.env[exports.ESLINT_PACKAGE_NAME_ENV_VAR_NAME]) !== null && _a !== void 0 ? _a : 'eslint'; | ||
| //# sourceMappingURL=constants.js.map |
@@ -21,3 +21,5 @@ "use strict"; | ||
| } | ||
| const majorVersion = parseInt(eslintPackageVersion, 10); | ||
| const [majorVersionString, minorVersionString] = eslintPackageVersion.split('.'); | ||
| const majorVersion = parseInt(majorVersionString, 10); | ||
| const minorVersion = parseInt(minorVersionString, 10); | ||
| const inputFile = node_fs_1.default.readFileSync(inputFilePath).toString(); | ||
@@ -147,3 +149,8 @@ let inputIndex = 0; | ||
| if (majorVersion >= 9) { | ||
| outputFile += scanUntilMarker('const emitter = createEmitter();'); | ||
| if (minorVersion >= 37) { | ||
| outputFile += scanUntilMarker('const visitor = new SourceCodeVisitor();'); | ||
| } | ||
| else { | ||
| outputFile += scanUntilMarker('const emitter = createEmitter();'); | ||
| } | ||
| outputFile += ` | ||
@@ -154,3 +161,3 @@ // --- BEGIN MONKEY PATCH --- | ||
| } | ||
| // Match this: | ||
| // Match this (9.25.1): | ||
| // ``` | ||
@@ -172,5 +179,19 @@ // if (reportTranslator === null) { | ||
| // ``` | ||
| // Or this (9.37.0): | ||
| // ``` | ||
| // const problem = report.addRuleMessage( | ||
| // ruleId, | ||
| // severity, | ||
| // ...args, | ||
| // ); | ||
| // | ||
| // Convert to something like this: | ||
| // if (problem.fix && !(rule.meta && rule.meta.fixable)) { | ||
| // throw new Error( | ||
| // 'Fixable rules must set the `meta.fixable` property to "code" or "whitespace".', | ||
| // ); | ||
| // } | ||
| // ``` | ||
| // | ||
| // Convert to something like this (9.25.1): | ||
| // ``` | ||
| // if (reportTranslator === null) { | ||
@@ -194,3 +215,29 @@ // reportTranslator = createReportTranslator({ | ||
| // ``` | ||
| outputFile += scanUntilMarker('const problem = reportTranslator(...args);'); | ||
| // Or this (9.37.0): | ||
| // ``` | ||
| // const problem = report.addRuleMessage( | ||
| // ruleId, | ||
| // severity, | ||
| // ...args, | ||
| // ); | ||
| // // --- BEGIN MONKEY PATCH --- | ||
| // if (bulkSuppressionsPatch.shouldBulkSuppress({ filename, currentNode: args[0]?.node ?? currentNode, ruleId, problem })) return; | ||
| // // --- END MONKEY PATCH --- | ||
| // | ||
| // if (problem.fix && !(rule.meta && rule.meta.fixable)) { | ||
| // throw new Error( | ||
| // 'Fixable rules must set the `meta.fixable` property to "code" or "whitespace".', | ||
| // ); | ||
| // } | ||
| // ``` | ||
| if (majorVersion >= 9 && minorVersion >= 37) { | ||
| outputFile += scanUntilMarker('const problem = report.addRuleMessage('); | ||
| outputFile += scanUntilMarker('ruleId,'); | ||
| outputFile += scanUntilMarker('severity,'); | ||
| outputFile += scanUntilMarker('...args,'); | ||
| outputFile += scanUntilMarker(');'); | ||
| } | ||
| else { | ||
| outputFile += scanUntilMarker('const problem = reportTranslator(...args);'); | ||
| } | ||
| outputFile += ` | ||
@@ -208,3 +255,3 @@ // --- BEGIN MONKEY PATCH --- | ||
| // | ||
| // Convert to something like this: | ||
| // Convert to something like this (9.25.1): | ||
| // ``` | ||
@@ -218,2 +265,11 @@ // Object.keys(ruleListeners).forEach(selector => { | ||
| // ``` | ||
| // Or this (9.37.0): | ||
| // ``` | ||
| // Object.keys(ruleListeners).forEach(selector => { | ||
| // // --- BEGIN MONKEY PATCH --- | ||
| // visitor.add(selector, (...args) => { currentNode = args[args.length - 1]; }); | ||
| // // --- END MONKEY PATCH --- | ||
| // ... | ||
| // }); | ||
| // ``` | ||
| if (majorVersion >= 9) { | ||
@@ -223,3 +279,10 @@ outputFile += scanUntilMarker('Object.keys(ruleListeners).forEach(selector => {'); | ||
| // --- BEGIN MONKEY PATCH --- | ||
| emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; }); | ||
| `; | ||
| if (minorVersion >= 37) { | ||
| outputFile += `visitor.add(selector, (...args) => { currentNode = args[args.length - 1]; });`; | ||
| } | ||
| else { | ||
| outputFile += `emitter.on(selector, (...args) => { currentNode = args[args.length - 1]; });`; | ||
| } | ||
| outputFile += ` | ||
| // --- END MONKEY PATCH ---`; | ||
@@ -226,0 +289,0 @@ } |
@@ -22,4 +22,2 @@ "use strict"; | ||
| } | ||
| const startDelimiter = 'RUSHSTACK_ESLINT_BULK_START'; | ||
| const endDelimiter = 'RUSHSTACK_ESLINT_BULK_END'; | ||
| const configuration = { | ||
@@ -35,3 +33,3 @@ /** | ||
| }; | ||
| console.log(startDelimiter + JSON.stringify(configuration) + endDelimiter); | ||
| console.log(constants_1.ESLINT_BULK_STDOUT_START_DELIMETER + JSON.stringify(configuration) + constants_1.ESLINT_BULK_STDOUT_END_DELIMETER); | ||
| } | ||
@@ -38,0 +36,0 @@ function getPathToLinterJS() { |
+4
-4
| { | ||
| "name": "@rushstack/eslint-patch", | ||
| "version": "1.13.0", | ||
| "version": "1.14.0", | ||
| "description": "Enhance ESLint with better support for large scale monorepos", | ||
@@ -29,9 +29,9 @@ "main": "lib/usage.js", | ||
| "devDependencies": { | ||
| "@rushstack/heft": "1.0.0", | ||
| "@rushstack/heft": "1.1.0", | ||
| "@types/eslint-8": "npm:@types/eslint@8.56.10", | ||
| "@types/eslint-9": "npm:@types/eslint@9.6.1", | ||
| "@typescript-eslint/types": "~8.31.0", | ||
| "@typescript-eslint/types": "~8.46.0", | ||
| "eslint-8": "npm:eslint@~8.57.0", | ||
| "eslint-9": "npm:eslint@~9.25.1", | ||
| "eslint": "~9.25.1", | ||
| "eslint": "~9.37.0", | ||
| "typescript": "~5.8.2", | ||
@@ -38,0 +38,0 @@ "decoupled-local-node-rig": "1.0.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
281694
2.44%2603
3.09%30
-6.25%