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

@zemd/eslint-flat-config

v2.0.6

Published

Shared zemd ESLint flat config

Downloads

22

Readme

@zemd/eslint-flat-config

npm

  • Easy,
  • Helps to code and find bugs with only necessary rules, and less stress,
  • Provides everything out of the box,
  • Configurable
  • DOES NOT sort imports,
  • ESLint Flat config

Usage

npm install eslint @zemd/eslint-flat-config --save-dev

Configuration

// eslint.config.js
const { createEslintConfig } = require("@zemd/eslint-flat-config");
export default [
  {
    ignores: [".next/**", ".turbo/**", "node_modules/**"],
  },
  ...createEslintConfig({
    useNextjs: true,
    useTailwind: true,
    useTurbo: true,
  }),
];

Debug your rules

A fantastic tool called eslint-flat-config-viewer can show all your applied rules, display links to the documentation, and group rules by the provider. I recommend using it to dig deeper into your project's rules.

Goal

The purpose of this package is to develop confidently without pressure from tools and too strict rules, but at the same time, try to make sure that tools help you not to shoot in your foot.

Some key points behind this package include:

  • developer should not be blocked by the tool and should be able to use language features,
  • no or minimum warnings, without compromises, just errors that don't mess up output,
  • minimum formatting rules or none, this should be handled by formatter without blocking your flow,
  • no configuration, plug the rules and start working; otherwise, override in your config,
  • batteries included by default: typescript, prettier, react, nextjs, tailwind, vitest, playwright, storybook
  • rules should not force you to use a specific programming style but help you catch bugs

Rules

  • Recommended rules from @eslint/js,
  • strict-type-checked and stylistic-type-checked rules from @typescript-eslint/eslint-plugin
  • Additional stylistic rules from @typescript-eslint/eslint-plugin
  • Recommended rules from eslint-plugin-sonarjs
  • Carefully hand-picked rules from eslint-plugin-unicorn
  • Recommended rules from eslint-plugin-jsx-a11y and eslint-plugin-react-hooks
  • Carefully hand-picked rules from eslint-plugin-react
  • Single rule for lodash imports
  • Recommended and core-web-vitals configs from @next/eslint-plugin-next
  • Recommended rules from eslint-plugin-playwright
  • Recommended rules from eslint-plugin-vitest
  • Recommended rules from eslint-config-prettier that turn off rules which overlap with @typescript-eslint and prettier
  • Recommended rules from eslint-config-turbo

Inspirations and alternatives

  • Sheriff -- Great set of rules, but with some style restrictions
  • Antfu config -- Another great set of rules
  • XO -- Flat version of popular set xo, still in beta, includes some restrictive rules that I don't always agree with

License

The @zemd/eslint-flat-config is licensed under the LGPLv3 license.

Donate