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

@verkstedt/eslint-config-verkstedt

v10.0.0

Published

ESLint config

Downloads

603

Readme

eslint-config-verkstedt

ESLint and Prettier config

Integration

  • First, install the package along with it’s peer dependencies:

    npx install-peerdeps --dev @verkstedt/eslint-config-verkstedt@latest
    npx install-peerdeps --yarn --dev @verkstedt/eslint-config-verkstedt@latest
  • Then:

    • If your project uses TypeScript:

      npm install --save-dev "typescript@^5.4.3" "@typescript-eslint/eslint-plugin@^7.3.1" "@typescript-eslint/parser@^7.3.1"
      yarn add --dev "typescript@^5.4.3" "@typescript-eslint/eslint-plugin@^7.3.1" "@typescript-eslint/parser@^7.3.1"
    • If your project does not use TypeScript, but uses Babel:

      npm install --save-dev "@babel/core@^7.24.3" "@babel/eslint-parser@^7.24.1"
      yarn add --dev "@babel/core@^7.24.3" "@babel/eslint-parser@^7.24.1"
  • In your EsLint config use one of those for extends:

    | ↓ use this \ if your project uses → | Babel | TypeScript | React | Next.js | | ------------------------------------------- | :----: | :--------: | :---: | :-----: | | @verkstedt/verkstedt/typescript-react[^1] | ☑ /✖️ | ☑ | ☑ | ✖️ | | @verkstedt/verkstedt/typescript-next | ☑ /✖️ | ☑ | ☑ | ☑ | | @verkstedt/verkstedt/typescript | ☑ /✖️ | ☑ | ✖️ | ✖️ | | @verkstedt/verkstedt/next | ☑ /✖️ | ✖️ | ☑ | ☑ | | @verkstedt/verkstedt/react | ☑ | ✖️ | ☑ | ✖️ | | @verkstedt/verkstedt/babel | ☑ | ✖️ | ✖️ | ✖️ | | @verkstedt/verkstedt/vanilla | ✖️ | ✖️ | ✖️ | ✖️ |

    [^1]: @verkstedt/verkstedt/typescript-react is also aliased as @verkstedt/verkstedt.

    E.g. make your .eslintrc.cjs the following:

    module.exports = {
      extends: ['@verkstedt/verkstedt/typescript-next'],
    }
  • Add the following .prettierrc.json:

    "@verkstedt/eslint-config-verkstedt/prettier-config"

    You probably also want .prettierignore with something like:

    /.next/
    /node_modules/

    If you have any generated files (e.g. lingui locales), also add them in there.

  • Add the following to stylelint.config.cjs:

    module.exports = require('@verkstedt/eslint-config-verkstedt/stylelint-config')

Upgrading

Use the same commands as in previous section.

After upgrading, review if all of your projects EsLint rule overwrites are still needed.

VIM integration

We recommend to use CoC with coc-eslint extension.

VS Code Integration

To get this working with VS Code, you will first need to install the Prettier - Code formatter extension.

Next, add the following values to global settings, or to to your per project folder settings (./.vscode/settings.json):

  // probably best to use these only in workspace or
  // folder config, and not in global settings:
  "prettier.useEditorConfig": false,
  "eslint.format.enable": true,
  // Per language settings:
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[typescriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  }

Note on dependencies of this project

  • dependencies — the usual

  • peerDependencies — stuff that needs to be installed as a direct dependency of a project using this config. These are packages that provide binaries (eslint, prettier, stylelint) as well as some weird packages that don’t work as regular dependency cough eslint-plugin-prettier cough).

  • devDependencies — stuff required to run npm run lint in this repository. It’s peerDependencies and optionalDependencies merged together