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

Linter fails with two 'no-duplicate-imports' errors #101

Closed
jreyesr opened this issue May 22, 2021 · 0 comments · Fixed by #102
Closed

Linter fails with two 'no-duplicate-imports' errors #101

jreyesr opened this issue May 22, 2021 · 0 comments · Fixed by #102

Comments

@jreyesr
Copy link

jreyesr commented May 22, 2021

(This issue was first reported by @falconhome in #97 (comment))

When running npx yarn dev after having run npx run upgrade, the linter fails with two violations of the no-duplicate-imports rule in ESLint. This makes it impossible to build the plugin.

Steps to reproduce

  1. Clone grafana-map-panel with git clone https://github.com/panodata/grafana-map-panel
  2. Run npx yarn install
  3. Run npx yarn dev. It should run without issue (at least it does on my machine). If it fails, skip to step 5.
  4. If the previous step didn't fail, run npx yarn upgrade.
  5. Run npx yarn dev again. It should fail with two 'leaflet' import is duplicated no-duplicate-imports errors, on files src/worldmap.ts and src/types/leaflet_plus.d.ts

Cause

When cloning and running npx yarn install, version 7.3.1 of package @grafana/toolkit is downloaded. This package requires version 2.0.3 of @grafana/eslint-config. These two versions come from the yarn.lock file.

After running npx yarn upgrade, @grafana/toolkit is (in my tests) upgraded to version 7.5.7, which specifies version 2.3.0 of @grafana/eslint-config. However, the no-duplicate-imports rule was added on version 2.2.0 of @grafana/eslint-config.

@jreyesr jreyesr changed the title Linter fails with two ' no-duplicate-imports' errors Linter fails with two 'no-duplicate-imports' errors May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant