stylelint-config-crisp 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -55,6 +55,8 @@ This is the list of configured syntaxes, plugins and rules used by Stylelint Con
55
55
  #### SCSS rules
56
56
  - [scss/at-rule-conditional-no-parentheses](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/at-rule-conditional-no-parentheses): Rule is **disabled** to allow parentheses in conditional at-rules (if, elsif, while)
57
57
  - [scss/dollar-variable-empty-line-before](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/dollar-variable-empty-line-before): Rule is **disabled** to allow empty lines between logical variable blocks
58
+ - [scss/load-no-partial-leading-underscore](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/load-no-partial-leading-underscore): Rule is **disabled** to allow `@import`-ing files with underscore in their name
59
+ - [scss/map-keys-quotes](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/map-keys-quotes): Requires quoted keys in maps
58
60
  - [scss/no-global-function-names](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/no-global-function-names): Rule is **disabled** to keep using global function names, instead of the new built-in module system
59
61
  - [scss/operator-no-newline-after](https://github.com/stylelint-scss/stylelint-scss/tree/master/src/rules/operator-no-newline-after): Rule is **disabled** to allow linebreaks after Sass operators
60
62
 
@@ -75,6 +77,9 @@ This is the list of configured syntaxes, plugins and rules used by Stylelint Con
75
77
  #### Order rules
76
78
  - [order/order](https://github.com/hudochenkov/stylelint-order/tree/master/rules/order): Enforces the order of content within declaration blocks: dollar variables, then declarations, then nested rules
77
79
 
80
+ #### Crisp rules
81
+ - [at-rule-conditional-parentheses](https://github.com/crisp-oss/stylelint-config-crisp/blob/master/rules/at-rule-conditional-parentheses.js): Enforces parentheses in conditions of at-rules (`@if`, `@elseif`, `@while`)
82
+
78
83
  ## License
79
84
 
80
85
  stylelint-config-crisp is released under the MIT License. See the bundled LICENSE file for details.
package/index.js CHANGED
@@ -69,6 +69,8 @@ module.exports = {
69
69
  // SCSS rules
70
70
  "scss/at-rule-conditional-no-parentheses": null,
71
71
  "scss/dollar-variable-empty-line-before": null,
72
+ "scss/load-no-partial-leading-underscore": null,
73
+ "scss/map-keys-quotes": "always",
72
74
  "scss/no-global-function-names": null,
73
75
  "scss/operator-no-newline-after": null,
74
76
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-config-crisp",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Custom Stylelint Rules for Crisp",
5
5
  "author": "Crisp IM SAS",
6
6
  "main": "index.js",
@@ -2,7 +2,7 @@ const stylelint = require("stylelint");
2
2
 
3
3
  const ruleName = "crisp/at-rule-conditional-parentheses";
4
4
  const messages = stylelint.utils.ruleMessages(ruleName, {
5
- expected: "Expected parentheses in \"@if\" and \"@else-if\" statements",
5
+ expected: "Expected parentheses in \"@if\", \"@else-if\" and \"@while\" statements",
6
6
  });
7
7
 
8
8
  const ruleFunction = (primaryOption, secondaryOptions, context) => {
@@ -17,7 +17,7 @@ const ruleFunction = (primaryOption, secondaryOptions, context) => {
17
17
  }
18
18
 
19
19
  root.walkAtRules((rule) => {
20
- if (rule.name === "if" || rule.name === "else-if") {
20
+ if (["if", "else-if", "while"].includes(rule.name)) {
21
21
  if (!rule.params.startsWith("(") || !rule.params.endsWith(")")) {
22
22
  stylelint.utils.report({
23
23
  ruleName,