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

auto-eslint

v1.0.13

Published

Autoinstall eslint with your own rules and configuration

Downloads

21

Readme

auto-eslint

Easily install ESLint with your own rules and configuration 🧙


auto-eslint is a CLI tool built to help you install and configure your ESLint linter.

It uses templates to store the different configurations you may need to get your linter working, such as dependencies you have to install or ESLint configuration files, among others.

  • 💎 Beautiful and minimalist UI provided by @clack.
  • 👌 Easy setup.
  • 🧾 Comes with prebuilt templates.

How to use

Install

I'd recommend you installing it as a global dependency, so you can use it anywhere. It's up to you.

npm

npm i auto-eslint -g

yarn

yarn global add auto-eslint

pnpm

pnpm i auto-eslint -g

Getting started

Run the following command in your terminal to run the CLI.

auto-eslint

Once you run it, you can simply use one of the prebuilt templates or you can create a new one. Each template has a description.

Choosing a template

A name or a description fits your needs and you choose it. The CLI will look if you have any ESLint configuration file. If you agree to continue and you have the file, the program will modify it according to the template. In case you don't have the configuration file, it will create it for you.

In some cases, you may need another extra file, like a tsconfig.json file. In those cases the CLI will create it for you.

Once you have all the files you need, the script will install all the dependencies, letting you to decide what package manager to use.

When the installing process ends, the linter should be working as expected.

(Sometimes you may need to restart your code editor in order to work)

Creating a new template

If you choose to create a new template, you can use the wizard to create a basic one or instead create one manually by yourself.

The templates you can create with the wizard are very limited. You can only specify the dependencies you need and what should the ESLint extends.

Templates

Templates are .json files that specify what you need to get the lint working as you want. They are stored in /dist/templates/ inside the path of the package. If you want to make one by yourself, the wizard will give you the exact location of the templates folder in your system.

Structure

The list of properties you can set up in a template file:

description: Description of the template, what it does or what it is for.

For example: 'Standard style guide for typescript projects running in NodeJS'.

linterDependencies: An array of the dependencies you will need to install. All this dependencies will be installed as dev dependencies.

For example: ["eslint", "ts-standard", "typescript"]

linterDependencies: What's your ESLint configuration file, by default .eslintrc.json.

linterConfig: What will be written inside your configuration file. It will only look for certain properties, such as extends, rules, plugins, settings, files and parserOptions.

In case you already have a configuration file, It won't delete the existing configuration.

necessaryFiles: An array of the files you must have for the linter to work. By default, empty.

defaultFiles: A list of files you may need. In case you have a file in the list of necesaryFiles, the program will look for it in the root. If it doesn't exist, it will write it with the information in this list. The name of the 'necessary file' must match exactly the name of this list.


This project is pretty basic and straightforward since I've made it for my own needs, but I would be glad to receive any contribution to it!