1.4.4 • Published 5 years ago

eslint-plugin-absolute-import v1.4.4

Weekly downloads
749
License
MIT
Repository
github
Last release
5 years ago

eslint-plugin-absolute-import

build status Coverage Status win32 build status npm npm downloads

This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import names. All the goodness that the ES2015+ static module syntax intends to provide, marked up in your editor.

Rules

Static analysis

Installation

npm install eslint-plugin-absolute-import -g

or if you manage ESLint as a dev dependency:

# inside your project's working tree
npm install eslint-plugin-absolute-import --save-dev

All rules are off by default.

Currently Node and webpack resolution have been implemented, but the resolvers are just npm packages, so third party packages are supported (and encouraged!).

Settings

You may set the following settings in your .eslintrc:

import/extensions

A list of file extensions that will be parsed as modules and inspected for exports.

This defaults to ['.js'], unless you are using the react shared config, in which case it is specified as ['.js', '.jsx'].

"settings": {
  "import/resolver": {
    "node": {
      "extensions": [
        ".js",
        ".jsx"
      ]
    }
  }
}