From b0c59c69644c329957aafe0cee49a67535659b05 Mon Sep 17 00:00:00 2001 From: Caleb St-Denis Date: Mon, 9 Jul 2018 09:47:25 -0400 Subject: [PATCH 1/3] Rename `plugin/content-no-strings` rule to `shopify/content-no-strings` To emphasize that it's a custom Shopify rule --- CHANGELOG.md | 3 +++ index.js | 2 +- plugins/content-no-strings/content-no-strings.js | 2 +- plugins/content-no-strings/content-no-strings.test.js | 6 +++--- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c424496..7341f6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ +## [5.1.1] - 2018-07-09 +- Rename `plugin/content-no-strings` rule to `shopify/content-no-strings`. + ## [5.1.0] - 2018-07-05 - Added a new custom rule `plugin/content-no-strings` that disallows hard-coded strings as values for the `content` property. This prevents internationalization issues. Keywords are still allowed. diff --git a/index.js b/index.js index db1b160..37fd4a5 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ module.exports = { require('./rules/unit'), require('./rules/value'), { - 'plugin/content-no-strings': true, + 'shopify/content-no-strings': true, }, ), }; diff --git a/plugins/content-no-strings/content-no-strings.js b/plugins/content-no-strings/content-no-strings.js index 73cbc4c..295dc65 100644 --- a/plugins/content-no-strings/content-no-strings.js +++ b/plugins/content-no-strings/content-no-strings.js @@ -1,6 +1,6 @@ const stylelint = require('stylelint'); -const ruleName = 'plugin/content-no-strings'; +const ruleName = 'shopify/content-no-strings'; const messages = stylelint.utils.ruleMessages(ruleName, { rejected: 'You must not hard-code unlocalized strings into the `content` property', diff --git a/plugins/content-no-strings/content-no-strings.test.js b/plugins/content-no-strings/content-no-strings.test.js index 132e057..5fb7094 100644 --- a/plugins/content-no-strings/content-no-strings.test.js +++ b/plugins/content-no-strings/content-no-strings.test.js @@ -1,8 +1,8 @@ const testRule = require('stylelint-test-rule-tape'); -const shopifyi18n = require('.'); +const contentNoStrings = require('.'); -testRule(shopifyi18n.rule, { - ruleName: shopifyi18n.ruleName, +testRule(contentNoStrings.rule, { + ruleName: contentNoStrings.ruleName, config: true, skipBasicChecks: true, From 88e50fc8c008591b5424ecdb764bae3d11e43d0b Mon Sep 17 00:00:00 2001 From: Caleb St-Denis Date: Mon, 9 Jul 2018 09:48:13 -0400 Subject: [PATCH 2/3] Disable `shopify/content-no-strings` by default Requiring individual projects to opt into the rule makes more sense; not all projects need i18n --- CHANGELOG.md | 1 + index.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7341f6b..2717b15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ## [5.1.1] - 2018-07-09 - Rename `plugin/content-no-strings` rule to `shopify/content-no-strings`. +- Disable `shopify/content-no-strings` by default. ## [5.1.0] - 2018-07-05 diff --git a/index.js b/index.js index 37fd4a5..aa17fa4 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ module.exports = { require('./rules/unit'), require('./rules/value'), { - 'shopify/content-no-strings': true, + 'shopify/content-no-strings': null, }, ), }; From 6dc8c7a2733d8359f8d25049a6be05026f9cda01 Mon Sep 17 00:00:00 2001 From: Caleb St-Denis Date: Tue, 10 Jul 2018 09:11:55 -0400 Subject: [PATCH 3/3] Update changelog in preparation for v5.1.1 --- CHANGELOG.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2717b15..fd1085e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,13 +2,9 @@ -## [5.1.1] - 2018-07-09 -- Rename `plugin/content-no-strings` rule to `shopify/content-no-strings`. -- Disable `shopify/content-no-strings` by default. +## [5.1.1] - 2018-07-10 -## [5.1.0] - 2018-07-05 - -- Added a new custom rule `plugin/content-no-strings` that disallows hard-coded strings as values for the `content` property. This prevents internationalization issues. Keywords are still allowed. +- Added a new custom rule `shopify/content-no-strings` that disallows hard-coded strings as values for the `content` property. This prevents internationalization issues. Keywords are still allowed. The rule is not enabled by default. The following patterns are considered violations: @@ -30,6 +26,10 @@ The following patterns are _not_ considered violations: .foo::before { content: open-quote counter(section_counter) close-quote; } ``` +## [5.1.0] - 2018-07-05 [YANKED] + +- Use 5.1.1 instead. + ## [5.0.1] - 2018-04-06 - Updated dependency: stylelint-css (no breaking changes, only fixes) @@ -172,7 +172,8 @@ property: * Initial release -[Unreleased]: https://github.com/Shopify/stylelint-config-shopify/compare/v5.1.0...HEAD +[Unreleased]: https://github.com/Shopify/stylelint-config-shopify/compare/v5.1.1...HEAD +[5.1.1]: https://github.com/Shopify/stylelint-config-shopify/compare/v5.1.0...v5.1.1 [5.1.0]: https://github.com/Shopify/stylelint-config-shopify/compare/v5.0.1...v5.1.0 [5.0.1]: https://github.com/Shopify/stylelint-config-shopify/compare/v5.0.0...v5.0.1 [5.0.0]: https://github.com/Shopify/stylelint-config-shopify/compare/v4.0.0...v5.0.0