Skip to content

Commit

Permalink
[heft-lint] Set eslint-bulk config path environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dmichon-msft committed Dec 19, 2024
1 parent 9da57d4 commit 69a09a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft-lint-plugin",
"comment": "Speed up heft-lint-plugin by telling eslint-bulk-suppressions exactly where to find the config file.",
"type": "patch"
}
],
"packageName": "@rushstack/heft-lint-plugin"
}
2 changes: 2 additions & 0 deletions heft-plugins/heft-lint-plugin/src/Eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See LICENSE in the project root for license information.

import * as crypto from 'crypto';
import * as path from 'path';
import * as semver from 'semver';
import type * as TTypescript from 'typescript';
import type * as TEslint from 'eslint';
Expand Down Expand Up @@ -100,6 +101,7 @@ export class Eslint extends LinterBase<TEslint.ESLint.LintResult> {
};
}

process.env.ESLINT_BULK_ESLINTRC_FOLDER_PATH = path.dirname(linterConfigFilePath);
this._linter = new eslintPackage.ESLint({
cwd: buildFolderPath,
overrideConfigFile: linterConfigFilePath,
Expand Down

0 comments on commit 69a09a1

Please sign in to comment.