Skip to content

fix(prefer-to-have-style): Remove autofix for computed access of el.style #286

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

Closed

Conversation

sjarva
Copy link

@sjarva sjarva commented Dec 3, 2022

What:

  • remove the autofix and related helper functions in src/rules/prefer-to-have-style.js
  • updated relevant test cases in src/rules/__tests__/lib/rules/prefer-to-have-style.js not to have output

Why:

To close #265.

Checklist:

  • [] Documentation N/A
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Dec 3, 2022

Codecov Report

Merging #286 (56cb534) into main (48fce31) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #286   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines          581       550   -31     
  Branches       167       155   -12     
=========================================
- Hits           581       550   -31     
Impacted Files Coverage Δ
src/rules/prefer-to-have-style.js 100.00% <ø> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sjarva sjarva requested review from G-Rath and benmonro December 3, 2022 15:27
Copy link
Collaborator

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

The autofixes that we're testing are all valid and correct, so we shouldn't be removing it - the issue is when the property is computed, which we don't currently have a test case for

i.e. we want to have this passing

    {
      code: `expect(imageElement.style[computed]).toBe(\`inset 0px 0px 0px 400px ${c}\`)`,
      errors,
      output: null,
    },

@github-actions
Copy link

github-actions bot commented Jun 4, 2023

🎉 This issue has been resolved in version 5.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[prefer-to-have-style] error when attempting to fix with computed access of el.style
2 participants