1.1.3 • Published 9 months ago

@jpotin/my-eslint-config v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

My ESLint Config

This is a simple NPM package that exports a ESLint configurations for my JavaScript projects.

Installation

To use this ESLint configuration, you'll need to install the package as a development dependency in your project:

npm install --save-dev @jpotin/my-eslint-config

Usage

Once the package is installed, you can use the exported configuration in your react project's .eslintrc.config.mjs file.

import { config } from "@jpotin/my-eslint-config/react";

/** @type {import("eslint").Linter.Config} */
export default config;

Alternatively, you can specify the configuration in your package.json file:

{
  "eslintConfig": {
    "extends": "my-eslint-config"
  }
}

Configuration

The package export 2 configurations:

Base configuration

The base configuration includes the following rules:

  • no-console: Warn when using console.log() statements

  • no-unused-vars: Disables this rule, as it is handled by TypeScript.

  • import/order: Enforces a consistent ordering of imports, with built-in modules first, followed by external modules, parent modules, sibling modules, and index modules.

React Configuration

The React configuration extends the base configuration and adds the following rules:

  • react: Enables the React plugin.

  • react-hooks: Enables the React hooks plugin.

  • jsx-a11y: Enables the jsx-a11y plugin.

  • react-compiler: Enables this rule with an error severity.

You can customize or extend this configuration by creating your own .eslintrc.config.mjs file in your project and overriding the rules as needed.

Contributing

If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License.

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.13

9 months ago

1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago