Skip to content

Set max-nesting-depth to 5 in stylelint

Takuya Noguchi requested to merge 19977-max-nesting-depth-5-stylelint into master

What does this MR do?

Sets max-nesting-depth from 6 to 5 in stylelint.

Previous change: !53122 (merged)

Why not 4?

$ git diff
diff --git a/.stylelintrc b/.stylelintrc
index 807eeabfe02..6e72c0411cf 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -54,7 +54,7 @@
       "indentation": 2,
       "length-zero-no-unit": true,
       "max-nesting-depth": [
-         5,
+         4,
          {
             "ignoreAtRules":[
                "each",

With the above change, we will get the following:

$ $(yarn bin)/stylelint {ee/,}app/assets/stylesheets/**/*.{css,scss} | grep max-nesting-depth
 432:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 436:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 244:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 248:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 430:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 512:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 758:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 764:11  ⚠  Expected nesting depth to be no more than 4                                                                                                                                max-nesting-depth               
 171:11  ⚠  Expected nesting depth to be no more than 4            max-nesting-depth     
 175:11  ⚠  Expected nesting depth to be no more than 4            max-nesting-depth     
 185:11  ⚠  Expected nesting depth to be no more than 4            max-nesting-depth     
 232:11  ⚠  Expected nesting depth to be no more than 4            max-nesting-depth     
 239:11  ⚠  Expected nesting depth to be no more than 4            max-nesting-depth     
 202:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 206:11  ⚠  Expected nesting depth to be no more than 4                                                                             max-nesting-depth                    
 210:11  ⚠  Expected nesting depth to be no more than 4                                                                             max-nesting-depth                    
 220:11  ⚠  Expected nesting depth to be no more than 4                                                                             max-nesting-depth                    
 224:11  ⚠  Expected nesting depth to be no more than 4                                                                             max-nesting-depth                    
  17:11  ⚠  Expected nesting depth to be no more than 4                                                                  max-nesting-depth               
 197:11  ⚠  Expected nesting depth to be no more than 4                                 max-nesting-depth                    
 206:11  ⚠  Expected nesting depth to be no more than 4                                 max-nesting-depth                    
 765:11  ⚠  Expected nesting depth to be no more than 4                                 max-nesting-depth                    
 307:11  ⚠  Expected nesting depth to be no more than 4                                                                                          max-nesting-depth               
 311:11  ⚠  Expected nesting depth to be no more than 4                                                                                          max-nesting-depth               
 315:11  ⚠  Expected nesting depth to be no more than 4                                                                                          max-nesting-depth               
 470:11  ⚠  Expected nesting depth to be no more than 4                                                                                          max-nesting-depth               
  72:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  78:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  89:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  93:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  99:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 111:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 121:13  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  25:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  31:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
  96:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 107:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth
 120:11  ⚠  Expected nesting depth to be no more than 4   max-nesting-depth

Screenshots (strongly suggested)

n/a

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

  • [n/a] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [n/a] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [n/a] Security reports checked/validated by a reviewer from the AppSec team

Closes #19977 (closed)

Edited by Takuya Noguchi

Merge request reports