From 2c9e2de5ea64754587109098352fef80718b9b30 Mon Sep 17 00:00:00 2001 From: Matthew Costabile Date: Tue, 23 Apr 2024 11:42:22 -0400 Subject: [PATCH] Update config to alloy nesting in css modules (#403) * Update index.js * fix test * Create giant-kangaroos-provide.md --------- Co-authored-by: Jon Rohan --- .changeset/giant-kangaroos-provide.md | 5 +++++ __tests__/__fixtures__/good/example.module.css | 2 -- index.js | 2 -- 3 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 .changeset/giant-kangaroos-provide.md diff --git a/.changeset/giant-kangaroos-provide.md b/.changeset/giant-kangaroos-provide.md new file mode 100644 index 0000000..8231270 --- /dev/null +++ b/.changeset/giant-kangaroos-provide.md @@ -0,0 +1,5 @@ +--- +"@primer/stylelint-config": minor +--- + +Update config to alloy nesting in css modules diff --git a/__tests__/__fixtures__/good/example.module.css b/__tests__/__fixtures__/good/example.module.css index f7c82d0..a69f3d7 100644 --- a/__tests__/__fixtures__/good/example.module.css +++ b/__tests__/__fixtures__/good/example.module.css @@ -133,12 +133,10 @@ } .details { - /* stylelint-disable-next-line max-nesting-depth */ &[open] .down-icon { display: none !important; } - /* stylelint-disable-next-line max-nesting-depth */ &:not([open]) .up-icon { display: none !important; } diff --git a/index.js b/index.js index b9eb8ec..c6b2f49 100644 --- a/index.js +++ b/index.js @@ -179,8 +179,6 @@ export default { { files: ['**/*.module.css'], rules: { - // Don't support nesting until it's more broadly shipped - 'max-nesting-depth': [0], 'property-no-unknown': [ true, {