midnight-smoker icon indicating copy to clipboard operation
midnight-smoker copied to clipboard

feat: add a plugin system

Open boneskull opened this issue 2 years ago • 3 comments

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

boneskull avatar Oct 10 '23 02:10 boneskull

  • #402 Graphite: 3 dependent PRs (#403 Graphite, #533 Graphite, #537 Graphite) 👈
  • #504 Graphite: 1 other dependent PR (#499 Graphite)
  • main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @boneskull and the rest of your teammates on Graphite Graphite

boneskull avatar Oct 10 '23 02:10 boneskull

👍 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.

View full report↗︎

socket-security[bot] avatar Jan 21 '24 05:01 socket-security[bot]

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@humanwhocodes/[email protected] None 0 206 kB nzakas
npm/@stylistic/[email protected] None +7 1.44 MB eslint-stylistic-bot
npm/@stylistic/[email protected] Transitive: filesystem +34 3.9 MB eslint-stylistic-bot
npm/@swc/[email protected] environment, filesystem, shell +12 401 MB kdy1
npm/@tsconfig/[email protected] None 0 2.36 kB typescript-deploys
npm/@types/[email protected] None 0 12.9 kB types
npm/@types/[email protected] None 0 4.14 kB types
npm/@types/[email protected] None 0 4.67 kB types
npm/@types/[email protected] None 0 862 kB types
npm/@types/[email protected] None +1 2.16 MB types
npm/@types/[email protected] None 0 5.88 kB types
npm/@types/[email protected] Transitive: environment +20 4.75 MB types
npm/@types/[email protected] None 0 6.97 kB types
npm/@types/[email protected] None +1 68.8 kB types
npm/[email protected] None 0 0 B
npm/[email protected] filesystem, unsafe Transitive: environment, shell +52 4.32 MB oss-bot
npm/[email protected] None 0 62.2 kB andidittrich
npm/[email protected] Transitive: environment +1 91.3 kB speedytwenty
npm/[email protected] None 0 1 MB nodejs-foundation
npm/[email protected] None +6 5.42 MB wooorm
npm/[email protected] environment, filesystem Transitive: eval, unsafe +10 2.33 MB ota-meshi
npm/[email protected] None +4 1.3 MB lo1tuma
npm/[email protected] Transitive: environment, filesystem +35 4.28 MB azat-io
npm/[email protected] None 0 90.5 kB boneskull
npm/[email protected] None +1 43.1 kB ljharb
npm/[email protected] Transitive: eval +15 302 kB ljharb
npm/[email protected] environment Transitive: filesystem, shell, unsafe +80 5.65 MB webpro
npm/[email protected] Transitive: environment, filesystem, shell +47 1.96 MB okonet
npm/[email protected] Transitive: environment, filesystem +34 4.06 MB davidanson
npm/[email protected] None +5 8.17 MB streamich
npm/[email protected] environment +2 453 kB isaacs
npm/[email protected] None +10 1 MB npm-cli-ops
npm/[email protected] environment, filesystem Transitive: shell +12 386 kB bret
npm/[email protected] environment Transitive: filesystem +4 5.28 MB fredkschott
npm/[email protected] Transitive: network +14 763 kB ariaminaei
npm/[email protected] None +3 16.4 kB sindresorhus
npm/[email protected] None +3 24.9 kB sindresorhus
npm/[email protected] environment, shell 0 45.4 kB 43081j
npm/[email protected] Transitive: environment, filesystem +70 48.9 MB sindresorhus
npm/[email protected] Transitive: filesystem +28 241 MB hirokiosame
npm/[email protected] None 0 366 kB sindresorhus
npm/[email protected] None 0 22.4 MB typescript-bot
npm/[email protected] None 0 656 kB boneskull
npm/[email protected] None 0 1.66 MB xstate-release-bot
npm/[email protected] None 0 160 kB stefan-terdell

🚮 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]

View full report↗︎

socket-security[bot] avatar Mar 14 '24 22:03 socket-security[bot]