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 2 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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [5.1.1] - 2018-07-09
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reference this tag at the bottom of the CHANGELOG as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- Rename `plugin/content-no-strings` rule to `shopify/content-no-strings`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change :/ Unless you mark 5.1.0 as yanked, like so:

## 5.1.0 - 2018-07-05 [YANKED]

Use 5.1.1 instead.

And pull all changelog items from 5.1.0 to 5.1.1.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. 😬 Worth it in the end, I think

- Disable `shopify/content-no-strings` by default.

## [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.
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