Repository navigation
feat(oxlint-config): add flat-layers config - #218
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #217.
A new
flat-layersconfig with one rule,trigen/flat-layers, for apps laid out by theflat-layers-designskill.The rule resolves every import with
oxc-resolver, a new dependency, which reads the tsconfig's paths, so it knows no alias by heart. It then locates both files underroot(an option,appby default) and checks:uikittakesservicesas types alone, andassetsgo touikit,blocksandpages.index, except for the entry points imported by their path:skeleton,loadable,*.module.cssand*.mock.*. Anindexthat re-exports one of them is reported.plant.tsimportingplant.list.ts.uikit/sharedimported from outsideuikit.use*function outside a.jsx/.tsxfile, ahooks.*file or ahooks/folder, where the rules of hooks don't find it.hooksFilesnow takeshooks.{js,ts}and nestedhooks/folders, to match.UIKit/ButtonorBlocks/GardenCard, or with the file's name at a layer's root.The rule does not see an import whose specifier is computed, or a hook declared other than as a function declaration or a function assigned to a variable.
The rule tester now writes nested folders.
On plant1t-web: 17 findings in 0.7 s:
.tsmodules;PhotoFieldandTextEditor;🤖 Generated with Claude Code