2.0.1 • Published 3 months ago

eslint-import-resolver-vite v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

eslint-import-resolver-vite

Vite module resolution plugin for eslint-plugin-import. This plugin will resolve the resolve.alias option.

Installation

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

How to use

Vite config file

export const viteConfigObj = {
    resolve: {
        alias: {
            _: path.resolve(__dirname, "src")
        }
    },
};

ESLint config file

NOTE:

  • Since eslint-plugin-import doesn't support an async resolver, Vite's ResolvedConfig API cannot be utilized.
  • This plugin accepts a Vite config object to accommodate various setups, e.g. CJS, ESM, or mixed.
module.exports = {
    settings: {
        "import/resolver": {
            vite: {
                viteConfig: require("./vite.config").viteConfigObj, // named export of the Vite config object.
            }
        }
    }
}
2.0.1

3 months ago

2.0.0

3 months ago

2.0.0-beta.3

4 months ago

1.3.2

5 months ago

2.0.0-beta.2

5 months ago

2.0.0-beta.1

6 months ago

2.0.0-beta.0

6 months ago

1.3.1

7 months ago

1.2.0

10 months ago

1.1.0

11 months ago

1.3.0

10 months ago

1.2.1

10 months ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.3

2 years ago

0.1.0

3 years ago