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

verifyPackage.eslintImports don't detect .eslintrc.js conf #2

Open
stipsan opened this issue Jul 28, 2022 · 0 comments
Open

verifyPackage.eslintImports don't detect .eslintrc.js conf #2

stipsan opened this issue Jul 28, 2022 · 0 comments
Labels
bug Something isn't working triaged

Comments

@stipsan
Copy link
Member

stipsan commented Jul 28, 2022

When a .eslintrc is used the plugin-kit correctly detects that I have @sanity/no-v2-imports in my extends array.
But when using .eslintrc.js I get this error:

✖ 4 problems (3 errors, 1 warning)
ESLint detected Studio V2 imports that are no longer available.
It is recommended configure @sanity/eslint-config-no-v2-imports for ESLint.

Run:
npm install --save-dev @sanity/eslint-config-no-v2-imports

In .eslintrc add:
"extends": ["@sanity/no-v2-imports"]

This way, V2-imports can be identified directly in the IDE, or using eslint CLI.
For more, see https://github.com/sanity-io/eslint-config-no-v2-imports

If the plugin package does not use eslint, disable this check.

To skip this validation add the following to your package.json:
"sanityPlugin": {
   "verifyPackage": {
      "eslintImports": false
   }
}

Repro: https://github.com/sanity-io/sanity-plugin-mux-input

@stipsan stipsan added the bug Something isn't working label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

1 participant