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

eslint-config-teppeis

v19.1.2

Published

ESLint config set for me!

Downloads

2,766

Readme

eslint-config-teppeis

ESLint shareable configs for me!

npm version supported node.js version build status license

[!IMPORTANT] This config uses new flat config style since v19.

Priority

  1. Avoid "Possible Problems"
  2. Enable "Suggestions" if reasonable or fixable
  3. Use Prettier for stylistic formatting issues

Install

$ npm i -D eslint eslint-config-teppeis

and run npx eslint-config-teppeis --init to generate initial config files.

Usage

Load eslint-config-teppeis and export default build() in your eslint.config.js:

import { build } from "eslint-config-teppeis";
import { mocha } from "eslint-config-teppeis/configs/mocha";

export default await build(
  { base: "node18", typescript: true, esm: true },
  mocha,
  {
    ignores: ["dist", "test/fixtures"],
  },
);

Options

  • base (enum, required): es2021, es2022, es2023, node18 or node20
  • typescript (boolean, default false): use TypeScript
  • project (boolean|string|srting[], default false): the property of parserOptions to enable linting with type information
  • esm (boolean, default false): treat .js and .ts as ESM for a project that configures type:module in package.json

Configs for customization

Pure ECMAScript

Configs for ECMAScript versions

import { es2021 } from "eslint-config-teppeis/configs/es2021";

export default [es2021];
  • es2021
  • es2022
  • es2023

Node.js

Configs for Node versions

  • node18 (v18.18+ Maintenance)
  • node20 (v20.9+ Active LTS)
import { node18 } from "eslint-config-teppeis/configs/node18";

export default [node18];

TypeScript

Configs for TypeScript

  • typescript: Enable rules that don't require type information
  • typescriptTypeChecked: Require type information
import { node18, typescript } from "eslint-config-teppeis/configs";

export default [node18, typescript];

ES Modules

By default, only *.mjs and *.mts are treated as ES Modules in configs for Node.js. If you use type:module in package.json, use esm: true like:

import { build } from "eslint-config-teppeis";

export default build({ base: "node18", esm: true });

Browsers

This enables globals for browsers.

import { es2023, browser } from "eslint-config-teppeis/configs";

export default [es2023, browser];

Mocha

This enables globals for Mocha like describe or it only in **/test/*.js.

import { es2023, mocha } from "eslint-config-teppeis";

export default [es2023, mocha];

Note: Prettier

Just intall prettier and use it with eslint-config-teppeis. These configs don't include rule settings that conflict with Pretteir.

License

Licensed under the MIT license. Copyright (c) 2023, Teppei Sato