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

@finale-lua/eslint-config

v0.8.32

Published

an eslint config for my personal projects

Downloads

1

Readme

eslint-config

A highly opinionated ESLint config.

Getting started

Install from NPM, including peer dependencies, with --save-dev

npm i @nick-mazuk/eslint-config eslint --save-dev

Then, create a .eslintrc file in the root of your project with

{
    "extends": ["@nick-mazuk/eslint-config"]
}

Running the linter

Add this to your package.json file:

"scripts": {
    "eslint": "eslint '**/*.{js,ts,tsx}' --quiet --fix",
    "check-types": "tsc --noemit",
    "lint": "npm run eslint && npm run check-types"
},

Then run

npm run lint

Versions

This package has configs for different scenarios (more coming).

  • React: use @nick-mazuk/eslint-config/react
  • NextJS: use @nick-mazuk/eslint-config/next
  • Cypress: use @nick-mazuk/eslint-config/cypress
  • Firebase functions: use @nick-mazuk/eslint-config/firebase-functions

When using a more specific config, the base config is not needed. For instance, with NextJS, this is all that's required:

{
    "extends": ["@nick-mazuk/eslint-config/next"]
}

Integration with VS Code (recommended)

This is the easiest way to ensure ESLint is run every time you save a file, and that VS Code lints as you type, pointing out errors in real-time.

  1. Create a new file .vscode/settings.json
  2. Add this to the file:
{
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    },
    "eslint.run": "onType"
}

Note: when you first open the repo with this ESLint configuration, it can take up to a minute for VS Code to start linting. You'll still be able to edit files in the meantime.

Use with Prettier

This config has Prettier built-in. If you use Prettier with your code editor or use a .prettierrc file, there will likely be conflicts. It's best to remove any .prettierrc files you may have and disable Prettier in your code editor.

Rationale: this ESLint config is highly opinionated and is a living config. As best practices evolve, this config will evolve. Since Prettier is 100% fixable, that means that your code will always follow this config and therefore always follow best practices. If you override the formatting with Prettier, you forgo any future updates in regard to Prettier formatting.

Note: If using the Svelte config, you need to setup Prettier manually. This is because the plugin prettier-plugin-svelte (which is needed to parse Svelte) does not work with ESLint.

Use without TypeScript

Currently, all the configs require TypeScript. Perhaps in the future I'll create a TypeScript addon, but since TypeScript is just better than vanilla JS, vanilla JS is currently not supported.

What rules are enabled?

In short, this config runs 500+ rules (and counting). Luckily, the source code is easy to read, so you should not have an issue reading the rules there.

I found a bug, what do I do?

If you found a bug or rule conflicts, submit an issue on GitHub.