This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const semver = __importStar(require("semver"));
function assertEsLintSupport(configuration) {
if (semver.lt(process.version, '8.10.0')) {
throw new Error(`To use 'eslint' option, please update to Node.js >= v8.10.0 ` +
`(current version is ${process.version})`);
}
let eslintVersion;
try {
eslintVersion = require('eslint').Linter.version;
}
catch (error) {
throw new Error(`When you use 'eslint' option, make sure to install 'eslint'.`);
}
if (semver.lt(eslintVersion, '6.0.0')) {
throw new Error(`Cannot use current eslint version of ${eslintVersion}, the minimum required version is 6.0.0`);
}
if (!configuration.files) {
throw new Error('The `eslint.files` settings is required for EsLint reporter to work.');
}
}
exports.assertEsLintSupport = assertEsLintSupport;