npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

do-me-lint

v1.22.0

Published

CLI tool to make your JS/TS projects linted with ESLint and Prettier for the best possible developer experience.

Downloads

64

Readme

DoMeLint

tests

What

CLI tool to make your JS/TS projects linted with ESLint and Prettier for the best possible developer experience.

For whom

For busy developers who appreciate the benefits of code linting but find it tedious. For those who find themselves in the following situations:

I spend too much time to read ESLint rule docs. It indicates that you are not happy with just applying recommended configs. To make a concious choice you have to learn what is considered a warning, how it might conflict with other rules, test all the rule options. For hundreds of rules.

I don't remember why this rule is here. Is your current config specific to the project? Do you keep track of the reasons to enable or disable a specific rule?

I'm not sure if a rule is enabled in my config at all. ESLint configurations work like layers: one recommended config can enable a rule, another one can cancel it, recommended configs are usually extended from some "base" in a tree-like hierarchy. In addition your project config may be impacted by the parent folder config unless you explicitly forbid it.

I'd like to use modern ESLint plugins, but I have no time to monitor it. You suspect that ESLint world is awesome, but trying out all these plugins?

Sometimes I see more than one warning for the same code. It indicates you have conflicting rules, or some cases are covered by Typescript.

Features

  • Configures ESLint, Prettier and your IDE (currently VSCode only)
  • Scans your codebase: fixes all fixable ESLint rules and formats all files with Prettier
  • Adds all Git-ignored patterns to .prettierignore and .eslintignore
  • Provides you a detailed report of the most common errors
  • Rules are finely selected for you from the best plugins
  • Your projects gets only relevant rules, e.g. you get Typescript plugin and rules only if you have typescript as a dependency
  • All ESlint configuration is stored in a single .eslintrc.yml file. DoMeLint ensures there are no conflicting configurations. No extended, recommended or nested configurations - what you see is what you get.
  • No configuration needed
  • Still fully flexible: you can specify your file patterns, disable rules that are not worth fixing , and have completely own, team- or company-wide ruleset (see configuration section)
  • Supports new projects and existing codebases
  • Automatically updates linting dependencies using your project's dependency manager. Currently supports npm, yarn and pnpm.
  • Supports monorepos - configures IDE once for the whole repo while keeping linting configurations per project

Usage

cd [path-to-your-project]
npx do-me-lint

Best practices

You can achieve best results running do-me-lint once or periodically if you want to keep the configuration up to date.

It makes sense to keep .domelintrc.yml as part of your git repository.

Troubleshooting

If there are too many warnings to fix in one go:

  • revert the changes
  • disable the rules you don't want to fix (see configuration section, ignoreRules)
  • apply the command again

If do-me-lint throws an error or stops responding at the "Checking required NPM dependencies" step, run it again in the debug mode:

DML_DEBUG=1 npx do-me-lint

Configuration

do-me-lint reads script settings in the following priority:

  1. Environment variables
  2. Settings in .domelintrc.yml
  3. Default values

All settings are optional

| Setting in .domelintrc.yml | Description | Default | Environment variable | | ------------------------------------------------ | --------------------------------------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------- | | semi boolean | Force semicolons to be required (true) or forbidden (false) | | DML_SEMI "1" (other values are false) | | ignoredRules Array<string> | Ignored rules will be not added | | DML_IGNORED_RULES comma-separated string | | relaxedRules Array<string> | Relaxed rules generate warnings | | DML_RELAXED_RULES comma-separated string | | jestFiles string | Pattern for Jest specs | src/**/{__tests__/*,*.{spec,test}}.{js,ts,jsx,tsx} | DML_JEST_FILES string | | — | Extended debug info | | DML_DEBUG "1" (other values are false) |

Your .domelintrc.yml may look like this:

semi: true
ignoredRules:
  - max-params
  - prefer-template

# generate warnings instead of errors
relaxedRules:
  - func-names

Supported ESLint plugins