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

@wooden-script/eslint-config

v1.0.4

Published

Wooden Script ESLint Config simplifies the task of maintaining clean and consistent code in your JavaScript and TypeScript projects. Tailored by Alex Madeira, it offers straightforward configurations for React and Node.js applications. Integrated with Pre

Downloads

80

Readme

Wooden Script - ESlint config

📋 What's included?

  • Standard config base
  • React plugin
  • React Hooks plugin
  • JSX a11y plugin
  • Prettier
  • Import/Export Sort

🎖️ Status badges

Version, Release and Publish GitHub Release Date NPM Version NPM License

📦 Required Packages

Make sure to have the following packages installed in your project to ensure proper functionality:

  • Required ESlint

    • eslint: ESLint is a linting tool for identifying and reporting patterns in JavaScript and TypeScript code.
  • Optional eslint_d

    • eslint_d: If your development environment reads the result from stdout, installing eslint_d can provide faster linting performance.
    • typescript: TypeScript is a superset of JavaScript that adds static types to the language and is essential for TypeScript projects.

🛠️ Installation

  • npm: npm install @wooden-script/eslint-config --save-dev
  • yarn: yarn add @wooden-script/eslint-config --dev
  • pnpm: pnpm add @wooden-script/eslint-config --save-dev

🧱 Setup

After the installation process, you should create an ESLint configuration file in the root of your project. This file can be named .eslintrc.js, .eslintrc.json, or any other format accepted by ESLint. For more information, refer to ESLint Configuration Files. Inside the configuration file, add the following content based on your project type:

For React projects (with or without TypeScript), use:

{
  "extends": ["@wooden-script/eslint-config/react"]
}

For Node.js projects (with or without TypeScript), use:

{
  "extends": ["@wooden-script/eslint-config/node"]
}

These configurations will be effective once added to your ESLint configuration file.

🪛 Customizing/Override configuration

Customizing Wooden Script ESLint configuration allows you to tailor the linting rules to fit your project's specific needs. Here are two notable customization options:

⚙️ Configure Prettier Settings

You can customize Prettier settings through the prettier/prettier ESLint rule. Adjust the configuration in your .eslintrc.json file as follows:

{
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "singleQuote": true,
        "tabWidth": 2,
        "trailingComma": "all",
        "arrowParens": "always",
        "endOfLine": "auto"
        <!-- Add more Prettier settings as needed -->
      }
    ]
  }
}

For more details, refer to the eslint-plugin-prettier documentation.

⚙️ Customize Import Sorting Order

Adjusting the order of imports can be done through the simple-import-sort/imports ESLint rule. Modify the configuration in your .eslintrc.json file:

{
  "rules": {
    "simple-import-sort/imports": [
      "error",
      {
        "groups": [
         <!--  Customize your import groups as needed -->
        ]
      }
    ]
  }
}

⚙️ Organize Exports

You can also organize exports, although this option is not enabled by default. This can be achieved through the simple-import-sort/exports ESLint rule. To use this feature, modify your .eslintrc.json file:

{
  "rules": {
    "simple-import-sort/exports":
    [
      "error",
      {
        "groups": [
          <!-- Customize export sorting rules if necessary -->
        ]
      }
    ]
  }
}

For more information, consult the eslint-plugin-simple-import-sort documentation.

Feel free to explore these options to align the ESLint configuration with your project's coding standards and preferences.

🤔 Why?

Wooden Script ESLint config provides a standardized set of rules for maintaining consistent and high-quality code. It includes configurations for both Node.js and React projects, ensuring best practices and code quality across different environments.

🔩 Compatibility

The Wooden Script ESLint configuration is compatible with the following versions:

  • Node.js: Latest stable version
  • ESLint: ^8.0.0
  • TypeScript: ^5.0.0
  • @typescript-eslint/eslint-plugin: ^6.21.0
  • @typescript-eslint/parser: ^6.21.0
  • eslint-config-prettier: ^9.1.0
  • eslint-config-standard: ^17.1.0
  • eslint-plugin-import: ^2.29.1
  • eslint-plugin-jsx-a11y: ^6.8.0
  • eslint-plugin-n: ^16.6.2
  • eslint-plugin-prettier: ^5.1.3
  • eslint-plugin-promise: ^6.1.1
  • eslint-plugin-react: ^7.33.2
  • eslint-plugin-react-hooks: ^4.6.0
  • eslint-plugin-simple-import-sort: ^12.0.0
  • prettier: ^3.2.5

🔗 Our Related Projects

👨🏾‍⚖️ License

This project is licensed under the MIT License. ©Alex Madeira.