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

Fix incorrect location for matching violating times in time-min-milliseconds #4751

Closed
jeddy3 opened this issue May 7, 2020 · 4 comments · Fixed by #6319
Closed

Fix incorrect location for matching violating times in time-min-milliseconds #4751

jeddy3 opened this issue May 7, 2020 · 4 comments · Fixed by #6319
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule

Comments

@jeddy3
Copy link
Member

jeddy3 commented May 7, 2020

Clearly describe the bug

If there are two or more of the same violating times within a value they will all be reported at the location of the first violations.

We'll need to use the value parser to find the times so that we can make use of its sourceIndex property.

Ref: #4743

Which rule, if any, is the bug related to?

time-min-milliseconds

What code is needed to reproduce the bug?

a { animation: foo 0.01s ease 0.8s, bar 0.8s ease 0.01s; }

What stylelint configuration is needed to reproduce the bug?

{
  "rules": {
    "time-min-milliseconds": "200ms"
  }
}

Which version of stylelint are you using?

13.3.3

How are you running stylelint: CLI, PostCSS plugin, Node.js API?

CLI with stylelint "**/*.css"

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?

No.

What did you expect to happen?

Warnings to be flagged at the correct locations.

What actually happened (e.g. what warnings or errors did you get)?

Each warning is flagged at the first location.

@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule good first issue is good for newcomers labels May 7, 2020
@jeddy3 jeddy3 changed the title Fix incorrect location for matching violating times in Fix incorrect location for matching violating times in time-min-milliseconds May 17, 2020
@mattxwang
Copy link
Member

I think I can address this in lockstep with adding end positions to the rule; going to assign myself!

@mattxwang mattxwang self-assigned this Jun 27, 2022
@kawaguchi1102
Copy link
Contributor

Hi @mattxwang .

Are you working on this issue ?
If not, I am ready to do this .

@mattxwang
Copy link
Member

mattxwang commented Aug 28, 2022

Ah - @kawaguchi1102, someone else ended up handling the end positions so I had not. Going to unassign myself, feel free to take this on!

Note: it could be possible that this problem was resolved by #6273, so it may be worth investigating that first!

@mattxwang mattxwang removed their assignment Aug 28, 2022
@kawaguchi1102
Copy link
Contributor

@mattxwang
Thanks for the advice!

It seems that the problem has not been resolved even in the latest version.
So I will work on this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule
Development

Successfully merging a pull request may close this issue.

3 participants