tleunen / eslint-import-resolver-babel-module

Custom eslint resolve for babel-plugin-module-resolver
https://github.com/tleunen/babel-plugin-module-resolver
MIT License
248 stars 31 forks source link

Cannot resolve any @babel/ packages from .babelrc #81

Closed chickendinosaur closed 6 years ago

chickendinosaur commented 6 years ago

I'm guessing this does not work with babel 7? =(

error:

[eslint-import-resolver-babel-module] ReferenceError: Unknown plugin "@babel/transform-strict-mode" specified in "C:\\Users\\John\\dev\\working\\test-atm\\web\\.babelrc

.eslintrc "settings": { "import/resolver": "babel-module" }

.babelrc:

{
    "presets": [
        "@babel/react",
        "@babel/typescript",
        [
            "@babel/env",
            {
                "targets": {
                    "node": "8.9.4"
                }
            }
        ]
    ],
    "plugins": [
        "@babel/transform-strict-mode",
        "transform-css-import-to-string",
        [
            "module-resolver",
            {
                "root": [
                    "./src"
                ],
                "extensions": [
                    ".js",
                    ".jsx",
                    ".json",
                    ".ts",
                    ".tsx"
                ]
            }
        ]
    ]
}
lunelson commented 6 years ago

It might be that it's not resolving the name-spaced string syntax correctly... maybe try using a .babelrc.js file and replacing @babel/transform-strict-mode with require('@babel/transform-strict-mode')

tleunen commented 6 years ago

Hmm... @chickendinosaur Do you still have the issue?

tleunen commented 6 years ago

Closing because of inactivity