mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 09:24:19 -06:00
13 lines
392 B
TypeScript
13 lines
392 B
TypeScript
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const rulesDir = path.join(__dirname, "scripts", "eslint", "rules");
|
|
const ext = ".cjs";
|
|
const ruleFiles = fs.readdirSync(rulesDir).filter((p) => p.endsWith(ext));
|
|
|
|
module.exports = {
|
|
rules: Object.fromEntries(ruleFiles.map((p) => {
|
|
return [p.slice(0, -ext.length), require(path.join(rulesDir, p))];
|
|
})),
|
|
}
|