Skip to content

Commit 5bc74db

Browse files
ihabadhamclaude
authored andcommitted
Fix stylelint configuration with correct rule names
- Remove @stylistic/stylelint-plugin dependency (not needed) - Fix deprecated rule names (color-keyword → color-named) - Disable formatting rules to match original scss-lint philosophy - Configuration now works correctly with stylelint v16 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5c92837 commit 5bc74db

File tree

3 files changed

+559
-120
lines changed

3 files changed

+559
-120
lines changed

.stylelintrc.json

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
{
22
"extends": "stylelint-config-standard-scss",
33
"rules": {
4-
"color-keyword": null,
4+
"color-named": null,
55
"color-hex-length": "long",
6-
"color-hex-case": "upper",
76
"selector-id-pattern": null,
8-
"number-leading-zero": "always",
9-
"scss/at-rule-no-unknown": [true, {
10-
"ignoreAtRules": ["include", "mixin", "each", "if", "else", "for", "while", "function", "return", "use", "forward"]
11-
}],
7+
"scss/at-rule-no-unknown": [
8+
true,
9+
{
10+
"ignoreAtRules": [
11+
"include",
12+
"mixin",
13+
"each",
14+
"if",
15+
"else",
16+
"for",
17+
"while",
18+
"function",
19+
"return",
20+
"use",
21+
"forward"
22+
]
23+
}
24+
],
1225
"selector-class-pattern": null,
1326
"custom-property-pattern": null,
1427
"keyframes-name-pattern": null,
1528
"scss/percent-placeholder-pattern": null,
1629
"scss/dollar-variable-pattern": null,
1730
"scss/at-function-pattern": null,
1831
"scss/at-mixin-pattern": null,
19-
"import-notation": null
32+
"import-notation": null,
33+
"at-rule-empty-line-before": null,
34+
"font-family-name-quotes": null,
35+
"rule-empty-line-before": null,
36+
"scss/dollar-variable-empty-line-before": null,
37+
"function-url-quotes": null
2038
},
2139
"ignoreFiles": [
2240
"spec/dummy/app/assets/stylesheets/application.css",
@@ -25,4 +43,4 @@
2543
"**/*.ts",
2644
"**/*.tsx"
2745
]
28-
}
46+
}

rakelib/lint.rake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ namespace :lint do
1212

1313
desc "Run stylelint as shell"
1414
task :scss do
15-
sh_in_dir(gem_root, "yarn run stylelint \"spec/dummy/app/assets/stylesheets/**/*.scss\" \"spec/dummy/client/**/*.scss\"")
15+
sh_in_dir(gem_root,
16+
"yarn run stylelint \"spec/dummy/app/assets/stylesheets/**/*.scss\" \"spec/dummy/client/**/*.scss\"")
1617
end
1718

1819
desc "Run eslint as shell"
@@ -29,7 +30,9 @@ namespace :lint do
2930
task :autofix do
3031
sh_in_dir(gem_root, "yarn run eslint . --fix")
3132
sh_in_dir(gem_root, "yarn run prettier --write .")
32-
sh_in_dir(gem_root, "yarn run stylelint \"spec/dummy/app/assets/stylesheets/**/*.scss\" \"spec/dummy/client/**/*.scss\" --fix")
33+
scss_paths = "\"spec/dummy/app/assets/stylesheets/**/*.scss\" \"spec/dummy/client/**/*.scss\""
34+
stylelint_cmd = "yarn run stylelint #{scss_paths} --fix"
35+
sh_in_dir(gem_root, stylelint_cmd)
3336
sh_in_dir(gem_root, "bundle exec rubocop -A")
3437
puts "Completed auto-fixing all linting violations"
3538
end

0 commit comments

Comments
 (0)