MelvinVermeer / eslint-plugin-no-relative-import-paths

90 stars 22 forks source link

[Bug] --fix always adds a '/' to the start of the path #18

Closed maxoosterveen closed 1 year ago

maxoosterveen commented 1 year ago

In version 1.5 the --fix option will always add a '/' to the start of the path even when you don't add a prefix

instead of fixing ../componentFolder/componentName to Components/componentFolder/componentName it will change the path to /Components/componentFolder/componentName with the following config:

rules: {
        "no-relative-import-paths/no-relative-import-paths": [
            2,
            { "allowSameFolder": true, "rootDir": "src" }
        ]
    },

It still works fine on 1.4 with the same config

MasonChinkin commented 1 year ago

+1 I've been using --fix a few times in the last week and this just started. Thanks for all your work on this plugin ❤️

tdymel commented 1 year ago

+1! Love the plugin would love to see a fix :)

damassi commented 1 year ago

🙏