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

eslint: enable some rules from the import plugin in the generic clever cloud config #1283

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

florian-sanders-cc
Copy link
Contributor

What does this PR do?

  • Enables two rules from the import plugin in eslint-config-clever-cloud-esm:
    • no-unresolved: even though TypeScript already handles this fairly well, it's better to be safe than sorry + the config is meant to be generic and could be used in projects that don't have TypeScript enabled (thanks @Galimede for pointing that out),
    • extensions: same reason as above but TypeScript doesn't always handle the extension requirement (for plain imports like import './my-component.js';.

The named remains disabled because it doesn't seem to work well. We'll deal with that when we handle #1273

How to review?

  • Checking the code should be enough,
  • You can go to a component file and remove some extensions from imports if you want to see it working,
  • 1 reviewer is enough for this one.

@florian-sanders-cc florian-sanders-cc force-pushed the eslint/enable-import-extensions branch from d3721bf to 32b13aa Compare December 17, 2024 11:01
@florian-sanders-cc florian-sanders-cc changed the title Eslint/enable import extensions eslint: enable some rules from the import plugin in the generic clever cloud config Dec 17, 2024
Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/eslint/enable-import-extensions/index.html.

This preview will be deleted once this PR is closed.

Copy link
Member

@Galimede Galimede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Florian!

@florian-sanders-cc florian-sanders-cc merged commit 2c41b48 into master Dec 17, 2024
4 checks passed
@florian-sanders-cc florian-sanders-cc deleted the eslint/enable-import-extensions branch December 17, 2024 13:50
Copy link
Contributor

🔎 The preview has been automatically deleted.

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 this pull request may close these issues.

2 participants