Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #36 from Shopify/content-no-strings-default
Browse files Browse the repository at this point in the history
Disable `content-no-strings` rule by default
  • Loading branch information
castdin authored Jul 10, 2018
2 parents 9bec5ae + 6dc8c7a commit f7d4d2f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<!-- ## [Unreleased] -->

## [5.1.0] - 2018-07-05
## [5.1.1] - 2018-07-10

- 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:

Expand All @@ -26,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)
Expand Down Expand Up @@ -168,7 +172,8 @@ property: <top> <right> <bottom> <left>
* 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
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
require('./rules/unit'),
require('./rules/value'),
{
'plugin/content-no-strings': true,
'shopify/content-no-strings': null,
},
),
};
2 changes: 1 addition & 1 deletion plugins/content-no-strings/content-no-strings.js
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
6 changes: 3 additions & 3 deletions plugins/content-no-strings/content-no-strings.test.js
Original file line number Diff line number Diff line change
@@ -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,

Expand Down

0 comments on commit f7d4d2f

Please sign in to comment.