-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Copy link
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Description
Environment
Node version: 20.18.0
npm version: 10.8.3
Local ESLint version: 9.15.0
Global ESLint version: -
Operating System: Linux(Ubuntu 20.04)
What parser are you using?
Default (Espree)
What did you do?
Configuration
export default [{rules: {"sort-keys": "error"}}];const aName = "eName";
const obj = {
eName: 63,
[aName]: 34,
};
What did you expect to happen?
The sort-keys
rule should not ask to reorder dynamically computed keys.
What actually happened?
The sort-keys
rule expects [aName]
to be put before eName
, which could change the value of obj
depending on the content of aName
.
Link to Minimal Reproducible Example
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Type
Projects
Status
Complete