Skip to content

A linter for the files that live around your code

License

Notifications You must be signed in to change notification settings

spautz/packagelint

This branch is 1 commit ahead of main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

db276f5 · Dec 13, 2024

History

72 Commits
Nov 6, 2021
Apr 2, 2021
Jul 1, 2021
Nov 6, 2021
Apr 22, 2023
Jul 21, 2021
Nov 7, 2020
Nov 6, 2021
Nov 7, 2020
May 5, 2021
Nov 14, 2020
Nov 6, 2021
Jun 19, 2021
Mar 22, 2021
Jun 20, 2021
Mar 22, 2021
Nov 7, 2020
Apr 22, 2023
Nov 6, 2021
Jun 26, 2021
Jun 26, 2021
Apr 16, 2021
Apr 27, 2024
Nov 7, 2020
May 15, 2021
Dec 13, 2024

Repository files navigation

Packagelint

build status test coverage

Packagelint is a linter for the files that live around your code. It's meant to complement traditional code linters like ESLint.

Packagelint runs a series of validation rules -- defined in .packagelint.js -- against your project directory. It's most useful when you have a group of projects that should all follow common standards.

Some things you can do with it (once published)

  • Enforce .nvmrc and a specific version of NodeJS
  • Require specific NPM registry settings (e.g. to prevent Dependency Confusion)
  • Suggest particular config values for ESLint, Jest, or other tools
  • Require a minimum version of React, or some other dependency

STILL IN DEVELOPMENT

This tool is not yet ready for public use. Version 0.1.0 will be the first public release. Full docs will be available after 0.2.0.

At a Glance

  • .packagelint.js sets options and errorLevels for the rules you want to run
  • You can configure multiple copies of a rule. For example, the nvmrc rule can be run once to require a .nvmrc file with NodeJS >=12, at errorLevel "error"; and again with NodeJS ^16 at errorLevel "suggestion"
  • Reporters and exit code conditions may be customized to be strict or lenient

It's like a hybrid between ESLint and Jest: rules are configured as if they're for a linter, but they're evaluated and reported as if they're automated tests.

Packages

npm version test coverage dependencies status

The packagelint runtime, available as a CLI tool or as an importable API

npm version test coverage dependencies status

A collection of configurable rules, covering various standards and tools

npm version dependencies status

A collection of validation presets: ready-to-use rulesets for common scenarios

npm version dependencies status

Run your local Packagelint via a global command

npm version test coverage dependencies status

Types, utilities, and validators for Packagelint internals

Documentation (pending/incomplete)

Roadmap and Status

  • Proof of concept
  • Project scaffolding and CLI setup
  • Core functionality: Rule preparation
  • Core functionality: Validation
  • Core functionality: Reporting
  • Initial rules
  • Initial rulesets and combos
  • Docs in repo (in progress)
  • Docs online
  • Test coverage
  • Examples
  • Rule entry shorthands
  • Full RuleCheck support (in progress)
  • Full RuleSet support
  • Full RuleCombo support
  • Support for Jest reporters
  • Configs and patching
  • Rule/reporter import aliases
  • Run Packagelint through a unit test runner