0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 00:47:50 +01:00
posthog/eslint-rules/index.js

11 lines
353 B
JavaScript
Raw Permalink Normal View History

2023-10-26 13:11:38 +02:00
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 }