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

@utima/eslint-config

v0.14.0

Published

Utima's extensible shared eslint-config. It contains opinionated rules for JavaScript and TypeScript projects including React, TailwindCSS, Next.JS, jest and more.

Downloads

581

Readme

@utima/eslint-config

Utima's extensible shared eslint-config. Comes pre-configured with Prettier, opinionated rules for JavaScript, TypeScript projects including React, TailwindCSS, Next.JS, jest eslint plugins and more.

The config uses new flat config format, which is supported by eslint 7.0.0 and above. This allows us to use .mjs extension and import other configs from npm packages.

Base config includes configurations for multiple frameworks (JS, TS, React, jest, import formatting) with some additional configs, you can use to extend the default one (see section below).

Install

npm i -D eslint@8 @utima/eslint-config

 We are currently stuck on eslint v8 until all of the config dependencies are compatible with new v9

Usage

Create eslint.config.mjs in the root of your directory with following contents:

import baseConfig from '@utima/eslint-config';

export default [...baseConfig];

Running eslint

Below is simple code snippet you can add to your package.json to run eslint:

{
  "scripts": {
    "lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs './**/*.{js,ts,jsx,tsx,cjs,mjs}'",
  }
}

Configs

Each config is a separate file, which can be imported and used in your config. For example, to use TailwindCSS config, you can do:

import baseConfig from '@utima/eslint-config';
import { tailwind } from '@utima/eslint-config/configs';

export default [...baseConfig, ...tailwind];

Check following table for all aviailable configs:

| Config name | Description | Included in default config | |-------------------------|-------------------------------------------------------------------------------------------------------|----------------------------| | base | Base config, includes language settings, globals, parser options | ✅ | | javascript | Extends eslint recommended settings with some custom overrides | ✅ | | imprt | eslint-plugin-import | ✅ | | unusedImports | eslint-plugin-unused-imports | ✅ | | unicorn | eslint-plugin-unicorn | ✅ | | jest | eslint-plugin-jest, eslint-plugin-jest-formatting | ✅ | | prettier | plugin:prettier/recommended | ✅ | | react | eslint-plugin-react, eslint-plugin-react-hooks | ✅ | | typescript | @typescript-eslint/eslint-plugin | ✅ | | tailwind | eslint-plugin-tailwindcss | ❌ | | typescriptTypeChecked | Enables type-checking and type-checked rules (impacts performance) | ❌ | | next | @next/eslint-plugin-next | ❌ |

FAQ

Q: Does this work with VSCode eslint plugin?

A: Yes, due to flat config and (.mjs) extension, you have to enable some settings:

{
  "eslint.experimental.useFlatConfig": true,
  "eslint.options": {
    "overrideConfigFile": "eslint.config.mjs"
  },
}

Contribution guide

Every PR implementing new feature should include changeset. Use npm run changeset from the root of the repository to generate new changeset and include it with your PR.

Release

Make sure all new features are merged to main and you are on main branch including their changesets. and run:

npm run release

RC Versions

To enter RC mode, run:

npm run release:rc:exit

when in RC mode, all version releases will have -rc suffix. To exit RC mode, run:

npm run release:rc:exit