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

@code-pushup/eslint-config

v0.10.4

Published

Recommended ESLint presets by Code PushUp

Downloads

1,127

Readme

@code-pushup/eslint-config

npm License: MIT

Recommended ESLint presets by Code PushUp.

⚙️ Configs

| Stack | Config | Description | | :----------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------- | :------------------------------------------------------------------ | | javascript | javascript | Default config, suitable for any JavaScript/TypeScript project. | | typescript | typescript | Config for strict TypeScript projects. | | nodejs | node | Config for Node.js projects. | | angular | angular | Config for Angular projects. | | ngrx | ngrx | Config for Angular projects using NgRx library. | | graphql | graphql | Config for GraphQL servers implemented in Node.js. | | jest | jest | Config for projects using Jest for testing. | | vitest | vitest | Config for projects using Vitest for testing. | | cypress | cypress | Config for projects using Cypress for testing. | | storybook | storybook | Config for projects using Storybook for UI components. |

Some configs extend other configs, as illustrated below. So, for example, extending angular config implicitly extends typescript and javascript configs as well.

  graph BT;
    javascript("javascript")
    typescript("typescript")
    node("node")
    angular("angular")
    ngrx("ngrx")
    graphql("graphql")
    typescript --extends--> javascript
    node --extends--> javascript
    angular --extends--> typescript
    ngrx --extends--> angular
    graphql --extends--> node

🏗️ Setup

To use the default config, follow these steps:

  1. You must first install all the required peer dependencies (if you haven't already):

    npm install -D eslint @eslint/js eslint-plugin-{functional,import,promise,sonarjs,unicorn} globals typescript-eslint
  2. Install @code-pushup/eslint-config with:

    npm install -D @code-pushup/eslint-config
  3. Include default config in your ESLint configuration file (usually eslint.config.js):

    import javascript from '@code-pushup/eslint-config/javascript.js';
    import tseslint from 'typescript-eslint';
       
    export default tseslint.config(...javascript);

Depending on your tech stack, you may wish to extend other configs as well (listed above). This will require installing additional peer dependencies. For more details, refer to setup docs for the configs you're interested in using.

📦 Peer dependencies

All peer dependencies used by @code-pushup/eslint-config are listed below, along with their supported versions. Only the default config's dependencies are required, others are optional.

| | NPM package | Version | Required | | :----------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------- | :--------: | :------: | | eslint | eslint | ^9.0.0 | ✅ | | eslint | @eslint/js | ^9.0.0 | ✅ | | lambda | eslint-plugin-functional | ^7.0.0 | ✅ | | import | eslint-plugin-import | ^2.31.0 | ✅ | | import | eslint-import-resolver-typescript | ^3.0.0 | | | promise | eslint-plugin-promise | >=6.4.0 | ✅ | | sonar | eslint-plugin-sonarjs | >=1.0.4 | ✅ | | unicorn | eslint-plugin-unicorn | >=50.0.0 | ✅ | | global | globals | >=14.0.0 | ✅ | | typescript | typescript-eslint | ^8.0.0 | ✅ | | graphql | @graphql-eslint/eslint-plugin | ^3.0.0 | | | ngrx | @ngrx/eslint-plugin | ^18.0.0 | | | angular | angular-eslint | ^18.0.0 | | | cypress | eslint-plugin-cypress | >=3.3.0 | | | jest | eslint-plugin-jest | ^28.8.0 | | | test | eslint-plugin-jest-formatting | ^3.0.0 | | | nodejs | eslint-plugin-n | >=17.0.0 | | | rxjs | eslint-plugin-rxjs-x | >=0.2.4 | | | storybook | eslint-plugin-storybook | >=0.10.0 | | | vitest | eslint-plugin-vitest | >=0.5.0 | |

🧪 Test overrides

For non-production code, some rules are disabled (or downgraded from errors to warnings).

This applies to file paths matching any of the following globs:

  • **/*.spec.?(c|m)[jt]s?(x)
  • **/*.test.?(c|m)[jt]s?(x)
  • **/__tests__/**/*.?(c|m)[jt]s?(x)
  • **/__mocks__/**/*.?(c|m)[jt]s?(x)
  • **/*.cy.?(c|m)[jt]s?(x)
  • **/*.stories.?(c|m)[jt]s?(x)
  • **/*.e2e.?(c|m)[jt]s?(x)
  • **/*.mock.?(c|m)[jt]s?(x)
  • **/*.mocks.?(c|m)[jt]s?(x)
  • **/test/**/*.?(c|m)[jt]s?(x)
  • **/tests/**/*.?(c|m)[jt]s?(x)
  • **/mocks/**/*.?(c|m)[jt]s?(x)
  • **/testing-utils/**/*.?(c|m)[jt]s?(x)
  • **/test-utils/**/*.?(c|m)[jt]s?(x)
  • **/fixtures/**/*.?(c|m)[jt]s?(x)
  • **/*.config.?(c|m)[jt]s
  • **/.prettierrc.?(c|m)[jt]s
  • **/codegen.?(c|m)[jt]s
  • **/test-setup.?(c|m)[jt]s

🫴 Contributing

Node.js installation is a prerequisite (LTS version). Install dependencies with NPM:

npm install

To execute tests:

npm test

To generate documentation:

npm run docs