Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into simplify-install…
Browse files Browse the repository at this point in the history
…-instructions
  • Loading branch information
fredden committed Feb 14, 2023
2 parents a2cb670 + 5f4cb84 commit e51c908
Show file tree
Hide file tree
Showing 4 changed files with 129 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Magento2/Sniffs/Less/ClassNamingSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ public function process(File $phpcsFile, $stackPtr)
[implode("", $matches[0])]
);
}
if (strpos($className, self::STRING_HELPER_CLASSES_PREFIX, 2) !== false) {

if (strpos($className, self::STRING_HELPER_CLASSES_PREFIX, 2) !== false
&& !str_starts_with($className, 'admin__')
) {
$phpcsFile->addError(
'CSS class names should be separated with "-" (dash) instead of "_" (underscore)',
$stackPtr,
Expand Down
5 changes: 5 additions & 0 deletions Magento2/Tests/Less/ClassNamingUnitTest.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@
.category-title {
background: green;
}

// @see https://github.com/magento/magento-coding-standard/issues/409
.admin__allowed {
background: green;
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"ext-dom": "*",
"phpcompatibility/php-compatibility": "^9.3",
"squizlabs/php_codesniffer": "^3.6.1",
"rector/rector": "^0.15.10"
"rector/rector": "^0.15.10",
"symfony/polyfill": "^1.16"
},
"require-dev": {
"phpunit/phpunit": "^9.5.8"
Expand Down
119 changes: 118 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e51c908

Please sign in to comment.