Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel special not detecting presets listed in .babelrc #886

Open
dpdoughe opened this issue Mar 1, 2024 · 0 comments
Open

Babel special not detecting presets listed in .babelrc #886

dpdoughe opened this issue Mar 1, 2024 · 0 comments
Labels

Comments

@dpdoughe
Copy link

dpdoughe commented Mar 1, 2024

Bug Description

I found I needed to add the names of the presets "@babel/preset-env" and "@babel/preset-react"
to my .depcheckrc "ignores" section even though I am using the babel "special".

Note that the plugin "@babel/plugin-proposal-class-properties" which follows a similar naming format, is found correctly by the babel special, so I didn't need to explicitly add it to may "ignores".

Has anyone had a similar experience or know what may be causing me to need to add those 2 babel presets to my ignores?

.depcheckrc

specials: ["eslint", "webpack", "babel", "jest"]
ignores: ["depcheck","webpack-cli", "core-js", "babel-core", "@babel/preset-env", "@babel/preset-react"]

.babelrc

{
    "presets": [
        "@babel/preset-env",
        "@babel/preset-react"
    ],
    "plugins": [
        "@babel/plugin-proposal-class-properties"
    ]
}

Code snippets

Where the dependency is used:

.babelrc

{
    "presets": [
        "@babel/preset-env",
        "@babel/preset-react"
    ],
    "plugins": [
        "@babel/plugin-proposal-class-properties"
    ]
}

Where the dependency is listed in package.json:

package.json snippet

  "devDependencies": {
     ...
    "@babel/preset-env": "latest",
    "@babel/preset-react": "latest",
     ....

Versions

  • node -v: v14.21.3
  • npm -v: v6.14.18
  • depcheck --version: v1.4.7

Extra info

Any extra info you want to include. Thank you for the bug report!

BONUS POINTS: If you wish to help us debug further, the depcheck --json option will show more information. Check here in the README for documentation on json output.

@dpdoughe dpdoughe added the bug label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant