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

Add flat config preset for compiled & fix docs #1727

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AllySummers
Copy link

@AllySummers AllySummers commented Oct 16, 2024

What is this change?

This PR:

  • Adds a flat config preset for the ESLint plugin
  • Corrects the readme for the eslint plugin to match the actual code

Why are we making this change?

  • So that people using @compiled/eslint-plugin can use this with flat config without the legacy compat utils
  • To make our documentation more accurate

PR checklist

Don't delete me!

I have...

  • Updated or added applicable tests
  • Updated the documentation in website/

Closes #1691

Copy link

changeset-bot bot commented Oct 16, 2024

🦋 Changeset detected

Latest commit: 9c4a24e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@compiled/eslint-plugin Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

netlify bot commented Oct 16, 2024

Deploy Preview for compiled-css-in-js canceled.

Name Link
🔨 Latest commit 9c4a24e
🔍 Latest deploy log https://app.netlify.com/sites/compiled-css-in-js/deploys/670fe57086503a0008bd9581

@AllySummers AllySummers changed the title Jfp 1155/add flat config preset for compiled Add flat config preset for compiled & fix docs Oct 16, 2024
Copy link
Collaborator

@kylorhall-atlassian kylorhall-atlassian left a comment

Choose a reason for hiding this comment

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

From what I can see you really uplifted things a bit! I've got no concerns with this having interacted on the other plugins you've uplifted!

Worth an FYI review from the owners still though!

@@ -5,6 +5,8 @@ import { createNoTaggedTemplateExpressionRule, isKeyframes } from '../../utils';
export const noKeyframesTaggedTemplateExpressionRule: Rule.RuleModule = {
meta: {
docs: {
recommended: true,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding a few recommended: true could be a problem, but this is a minor bump on a 0.x version which means major to me, LGTM if Eurybia is happy!

Comment on lines +48 to +50
get '@compiled'() {
return plugin;
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a bit more coherent than plugin.configs['flat/recommended'].plugins['@compiled'] = plugin which is what you'd have to do otherwise, right?

Only real concern is could this ever backfire with some Node support? I feel like it's been around forever but also a syntax I never use (because when it was introduced it wasn't ready to be used)…it's good now, right?

Also, would you ever want to merge this though?

Suggested change
get '@compiled'() {
return plugin;
},
...flatRecommended.plugins,
get '@compiled'() {
return plugin;
},

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.

Update eslint-plugin to include full list of eslint rules
2 participants