Code Monkey home page Code Monkey logo

Comments (42)

emmanuelchucks avatar emmanuelchucks commented on September 24, 2024 11

Expo (expo.dev)

from knip.

netner-d avatar netner-d commented on September 24, 2024 4

Serverless framework (1 183 585 downloads a week). It uses serverless.yml files for config and includes :

  • Plugins (docs/eg)
  • Serverless function definitions, so entries (docs/eg, under functions.*.handler field)

from knip.

sifferhans avatar sifferhans commented on September 24, 2024 4

Would it be possible to create a Nuxt plugin? Nuxt heavily uses auto-imports, so I imagine it could be harder to trace down what is being used.

from knip.

shawnmcknight avatar shawnmcknight commented on September 24, 2024 4

I'd like to request support for rspack. Since rspack's configuration is roughly equivalent to webpack's configuration, it's possible that the webpack plugin could either be cloned or just tweaked to accommodate rspack instead.

I actually tried just changing the knip.json file to have the webpack plugin point to the rspack configuration file and it worked fine with one exception. The rspack configuration allows specification of a builtin: prefix on the loader property (see here) and an "Unlisted dependency" of builtin:swc-loader is being reported by knip.

So, I think it's possible that the webpack plugin could simply be adjusted to:

  • Change the detection to include @rspack/core and @rspack/cli as the enablers
  • Add rspack.config*.{js,ts,mjs,cjs,mts,cts} as valid config files
  • Ignore loaders prefixed with builtin:

from knip.

webpro avatar webpro commented on September 24, 2024 3

Ladle (#268)

from knip.

Faithfinder avatar Faithfinder commented on September 24, 2024 3

NestJS, maybe?

It's very class based, so it would be focused on classMembers rules.

It would need to detect usage of class members by decorators, basically - e.g, something decorated with @ResolveField is used.

from knip.

auvred avatar auvred commented on September 24, 2024 3

Docusaurus - https://docusaurus.io/

from knip.

birtles avatar birtles commented on September 24, 2024 2

React cosmos

Includes:

/cc @ovidiuch

from knip.

birtles avatar birtles commented on September 24, 2024 2

Since some of you have requested plugins for React Cosmos and Rspack, let's make it happen. Would be great if you could share and show some support with a one-time sponsorship?

@birchill has just made a one time sponsorship to see this happen. Hopefully others can join in too!

from knip.

webpro avatar webpro commented on September 24, 2024 2

Added plugins:

  • React Cosmos
  • Rspack
  • Rsbuild (placeholder)

Not yet GA. Can be tested with npm i -D https://pkg.pr.new/knip@2de3924 (or any package manager). Would be very useful if you could try it out to increase coverage and improve the plugins.

Please file bugs in new GitHub issues.

from knip.

webpro avatar webpro commented on September 24, 2024 2

Added a few plugins in v5.28.0:

NOTE: the Nuxt plugin has no support for auto-import magic, except for defineNuxtConfig (to prevent insta-throw/offs). Should probably add a warning on the plugin page.

from knip.

webpro avatar webpro commented on September 24, 2024 1

@justingrant Please file a separate issue for this (as it's not a plugin).

from knip.

webpro avatar webpro commented on September 24, 2024 1

Please don't dump words here. It'll be a lot more convincing if you'd be more precise and provide one or two links to the library and/or configuration pages to avoid any ambiguity.

from knip.

netner-d avatar netner-d commented on September 24, 2024 1

Please don't dump words here. It'll be a lot more convincing if you'd be more precise and provide one or two links to the library and/or configuration pages to avoid any ambiguity.

Yeah, absolutely sorry about that, I thought it was the method to collect people opinion as I saw similar comments above... I'm rectifying

from knip.

webpro avatar webpro commented on September 24, 2024 1

Just saying, for anyone interested, it's now more fun and easier than ever to write a plugin: https://knip.dev/guides/writing-a-plugin

from knip.

webpro avatar webpro commented on September 24, 2024 1

Ionic (#604)

from knip.

webpro avatar webpro commented on September 24, 2024 1

Plugins added recently:

from knip.

webpro avatar webpro commented on September 24, 2024 1

Knip v5.21.0 contains a few new plugins:

Especially the latter is a bit rudimentary, feel free to open issues if you have any!

from knip.

Suver1 avatar Suver1 commented on September 24, 2024 1

Similar to rspack, I'd like plugin support for rsbuild:
https://rsbuild.dev/guide/start/index
https://github.com/web-infra-dev/rsbuild

from knip.

shawnmcknight avatar shawnmcknight commented on September 24, 2024 1

Since some of you have requested plugins for React Cosmos and Rspack, let's make it happen. Would be great if you could share and show some support with a one-time sponsorship? 🙏 I can work on the 2 plugins in the coming weekend.

@STORIS does its sponsorships as recurring monthly rather than one-time. A monthly recurring contribution through open collective has been added, although there's no condition for that with respect to the plugin request.

from knip.

birtles avatar birtles commented on September 24, 2024 1

Can be tested with npm i -D https://pkg.pr.new/knip@2de3924 (or any package manager). Would be very useful if you could try it out to increase coverage and improve the plugins.

Works great for me. Thank you!

from knip.

webpro avatar webpro commented on September 24, 2024 1

Re. Nuxt plugin: Usually "auto-imports" might be hard to track indeed during static or even dynamic analysis.

In general not doing much of new features myself at the moment. Sponsored might be an option (DM me). Open to pull requests!

from knip.

webpro avatar webpro commented on September 24, 2024

Vike (#275)

from knip.

webpro avatar webpro commented on September 24, 2024

WebdriverIO (#464)

from knip.

justingrant avatar justingrant commented on September 24, 2024

Not sure if this is a plugin or core, but support for .mdx files. (used by Storybook and other docs generators)

from knip.

webpro avatar webpro commented on September 24, 2024

tsd (#535)

from knip.

DaniFoldi avatar DaniFoldi commented on September 24, 2024

wrangler
ideas: find wrangler.toml/json and set main as entrypoint, and exclude from unused dependencies

from knip.

guy-borderless avatar guy-borderless commented on September 24, 2024

is deno compat a plugin? If so, what would it take? Deno uses the web standard import_map.json

from knip.

bbeesley avatar bbeesley commented on September 24, 2024

I was gonna request xo, but I've just opened a PR for it instead since I was interested in how they work.
#621

from knip.

tmm avatar tmm commented on September 24, 2024

size-limit (and related packages @size-limit/*)

from knip.

webpro avatar webpro commented on September 24, 2024

For everyone interested in support for Expo, please see #126. Looking for feedback!

from knip.

jerone avatar jerone commented on September 24, 2024

lockfile linting

lint lockfiles for improved security and trust policies

https://github.com/lirantal/lockfile-lint
https://github.com/lirantal/lockfile-lint/blob/main/packages/lockfile-lint/README.md

from knip.

webpro avatar webpro commented on September 24, 2024

lockfile linting

lint lockfiles for improved security and trust policies

https://github.com/lirantal/lockfile-lint https://github.com/lirantal/lockfile-lint/blob/main/packages/lockfile-lint/README.md

I guess a file-based configuration for the lockfile-lint package potentially leaves e.g. lockfile-lint.js as an unused file. The lockfile-lint configuration doesn't seem to contain options that can reference other packages or files, so a plugin doesn't add much other than Knip users not having to add !lockfile-lint.js to project: [] (or alternatively not having to add lockfile-lint.js to ignore: []). Maybe Knip should have another more light-weight type of plugins that basically just ignores this type of configuration files.

(For completeness sake: the act of linting lockfiles is outside the scope of Knip, and apparently there's a package that does exactly that.)

from knip.

jerone avatar jerone commented on September 24, 2024

I guess a file-based configuration for the lockfile-lint package potentially leaves e.g. lockfile-lint.js as an unused file.

Correct. That was the reason for creating this suggestion.

The lockfile-lint configuration doesn't seem to contain options that can reference other packages or files [..]

Also correct. It's just an configuration file. It references no other dependencies/extension/extends/plugins/etc...

[..] so a plugin doesn't add much other than Knip users not having to add !lockfile-lint.js to project: [] (or alternatively not having to add lockfile-lint.js to ignore: []).

Yes, adding it to the ignore setting is my current "work-around".

Maybe Knip should have another more light-weight type of plugins that basically just ignores this type of configuration files.

Lockfile-linting uses https://github.com/cosmiconfig/cosmiconfig (v8) for their config file, as do many other tooling. Maybe these config files can be ignored by default somehow.

Sadly, custom local plugins are not on the roadmap. But the ignore setting is sufficient in this case.

Keep up the great work! 🇳🇱

from knip.

webpro avatar webpro commented on September 24, 2024

Since some of you have requested plugins for React Cosmos and Rspack, let's make it happen. Would be great if you could share and show some support with a one-time sponsorship? 🙏 I can work on the 2 plugins in the coming weekend.

Rsbuild should have lower threshold after that.

from knip.

webpro avatar webpro commented on September 24, 2024

@birtles @birchill @shawnmcknight @STORIS Thank you so much! Truly appreciated.

from knip.

silverwind avatar silverwind commented on September 24, 2024

Makefile:

lint:
	npx eslint

Should mark eslint as used. I would say this should be core functionality, e.g not a plugin.

from knip.

BMFreed avatar BMFreed commented on September 24, 2024

@webpro I know this was already requested, but are there plans to add a Nuxt plugin?

from knip.

BMFreed avatar BMFreed commented on September 24, 2024

Re. Nuxt plugin: Usually "auto-imports" might be hard to track indeed during static or even dynamic analysis.

In general not doing much of new features myself at the moment. Sponsored might be an option (DM me). Open to pull requests!

Thank you for your reply!

from knip.

with-heart avatar with-heart commented on September 24, 2024

preconstruct allows multiple entrypoints to be defined in a package's package.json file. Standalone entrypoints currently have to be manually defined using entry.

from knip.

webpro avatar webpro commented on September 24, 2024

VitePress (Site Config)

from knip.

webpro avatar webpro commented on September 24, 2024

Karma (Configuration File)

from knip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.