0.2.0 • Published 7 months ago

eslint-config-import-strict v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

eslint-config-import-strict

npm version npm downloads License

ESLint shareable configuration for strict import rules.

Overview

eslint-config-import-strict is an ESLint shareable configuration designed to enforce strict import rules in your JavaScript or TypeScript projects. It currently provides only one rule set import-strict/all which enables all existing ESLint eslint-plugin-import rules without any further configuration. This means that it enforces best practices and consistency for imports in your codebase, but it does not impose opinionated style choices or additional rules.

Note: It is strongly recommended to lock the patch version of this configuration in your project's dependencies. Even minor patch updates may introduce lint errors, so keeping the version locked ensures that your code remains consistent.

Your package.json should look like this:

"eslint-config-import-strict": "1.0.0" // Replace `1.0.0` to the specific version you are using

Installation

To use eslint-config-import-strict in your project, follow these steps:

  1. Install the package using npm or yarn:
npm install eslint-config-import-strict --save-dev --save-exact

or

yarn add eslint-config-import-strict --dev --exact
  1. Create an ESLint configuration file (e.g., .eslintrc.js or .eslintrc.json) in your project and extend the import-strict/all rule set:

    {
      "extends": [
        // other rule set
        "import-strict/all"
      ]
    }

    This will apply all the import rules to your project.