1.3.0 • Published 3 years ago

@typelib/eslint-plugin-auto-import v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Auto Import plugin for ESLint

Fixable ESLint rule to add missing imports.

Demo project: eslint-plugin-auto-import-demo

Installation

npm install --save-dev @typelib/eslint-plugin-auto-import

eslintrc.js:

module.exports = {
  plugins: ["@typelib/auto-import"]
};

Rules

auto-import

eslintrc.js:

"@typelib/auto-import/auto-import": [
  "error",
  {
    auto?: <string>,
    identifier?: <string>,
    originalIdentifier?: <string>,
    source: <string>,
    starImport?: <boolean>
  },
  ...
]

auto - Extract identifiers from file
identifier - Identifier to be imported
originalIdentifier - Original identifier located in the imported file
source - Import source
starImport - Import identifier as namespace
1.3.0

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago