|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | var __importStar = (this && this.__importStar) || function (mod) {
|
|---|
| 3 | if (mod && mod.__esModule) return mod;
|
|---|
| 4 | var result = {};
|
|---|
| 5 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|---|
| 6 | result["default"] = mod;
|
|---|
| 7 | return result;
|
|---|
| 8 | };
|
|---|
| 9 | Object.defineProperty(exports, "__esModule", { value: true });
|
|---|
| 10 | const semver = __importStar(require("semver"));
|
|---|
| 11 | function assertEsLintSupport(configuration) {
|
|---|
| 12 | if (semver.lt(process.version, '8.10.0')) {
|
|---|
| 13 | throw new Error(`To use 'eslint' option, please update to Node.js >= v8.10.0 ` +
|
|---|
| 14 | `(current version is ${process.version})`);
|
|---|
| 15 | }
|
|---|
| 16 | let eslintVersion;
|
|---|
| 17 | try {
|
|---|
| 18 | eslintVersion = require('eslint').Linter.version;
|
|---|
| 19 | }
|
|---|
| 20 | catch (error) {
|
|---|
| 21 | throw new Error(`When you use 'eslint' option, make sure to install 'eslint'.`);
|
|---|
| 22 | }
|
|---|
| 23 | if (semver.lt(eslintVersion, '6.0.0')) {
|
|---|
| 24 | throw new Error(`Cannot use current eslint version of ${eslintVersion}, the minimum required version is 6.0.0`);
|
|---|
| 25 | }
|
|---|
| 26 | if (!configuration.files) {
|
|---|
| 27 | throw new Error('The `eslint.files` settings is required for EsLint reporter to work.');
|
|---|
| 28 | }
|
|---|
| 29 | }
|
|---|
| 30 | exports.assertEsLintSupport = assertEsLintSupport;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.