source: frontend/node_modules/@rushstack/eslint-patch/lib-commonjs/eslint-bulk-suppressions/index.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.6 KB
Line 
1"use strict";
2// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
3// See LICENSE in the project root for license information.
4Object.defineProperty(exports, "__esModule", { value: true });
5const _patch_base_1 = require("../_patch-base");
6const path_utils_1 = require("./path-utils");
7const bulk_suppressions_patch_1 = require("./bulk-suppressions-patch");
8const generate_patched_file_1 = require("./generate-patched-file");
9const constants_1 = require("./constants");
10if (!_patch_base_1.eslintFolder) {
11 console.error('@rushstack/eslint-patch/eslint-bulk-suppressions: Could not find ESLint installation to patch.');
12 process.exit(1);
13}
14const eslintBulkDetectEnvVarValue = process.env[constants_1.ESLINT_BULK_DETECT_ENV_VAR_NAME];
15if (eslintBulkDetectEnvVarValue === 'true' || eslintBulkDetectEnvVarValue === '1') {
16 (0, path_utils_1.findAndConsoleLogPatchPathCli)();
17 process.exit(0);
18}
19const pathToLinterJS = (0, path_utils_1.getPathToLinterJS)();
20process.env[constants_1.ESLINT_BULK_PATCH_PATH_ENV_VAR_NAME] = require.resolve('./bulk-suppressions-patch');
21const pathToGeneratedPatch = (0, path_utils_1.ensurePathToGeneratedPatch)();
22(0, generate_patched_file_1.generatePatchedLinterJsFileIfDoesNotExist)(pathToLinterJS, pathToGeneratedPatch, _patch_base_1.eslintPackageVersion);
23const { Linter: LinterPatch } = require(pathToGeneratedPatch);
24LinterPatch.prototype.verify = (0, bulk_suppressions_patch_1.extendVerifyFunction)(LinterPatch.prototype.verify);
25const { Linter } = require(pathToLinterJS);
26(0, bulk_suppressions_patch_1.patchClass)(Linter, LinterPatch);
27//# sourceMappingURL=index.js.map
Note: See TracBrowser for help on using the repository browser.