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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

A linter for the files that live around your code

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published