eslint-import-resolver-jsconfig

1.1.0 • Public • Published

eslint-import-resolver-jsconfig

This is resolver for eslint-plugin-import, which can import your alias from paths in your jsconfig file.

jsconfig example

I personally use it for easy eslint alias support with create-react-app and react-app-rewired + react-app-rewire-alias.

Installation

npm install eslint-import-resolver-jsconfig --save-dev

Usage

Pass this resolver and jsonconfig name to eslint-plugin-import using your eslint config file

// .eslintrc.json

"settings": {
    "import/resolver": {
        "jsconfig": {
            "config": "jsconfig.json"
        }
    }
}

If it is necessary, pass array of extensions. Defaults are js and jsx.

"jsconfig": {
    "config": "jsconfig.json",
    "extensions": [".js", ".jsx"]
}

Special thanks

eslint-import-resolver-webpack

eslint-import-resolver-custom-alias

Package Sidebar

Install

npm i eslint-import-resolver-jsconfig

Weekly Downloads

9,263

Version

1.1.0

License

ISC

Unpacked Size

6.58 kB

Total Files

5

Last publish

Collaborators

  • idonotknowwhoiam