Skip to content

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

@stipsan

Description

@stipsan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions