0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
posthog/eslint-rules/index.js
2023-10-26 12:11:38 +01:00

11 lines
353 B
JavaScript

const { readdirSync } = require('fs')
const { basename } = require('path')
const ruleFiles = readdirSync('eslint-rules').filter(
(file) => file.endsWith('.js') && file !== 'index.js' && !file.endsWith('test.js')
)
const rules = Object.fromEntries(ruleFiles.map((file) => [basename(file, '.js'), require('./' + file)]))
module.exports = { rules }