feature-sliced / steiger

Universal file structure and project architecture linter
https://www.npmjs.com/package/steiger
MIT License
18 stars 0 forks source link

Feature request: import self-written rules #35

Open noveogroup-amorgunov opened 3 weeks ago

noveogroup-amorgunov commented 3 weeks ago

Hey. I have a feature request: I want to write rules for my project and i import them via config.

It could look like:

import { defineConfig } from 'steiger'
import rules from '...'

export default defineConfig({
  preset: [...rules]
})
illright commented 3 weeks ago

Also tracked by #27

illright commented 3 weeks ago

Bringing #33 in this discussion, I think a flat config would enable this use case quite elegantly. This is definitely something we want to support, but before we get there, we need to create a toolkit for writing custom rules. The specifics of this toolkit are again to be defined :D it would probably include things like findAllRecursively

noveogroup-amorgunov commented 2 weeks ago

I think a flat config would enable this use case quite elegantly.

I like flat config +1

This is definitely something we want to support, but before we get there, we need to create a toolkit for writing custom rules

I think https://github.com/feature-sliced/filesystem can provide some helpers to write own rules within the FSD. For another methodologies, I think it will be possible to discuss the next step