eslint-plugin-alias-paths

0.0.1 • Public • Published

eslint-plugin-alias-paths

eslint plugin for detect & autofix alias path.

install

yarn add -D eslint-plugin-alias-paths

usage

module.exports = {
    env: {
        browser: true,
        es2020: true,
    },
    extends: [],
    parser: "@typescript-eslint/parser",
    parserOptions: {
        ecmaVersion: 11,
        sourceType: "module",
    },
    plugins: [
        "alias-paths",
    ],
    rules: {
        "alias-paths/prefer-alias-paths": [
            "warn"
            {
                basePath: resolve(__dirname), // base path for project
                targetPath: "./", // base of alias path
                aliasedPath: "@/", // path for aliased path
                depth: 2, // target minimum relative path depth
            }
        ],
    },
};

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-alias-paths

Weekly Downloads

259

Version

0.0.1

License

MIT

Unpacked Size

8.8 kB

Total Files

7

Last publish

Collaborators

  • mkusaka