@o3r/core
Version:
Core of the Otter Framework
19 lines • 571 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isUsingLegacyConfig = void 0;
/**
* Is the ESLint legacy config used in the repository
* @param tree
*/
const isUsingLegacyConfig = (tree) => {
const linterPackageName = 'eslint';
try {
require.resolve(`${linterPackageName}/package.json`);
}
catch {
return false;
}
return !!tree.root.subfiles.some((file) => /\.eslintrc\.(?:json|js|ya?ml)?$/.test(file));
};
exports.isUsingLegacyConfig = isUsingLegacyConfig;
//# sourceMappingURL=index.js.map