Files
dewedev/node_modules/fork-ts-checker-webpack-plugin/lib/eslint-reporter/EsLintReporterConfiguration.js
dwindown 7f2dd5260f Initial commit: Developer Tools MVP with visual editor
- Complete React app with 7 developer tools
- JSON Tool with visual structured editor
- Serialize Tool with visual structured editor
- URL, Base64, CSV/JSON, Beautifier, Diff tools
- Responsive navigation with dropdown menu
- Dark/light mode toggle
- Mobile-responsive design with sticky header
- All tools working with copy/paste functionality
2025-08-02 09:31:26 +07:00

27 lines
1.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
function castToArray(value) {
if (!value) {
return [];
}
else if (!Array.isArray(value)) {
return [value];
}
else {
return value;
}
}
function createEsLintReporterConfiguration(compiler, options) {
const filesPatterns = (typeof options === 'object' ? castToArray(options.files) : []).map((filesPattern) =>
// ensure that `filesPattern` is an absolute path
path_1.isAbsolute(filesPattern)
? filesPattern
: path_1.join(compiler.options.context || process.cwd(), filesPattern));
return Object.assign(Object.assign({ enabled: !!options &&
typeof options !== 'boolean' &&
filesPatterns.length > 0 && // enable by default if files are provided
options.enabled !== false, memoryLimit: 2048 }, (typeof options === 'object' ? options : {})), { files: filesPatterns, options: Object.assign({ cwd: compiler.options.context || process.cwd(), extensions: ['.ts', '.tsx', '.js', '.jsx'] }, (typeof options === 'object' ? options.options || {} : {})) });
}
exports.createEsLintReporterConfiguration = createEsLintReporterConfiguration;