@jpotin/my-eslint-config v1.1.3
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.
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago