Revision bef1da1ba33bd1d7a15556a2bd1e7df0b8013da5 authored by TypeScript Bot on 07 December 2022, 18:05:05 UTC, committed by TypeScript Bot on 07 December 2022, 18:05:05 UTC
1 parent 9c00001
Raw File
.eslintplugin.js
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))];
    })),
}
back to top