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

Disable content-no-strings rule by default #36

Merged
merged 3 commits into from
Jul 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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