mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-27 16:26:50 +01:00
11 lines
353 B
JavaScript
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 }
|