1.3.0 • Published 3 years ago
@typelib/eslint-plugin-auto-import v1.3.0
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