Skip to content

[BUG] Duplicate rule keys in .stylelintrc.json configuration #2771

@Rajlakshmi-ai

Description

@Rajlakshmi-ai

🐛 What's broken?

The .stylelintrc.json file contains duplicate keys within the "rules" object. Defining the same rule multiple times in a JSON configuration file can cause unpredictable behavior depending on the parser and creates confusion for anyone maintaining the file.

Specifically, the following rules are declared more than once:

  1. color-function-alias-notation (both set to null)
  2. no-duplicate-selectors (set to null, then later set to true)
  3. declaration-block-no-duplicate-properties (set to null, then later set to true)

📋 Steps to Reproduce

  1. Navigate to the repository file: .stylelintrc.json.
  2. Review the "rules" object.
  3. Observe that several keys are repeated at different points in the list.

✅ Expected Behavior

Each stylelint rule should only be defined once in the configuration file to ensure the linter enforces the correct and intended value. The duplicate entries should be removed, keeping only the intended final values (e.g., true for the duplication rules).


❌ Actual Behavior

Multiple identical keys exist in the same JSON object, violating JSON best practices.


🔗 Reproduction

Current Structure (Duplicates highlighted):

"rules": {
  "color-function-alias-notation": null, 
  // ... other rules ...
  "no-duplicate-selectors": null,
  "declaration-block-no-duplicate-properties": null,
  "color-function-alias-notation": null, 
  "property-no-deprecated": null,
  "declaration-block-no-duplicate-custom-properties": null,
  "no-duplicate-selectors": true,
  "declaration-block-no-duplicate-properties": true,
  // ...
}

Metadata

Metadata

Assignees

Labels

GSSoC-26Official GSSoC 2026 issueacceptedContribution approved for integration into EaseMotion CSSgood first issueGood for newcomersgssoc:approvedApproved for GSSoC contributionshelp wantedExtra attention neededlevel:intermediateRequires moderate project understanding

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions