question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Configure eslint-plugin-import

See original GitHub issue

Feature Description

We have eslint-plugin-import installed but it doesn’t look like it’s configured

I created a branch here where I configured this https://github.com/google/site-kit-wp/tree/eslint-import-idea (you can see from the diff that it even found one error 😄 )

The remaining errors on this branch that need fixing are:

error  Multiple exports of name 'getLocale'  import/export
error  Unable to resolve path to module 'tests/js/utils'  import/no-unresolved
error  Unable to resolve path to module 'assets/js/googlesitekit/datastore/site'  

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The ESLint configuration should be modified to extend plugin:import/recommended.
    The plugin is already installed
  • Any errors or warnings raised as a result should be fixed

Implementation Brief

Test Coverage

  • There should be no changes and no updates to tests needed (apart from those done to fix new linting rules!)

Visual Regression Changes

  • There should be no changes

QA Brief

  • Check that JS linting is passing correctly

Changelog entry

  • N/A

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
danielgentcommented, Jul 14, 2021

No @aaemnnosttv . Most likely I quickly read the readme incorrectly 😄

Just doing - plugin:import/recommended is enough

0reactions
ivankruchkoffcommented, Jul 26, 2021

QA ✅

Read more comments on GitHub >

github_iconTop Results From Across the Web

eslint-plugin-import - npm
This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, and prevent issues with misspelling of file paths and import ...
Read more >
eslint-plugin-import/extensions.md at main - GitHub
ESLint plugin with rules that help validate proper imports. ... Depending on the resolver you can configure more extensions to get resolved automatically....
Read more >
How to quickly configure ESLint for import sorting
How to quickly configure ESlint for import sorting using sort-imports and eslint-plugin-import with the import/orders rule.
Read more >
node_modules/eslint-plugin-import · master - PLMlab
--- extends: - eslint:recommended - plugin:import/errors - plugin:import/warnings # or configure manually: plugins: - import rules: import/no-unresolved: [2, { ...
Read more >
How to configure eslint-plugin-import so the imports are sorted ...
I can not find the documentation for configuring the "eslint-plugin-import" rules. I would like to sort my imports alphabetically by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found