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

Conversation

AllySummers
Copy link
Collaborator

@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: 4cdfe7f

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 ready!

Name Link
🔨 Latest commit 4cdfe7f
🔍 Latest deploy log https://app.netlify.com/sites/compiled-css-in-js/deploys/6719efd803366900084b1e27
😎 Deploy Preview https://deploy-preview-1727--compiled-css-in-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@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;
},

liamqma
liamqma previously approved these changes Oct 17, 2024
liamqma
liamqma previously approved these changes Oct 21, 2024
| [@compiled/no-keyframes-tagged-template-expression](./src/rules/no-keyframes-tagged-template-expression) | Disallows the `keyframes` tagged template expression | :white_check_mark: | :wrench: |
| [@compiled/no-styled-tagged-template-expression](./src/rules/no-styled-tagged-template-expression) | Disallows the `styled` tagged template expression | :white_check_mark: | :wrench: |
| [@compiled/no-css-prop-without-css-function](./src/rules/no-css-prop-without-css-function) | Disallows css prop without the css function | :white_check_mark: | :wrench: |
✅ Included in the recommended configuration.\
Copy link
Collaborator

Choose a reason for hiding this comment

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

thank you ❤️ ❤️ ❤️

Co-authored-by: Grant Wong <[email protected]>
@AllySummers AllySummers merged commit e8b09ec into atlassian-labs:master Oct 24, 2024
13 checks passed
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
4 participants