midnight-smoker
midnight-smoker copied to clipboard
feat: add a plugin system
This adds a plugin system so we can separate things like rules (and eventually package manager implementations from the main codebase), and others can write custom plugins providing the same.
All rules have moved into the @midnight-smoker/plugin-default package.
Pluginable Things
- Package managers
- Rules
- Reporters
Limitations
Plugins currently cannot interact with each other nor declare dependencies on other plugins. Eventually I imagine someone might want to, say, override a rule.
TODO
- [x] List of plugins to load must be user-specified. Probably unwise to attempt automatic discovery (or make it opt-in). This will necessarily invoke multiple passes through options validation.
- [x] Rules created by 3rd party plugins must be scoped to the plugin name.
- [x] Need to assert the plugin name matches the package name.
- [ ] Docs
- [ ] Plugin guide
- [ ] Usage guide
- [x] Getting started guide
- [ ] Rules reference
- [x] CLI reference
- [ ] Config reference
- [ ] Anything else in the milestone
Future
- Plugins should be allowed to define command-line options
This stack of pull requests is managed by Graphite. Learn more about stacking.
Join @boneskull and the rest of your teammates on
Graphite
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎
This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@tsconfig/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]