plugin-kit icon indicating copy to clipboard operation
plugin-kit copied to clipboard

verifyPackage.eslintImports don't detect `.eslintrc.js` conf

Open stipsan opened this issue 3 years ago • 0 comments

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 avatar Jul 28 '22 13:07 stipsan