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

@m1rn/eslint-config

v1.0.2

Published

ESLint shareable configurations

Downloads

16

Readme

@m1rn/eslint-config

Version License

ESLint preset configuration library.

Features

  • Best Practices: Ensures accurate and reliable type checking.
  • Strict Configurations: Keeps your code quality at a high standard.
  • Automatic Formatting: No need to use Prettier.
  • Flexible Setup: Adapts to various project needs.

Prerequisites

Node.js

  • Version >= 18.20.0
  • ESM Project

ESLint

  • Version >= 9.6.0
  • Flat Config

Installation

npm install @m1rn/eslint-config --save-dev

Usage

Typically, you can import m1rn preset and use it directly:

import { m1rn } from '@m1rn/eslint-config'

export default m1rn()

Alternatively, you can configure each integration separately:

import { m1rn } from '@m1rn/eslint-config'

export default m1rn({
  ignores: {
    gitignore: true
  },
  node: true,
  browser: true,
  javascript: {
    jsx: true,
    style: true
  },
  typescript: {
    tsx: true,
    style: true,
    typeAware: true
  },
  jsx: {
    tsx: true,
    style: true
  },
  react: {
    tsx: true
  },
  html: {
    a11y: true,
    style: true
  },
  json: {
    style: true
  },
  markdown: {
    codeBlocks: true
  }
})

You can also import specific presets for granular configuration and combine them as you wish:

import {
  ignores,
  node,
  browser,
  javascript,
  typescript,
  jsx,
  react,
  html,
  json,
  markdown
} from '@m1rn/eslint-config'

export default [
  ...ignores(/* Options */),
  ...node(),
  ...browser(),
  ...javascript(/* Options */),
  ...typescript(/* Options */),
  ...jsx(/* Options */),
  ...react(/* Options */),
  ...html(/* Options */),
  ...json(/* Options */),
  ...markdown(/* Options */)
]

Presets

  • m1rn(options?)

    A comprehensive configuration preset that combines multiple configurations based on the provided options. By default, it enables certain presets based on the project environment and dependencies.

  • ignores(options?)

    Globally ignore certain files and directories that are commonly excluded, as well as those specified in the .gitignore file.

  • node()

    Specific rules and settings for Node.js environments.

  • browser()

    Specific rules and settings for Browser environments.

  • javascript(options?)

    Specific rules and settings for JavaScript.

  • typescript(options?)

    Specific rules and settings for TypeScript.

  • jsx(options?)

    Specific rules and settings for JSX.

  • react(options?)

    Specific rules and settings for React.

  • html(options?)

    Specific rules and settings for HTML.

  • json(options?)

    Specific rules and settings for JSON、JSONC and JSON5.

  • markdown(options?)

    Specific rules and settings for Markdown.

Plugins Name

I renamed plugins to make the overall naming more consistent and easier to write.

| Plugin | Name | | ------------------------------------------------------------------------------------------ | ----------- | | @eslint/markdown | md | | @eslint-react/eslint-plugin | react | | @html-eslint/eslint-plugin | html | | @stylistic/eslint-plugin | stylistic | | @typescript-eslint/eslint-plugin | ts | | eslint-plugin-import-x | import | | eslint-plugin-jsonc | json | | eslint-plugin-perfectionist | sort | | eslint-plugin-unicorn | unicorn |

When you want to override rules, or disable them inline, you need to update to the new prefix:

-// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
+// eslint-disable-next-line ts/consistent-type-definitions
type foo = { bar: 2 }

See Also

License

MIT License © 2024-PRESENT m1rn