Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📌 Tracking issue: comparison with equivalent other tools #42

Open
JoshuaKGoldberg opened this issue Sep 20, 2023 · 5 comments
Open
Labels
area: documentation Improvements or additions to docs

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Sep 20, 2023

Spinning out of #28: I want to make sure that all the nice features that other tools in the ecosystem have are considered in this repository.

👋 If you're a maintainer of any of the referenced packages then please reach out to me (I believe I've emailed you and/or pinged you in your issue tracker). I'd love to work with you on deduplicating rule implementations!

Note that this table is accurate only to my interpretation of each rule's intent - not necessarily their implementation details. For example, this package's valid-package-def might not capture every npm-package-json-lint *-type validation it's mentioned alongside. If you spot a gap in this package I'd encourage you to file a bug or feature request to fill it in.

⚠️ This is a big table and susceptible to human error. Please say something if anything is amiss!

Area emoji key:

  • 🗺️: Schema validation
  • 🧼: Cleanliness
  • 🗜️: Version restrictions
  • 📐: Sorting
  • 🙅: Property restrictions
  • 🧹: Whitespace formatting

Package emoji key:

  • ✅: All equivalent rules have been implemented
  • ✔️: All rules that would be in a recommended preset have been implemented
Area Config This package eslint-plugin-json-files ✔️ eslint-plugin-node-dependencies fixpack npm-package-json-lint ✔️
🗺️ ✔️ #48 compat-engines
🗺️ ✔️ #49 valid-semver
🗺️ ✔️ unique-dependencies require-unique-dependency-names no-dupe-deps no-repeated-dependencies
🗺️ ✔️ valid-local-dependency
🗺️ ✔️ valid-package-def bin-type
🗺️ ✔️ valid-package-def bundledDependencies-type
🗺️ ✔️ valid-package-def config-type
🗺️ ✔️ valid-package-def cpu-type
🗺️ ✔️ valid-package-def dependencies-type
🗺️ ✔️ valid-package-def description-type
🗺️ ✔️ valid-package-def devDependencies-type
🗺️ ✔️ valid-package-def directories-type
🗺️ ✔️ valid-package-def engines-type
🗺️ ✔️ valid-package-def files-type
🗺️ ✔️ valid-package-def homepage-type
🗺️ ✔️ valid-package-def keywords-type
🗺️ ✔️ valid-package-def license-type
🗺️ ✔️ valid-package-def main-type
🗺️ ✔️ valid-package-def man-type
🗺️ ✔️ valid-package-def name-type
🗺️ ✔️ valid-package-def no-duplicate-properties
🗺️ ✔️ valid-package-def optionalDependencies-type
🗺️ ✔️ valid-package-def os-type
🗺️ ✔️ valid-package-def peerDependencies-type
🗺️ ✔️ valid-package-def preferGlobal-type
🗺️ ✔️ valid-package-def private-type
🗺️ ✔️ valid-package-def repository-type
🗺️ ✔️ valid-package-def scripts-type
🗺️ ✔️ valid-package-def valid-values-author
🗺️ ✔️ valid-package-def valid-values-engines
🗺️ ✔️ valid-package-def valid-values-license
🗺️ ✔️ valid-package-def valid-values-name-scope
🗺️ ✔️ valid-package-def valid-values-private
🗺️ ✔️ valid-package-def valid-values-publishConfig
🗺️ ✔️ valid-package-def version-type
🧼 #51 prefer-scripts
🧼 #51 require-author
🧼 #51 require-bin
🧼 #51 require-bundledDependencies
🧼 #51 require-config
🧼 #51 require-contributors
🧼 #51 require-cpu
🧼 #51 require-devDependencies
🧼 #51 require-directories
🧼 #51 require-files
🧼 #51 require-funding
🧼 #51 require-main
🧼 #51 require-man
🧼 #51 require-module
🧼 #51 require-name
🧼 #51 require-optionalDependencies
🧼 #51 require-os
🧼 #51 require-peerDependencies
🧼 #51 require-preferGlobal
🧼 #51 require-private
🧼 #51 require-publishConfig
🧼 #51 require-scripts
🧼 #51 require-types
🧼 #51 require-typings
🧼 #51 require-version
🧼 #51 require-version
🧼 #51 ✔️ require-bugs
🧼 #51 ✔️ require-dependencies
🧼 #51 ✔️ require-description
🧼 #51 ✔️ require-homepage
🧼 #51 ✔️ require-keywords
🧼 #51 ✔️ require-repository
🧼 #51 ensure-volta-extends
🧼 #51 require-engines require-engines
🧼 #51 require-license ✔️ require-license
🧼 #52 description-format
🧼 ✔️ valid-name name-format
🧼 ✔️ valid-version version-format
🧼 ✔️ valid-repository-directory ensure-repository-directory require-repository-directory
🧼 ✔️ order-properties prefer-property-order
🗜️ #54 no-restricted-dependencies
🗜️ #54 no-restricted-devDependencies
🗜️ #54 no-restricted-pre-release-dependencies
🗜️ #54 no-restricted-pre-release-devDependencies
🗜️ #54 no-branch-in-dependencies
🗜️ #54 restrict-ranges no-archive-dependencies
🗜️ #54 restrict-ranges no-archive-devDependencies
🗜️ #54 restrict-ranges no-caret-version-dependencies
🗜️ #54 restrict-ranges no-caret-version-devDependencies
🗜️ #54 restrict-ranges no-file-dependencies
🗜️ #54 restrict-ranges no-file-devDependencies
🗜️ #54 restrict-ranges no-git-dependencies
🗜️ #54 restrict-ranges no-git-devDependencies
🗜️ #54 restrict-ranges no-tilde-version-dependencies
🗜️ #54 restrict-ranges no-tilde-version-devDependencies
🗜️ #54 restrict-ranges prefer-no-version-zero-dependencies
🗜️ #54 restrict-ranges prefer-no-version-zero-devDependencies
🗜️ #54 restrict-ranges absolute-version no-absolute-version-dependencies
🗜️ #54 restrict-ranges absolute-version no-absolute-version-devDependencies
🗜️ #54 restrict-ranges absolute-version prefer-absolute-version-dependencies
🗜️ #54 restrict-ranges absolute-version prefer-absolute-version-devDependencies
🗜️ #54 restrict-ranges prefer-caret-range-version prefer-caret-version-dependencies
🗜️ #54 restrict-ranges prefer-caret-range-version prefer-caret-version-devDependencies
🗜️ #54 restrict-ranges prefer-tilde-range-version prefer-tilde-version-dependencies
🗜️ #54 restrict-ranges prefer-tilde-range-version prefer-tilde-version-devDependencies
📐 ✔️ sort-collections prefer-alphabetical-bundledDependencies
📐 ✔️ sort-collections prefer-alphabetical-dependencies
📐 ✔️ sort-collections prefer-alphabetical-devDependencies
📐 ✔️ sort-collections prefer-alphabetical-optionalDependencies
📐 ✔️ sort-collections prefer-alphabetical-peerDependencies
📐 ✔️ sort-collections prefer-alphabetical-scripts
🙅 #51 prefer-no-contributors
🙅 #51 prefer-no-dependencies
🙅 #51 prefer-no-devDependencies
🙅 #51 prefer-no-engineStrict
🙅 #51 prefer-no-optionalDependencies
🙅 #51 prefer-no-peerDependencies
🧹 (n/a) ✔️

I also looked at:

@JoshuaKGoldberg
Copy link
Owner Author

As of merging #135, I believe all the recommended-preset-level rules from eslint-plugin-json-files and npm-package-json-lint are implemented here! 🙌

That means JoshuaKGoldberg/create-typescript-app#839 is now unblocked.

@KristjanESPERANTO
Copy link
Contributor

Just an idea: I'm using normalize-package-data in one project. It is not an ESLint package, but it makes some interesting things from which one might draw inspiration 🙂 Or would it be possible to create rules that use this package?

@JoshuaKGoldberg
Copy link
Owner Author

Ooh interesting, I hadn't seen that package. Looks useful!

There might be some use in standardizing files, yeah. #85 is another example of an equivalent package being mentioned as something we may want in this repo. I'd suggest the same thing for any new tool: file an issue with the suggested new rules.

Some initial thoughts looking through its README: it looks like a lot of the rules are around standardization and data validity checking. For standardization, I think it'd be reasonable to take any where the standardized version is objectively cleaner (e.g. #71). For validity, as long as it's a clearly more-valid form (e.g. #134). But I haven't put much thought into this - definitely interested in other points of view!

@tommy-mitchell
Copy link

Another one is pkg-ok, which for example ensures that files referenced in package.json exist.

@JoshuaKGoldberg JoshuaKGoldberg pinned this issue Mar 6, 2024
@JoshuaKGoldberg
Copy link
Owner Author

Ah sorry I dropped responding to pkg-ok note. It's a nice idea but the tricky thing is that a lot of packages refer to files that don't exist during development. I'm going to hold off adding that to this table - but if you want to talk about adding it in, I'd be interested in seeing a separate issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Improvements or additions to docs
Projects
None yet
Development

No branches or pull requests

3 participants