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

@garvae/eslint-config-garvae

v1.0.11

Published

Massive and optimized ESLint config for the main front-end environments

Downloads

22

Readme

ESLint config by @Garvae

Massive and optimized ESLint config for the main front-end environments



💪 Benefits

✔️ You don't have to configure everything yourself, just add this config and enjoy rigorous testing and development assistance.

📦 Configurations

⌛ This section is under development and will be available soon

This package provides settings and best practices for:

🌟 JavaScript 🌟 TypeScript 🌟 React.js 🌟 Redux 🌟 HTML 🌟 Jest 🌟 JSON 🌟 Markdown 🌟 Feature Sliced Design (disabled by default)

🛠 Installation

⚠️ ⚠️ ⚠️ This config was designed for use with ESLint version >=8.0.0 <=8.22.0 and has not been tested with the new flat config ESLint 9

1. Install ESLint if you haven't already

npm:

npm i [email protected] --save-dev

yarn:

yarn add [email protected] -D

2. Install prettier if you haven't already

npm:

npm i prettier --save-dev

yarn:

yarn add prettier -D

3. Install package

npm:

npm install @garvae/eslint-config-garvae [email protected] [email protected] --save-dev 

yarn:

yarn add -D @garvae/eslint-config-garvae [email protected] [email protected]

4. Add the eslint-config-garvae to the ESLint config

{
  "extends": [ "@garvae/eslint-config-garvae" ]
}

If you don't have a babel config, then add the path to the on included in this library the ESLint config:

{
  "overrides": [
    {
      "files": [
        "*.js",
        "*.jsx"
      ],
      "parserOptions": {
        "babelOptions": {
          "configFile": "./node_modules/@garvae/eslint-config-garvae/babel.config.js"
        }
      }
    }
  ]
}

If you already have your own babel config, then check it includes (and you have installed) presets:

// your babel.config.js
module.exports = {
    "presets": [
        "@babel/preset-env",
        "@babel/preset-react",
        "@babel/preset-typescript",
    ]
}

It's also required to add the path to your tsconfig.json into next sections:

{
  "overrides": [
    {
      "files": [ "*.ts", "*.tsx" ],
      "parserOptions": {
        "project": "tsconfig.json"
      },
      "settings": {
        "import/resolver": {
          "typescript": {
            "project": "tsconfig.json"
          }
        }
      }
    }
  ]
}

5. Feature Sliced Design

You can add config of Feature Sliced Design:

{
  "overrides": [
    {
      "files": [ "*.ts", "*.tsx", "*.js", "*.jsx" ],
      "extends": [ "@feature-sliced" ]
    }
  ]
}

⚠️ 🛠 Known installation issues

It is challenging to combine the work of many libraries with different versions. Today ESLint version 9 has an updated flat config and many plugins have already changed their configuration to support this update. However, the eslint-config-garvae library dependencies have been tested in the exact combination of versions listed in below. If you have newer versions of these libraries installed, the functionality of ESLint is not guaranteed.

Tested package versions:

{
    "@babel/core": "7.24.7",
    "@babel/eslint-parser": "7.24.7",
    "@babel/preset-env": "7.24.7",
    "@babel/preset-react": "7.24.7",
    "@babel/preset-typescript": "7.24.7",
    "@getify/eslint-plugin-proper-arrows": "11.0.3",
    "@getify/eslint-plugin-proper-ternary": "3.1.1",
    "@html-eslint/eslint-plugin": "0.25.0",
    "@html-eslint/parser": "0.25.0",
    "@stylistic/eslint-plugin-js": "2.3.0",
    "@types/eslint-plugin-security": "3.0.0",
    "@types/jest": "29.5.12",
    "@types/node": "20",
    "@typescript-eslint/eslint-plugin": "5.0.0",
    "@typescript-eslint/parser": "5.0.0",
    "eslint": "8.22.0",
    "eslint-config-airbnb": "19.0.4",
    "eslint-config-airbnb-typescript": "18.0.0",
    "eslint-config-prettier": "9.1.0",
    "eslint-import-resolver-typescript": "3.6.1",
    "eslint-plugin-array-func": "4.0.0",
    "eslint-plugin-better-styled-components": "1.1.2",
    "eslint-plugin-destructuring": "2.2.1",
    "eslint-plugin-eslint-comments": "3.2.0",
    "eslint-plugin-html": "8.1.1",
    "eslint-plugin-import": "2.29.1",
    "eslint-plugin-import-newlines": "^1.4.0",
    "eslint-plugin-jest": "27.2.1",
    "eslint-plugin-jsdoc": "48.5.0",
    "eslint-plugin-jsonc": "2.16.0",
    "eslint-plugin-jsx-a11y": "6.9.0",
    "eslint-plugin-markdownlint": "0.6.0",
    "eslint-plugin-modules-newline": "0.0.6",
    "eslint-plugin-newline-destructuring": "1.2.2",
    "eslint-plugin-no-unsanitized": "4.0.2",
    "eslint-plugin-perfectionist": "2.3.0",
    "eslint-plugin-pii": "1.0.2",
    "eslint-plugin-prefer-type-alias": "0.1.0",
    "eslint-plugin-prettier": "5.1.3",
    "eslint-plugin-react": "7.34.3",
    "eslint-plugin-react-hooks": "4.6.2",
    "eslint-plugin-react-redux": "4.1.0",
    "eslint-plugin-security": "3.0.1",
    "eslint-plugin-sort-destructure-keys": "2.0.0",
    "eslint-plugin-sort-keys-fix": "1.1.2",
    "eslint-plugin-styled-components-a11y": "2.1.34",
    "eslint-plugin-typescript-sort-keys": "3.2.0",
    "eslint-plugin-unused-imports": "3.2.0",
    "eslint-plugin-write-good-comments": "0.2.0",
    "eslint-plugin-you-dont-need-lodash-underscore": "6.14.0",
    "jsonc-eslint-parser": "2.4.0",
    "prettier": "3.3.2",
    "typescript": "5.5.2"
  }

There is already known issue with popular libraries:

{
  "@typescript-eslint/eslint-plugin": "^6.14.0",
  "@typescript-eslint/parser": "^6.14.0"
}

Working versions:

{
  "@typescript-eslint/eslint-plugin": "5.0.0",
  "@typescript-eslint/parser": "5.0.0"
}

And maybe up to

{
  "@typescript-eslint/eslint-plugin": "5.62.0",
  "@typescript-eslint/parser": "5.62.0"
}

So if you have versions newer than listed above, the possible solution:

  1. Uninstall newer versions and eslint-config-garvae library using CLI
  2. Reinstall eslint-config-garvae library

⚡ Examples

⌛ This section is under development and will be available soon

💎 Recommendations

⌛ This section is under development and will be available soon

🤝 Contributions

🤝 Contributions, issues and feature requests are welcome! Feel free to check issues page and pull request page.

❤️ Give aif you like this project!

📞 Contact me

🌐 Contact page

🔳 QR code

🚀 Mentoring

If you want to grow 🚀 fast in front-end development - contact me! 🙋‍♂

📄 License

See license in the "LICENCE" file