Repository: ember-template-lint/ember-template-lint
Pull request #377 (2018-03-28 17:24:51)

rename rules
closes: #283 
deprecated rule names are corrected at runtime and a deprecation message will be printed.

![template-lint-deprecations](https://user-images.githubusercontent.com/19377375/38050869-c24e1e06-32cc-11e8-98ba-8b43f9a4a03c.png)


rwjblue: Mind doing a rebase to kick off a new CI job?
FalkF: @rwjblue done :+1: 
rwjblue: @FalkF - This looks good to me, I seem to have made a conflict though in a recent PR merge. Can you rebase?

Also, to confirm, this is specifically _not_ a breaking change (because we deprecate but still allow the "old" names).

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2c7bf9ef..060667d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -277,12 +277,12 @@ You can read more about the rule (and configuration) [in the documentation](http
 ## v0.6.3
 
 - Add support for Handlebars comments.
-  
+
   A few new types of control statements are now available:
     * `{{! template-lint-enable some-rule-name }}` - This will enable the rule `some-rule-name` with the default configuration (from `.template-lintrc.js`) or `true` (if not present in the config file). This can be ran for multiple rules at once (i.e. `{{! template-lint-enable bare-strings some-other-thing }}`).
     * `{{! template-lint-disable some-rule-name }}` - This will disable the rule `some-rule-name`. Multiple rules can be provided at once (i.e. `{{! template-lint-disable bare-strings some-other-thing }}`).
     * `{{! template-lint-configure some-rule-name { "whitelist": ["some", "valid", "json"] } }}` - This configures the rule `some-rule-name` with the `JSON.parse()`'ed result of the second argument.  The configure instruction only applies toa  single rule at a time.
-  
+
   These configuration instructions do not modify the rule for the rest of the template, but instead only modify it within whatever DOM scope the comment instruction appears.
 
   An instruction will apply to all later siblings and their descendants:
diff --git a/README.md b/README.md
index c368dba3..78d8f6a2 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ ember-template-lint will lint your template and return error results. This is co
 used through ember-cli-template-lint which adds failing lint tests for consuming ember-cli
 applications.
 
-For example, given the rule [`bare-strings`](docs/rule/bare-strings.md) is enabled, this template would be
+For example, given the rule [`no-bare-strings`](docs/rule/no-bare-strings.md) is enabled, this template would be
 in violation:
 
 ```hbs
@@ -18,7 +18,7 @@ in violation:
 ```
 
 When ran through the linter's `verify` method, we would have a single result indicating that
-the `bare-strings` rule found an error.
+the `no-bare-strings` rule found an error.
 
 ## Install
 
@@ -89,13 +89,13 @@ module.exports = {
   extends: 'recommended',
 
   rules: {
-    'bare-strings': true
+    'no-bare-strings': true
   }
 }
 ```
 
 This extends from the builtin recommended configuration ([lib/config/recommended.js](https://github.com/rwjblue/ember-template-lint/blob/master/lib/config/recommended.js)),
-and also enables the `bare-strings` rule (see [here](https://github.com/rwjblue/ember-template-lint#bare-strings)).
+and also enables the `no-bare-strings` rule (see [here](https://github.com/rwjblue/ember-template-lint#no-bare-strings)).
 
 Using this mechanism allows you to extend from the builtin, and modify specific rules as needed.
 
@@ -105,7 +105,7 @@ some "bare strings" that are allowed you might have:
 ```javascript
 module.exports = {
   rules: {
-    'bare-strings': ['ZOMG THIS IS ALLOWED!!!!']
+    'no-bare-strings': ['ZOMG THIS IS ALLOWED!!!!']
   }
 };
 ```
@@ -118,28 +118,28 @@ It is also possible to disable specific rules (or all rules) in a template itsel
 <!-- disable all rules -->
 {{! template-lint-disable }}
 
-<!-- disable bare-strings -->
-{{! template-lint-disable bare-strings }}
+<!-- disable no-bare-strings -->
+{{! template-lint-disable no-bare-strings }}
 
-<!-- disable bare-strings and triple-curlies -->
-{{! template-lint-disable bare-strings triple-curlies }}
+<!-- disable no-bare-strings and no-triple-curlies -->
+{{! template-lint-disable no-bare-strings no-triple-curlies }}
 
 <!-- enable all rules -->
 {{! template-lint-enable }}
 
-<!-- enable bare-strings -->
-{{! template-lint-enable bare-strings }}
+<!-- enable no-bare-strings -->
+{{! template-lint-enable no-bare-strings }}
 
-<!-- enable bare-strings and triple-curlies -->
-{{! template-lint-enable bare-strings triple-curlies }}
+<!-- enable no-bare-strings and no-triple-curlies -->
+{{! template-lint-enable no-bare-strings no-triple-curlies }}
 ```
 
 and to configure rules in the template:
 
 ```hbs
-{{! template-lint-configure bare-strings ["ZOMG THIS IS ALLOWED!!!!"] }}
+{{! template-lint-configure no-bare-strings ["ZOMG THIS IS ALLOWED!!!!"] }}
 
-{{! template-lint-configure bare-strings {"whitelist": "(),.", "globalAttributes": ["title"]} }}
+{{! template-lint-configure no-bare-strings {"whitelist": "(),.", "globalAttributes": ["title"]} }}
 ```
 
 The configure instruction can only configure a single rule, and the configuration value must be valid JSON that parses into a configuration for that rule.
diff --git a/docs/rule/bare-strings.md b/docs/rule/no-bare-strings.md
similarity index 98%
rename from docs/rule/bare-strings.md
rename to docs/rule/no-bare-strings.md
index 13f34afa..9170bb41 100644
--- a/docs/rule/bare-strings.md
+++ b/docs/rule/no-bare-strings.md
@@ -1,4 +1,4 @@
-## bare-strings
+## no-bare-strings
 
 In order to be able to internationalize your application, you will need to avoid using plain strings in your templates. Instead, you would need to use a template helper specializing in translation ([ember-i18n](https://github.com/jamesarosen/ember-i18n) and [ember-intl](https://github.com/yahoo/ember-intl) are great projects to use for this).
 
diff --git a/docs/rule/html-comments.md b/docs/rule/no-html-comments.md
similarity index 95%
rename from docs/rule/html-comments.md
rename to docs/rule/no-html-comments.md
index 46aaebe3..0bb498d7 100644
--- a/docs/rule/html-comments.md
+++ b/docs/rule/no-html-comments.md
@@ -1,4 +1,4 @@
-## html-comments
+## no-html-comments
 
 Html comments in your templates will get compiled and rendered into the DOM at runtime. Instead you can annotate your templates using Handlebars comments, which will be stripped out when the template is compiled and have no effect at runtime.
 
diff --git a/docs/rule/inline-styles.md b/docs/rule/no-inline-styles.md
similarity index 95%
rename from docs/rule/inline-styles.md
rename to docs/rule/no-inline-styles.md
index ceb8afea..4223bbfc 100644
--- a/docs/rule/inline-styles.md
+++ b/docs/rule/no-inline-styles.md
@@ -1,4 +1,4 @@
-## inline-styles
+## no-inline-styles
 
 Inline styles are not the best practice because they are hard to maintain and usually make the overall size of the project bigger. This rule forbids the inline styles.
 
diff --git a/docs/rule/invalid-interactive.md b/docs/rule/no-invalid-interactive.md
similarity index 90%
rename from docs/rule/invalid-interactive.md
rename to docs/rule/no-invalid-interactive.md
index 8db321f0..b932c641 100644
--- a/docs/rule/invalid-interactive.md
+++ b/docs/rule/no-invalid-interactive.md
@@ -1,4 +1,4 @@
-## invalid-interactive
+## no-invalid-interactive
 
 Adding interactivity to an element that is not naturally interactive content leads to a very poor experience for
 users of assistive technology (i.e. screen readers). In order to ensure that screen readers can provide useful information
@@ -17,7 +17,7 @@ Instead, you should add a `role` to the element in question so that the A/T is a
 <div role="button" {{action "foo"}}></div>
 ```
 
-The following values are valid configuration (same as the `nested-interactive` rule above):
+The following values are valid configuration (same as the `no-nested-interactive` rule above):
 
   * boolean -- `true` indicates all whitelist test will run, `false` indicates that the rule is disabled.
   * object - Containing the following values:
diff --git a/docs/rule/nested-interactive.md b/docs/rule/no-nested-interactive.md
similarity index 97%
rename from docs/rule/nested-interactive.md
rename to docs/rule/no-nested-interactive.md
index ca425384..baebd681 100644
--- a/docs/rule/nested-interactive.md
+++ b/docs/rule/no-nested-interactive.md
@@ -1,4 +1,4 @@
-#### nested-interactive
+#### no-nested-interactive
 
 Usage of nested `interactive content` can lead to UX problems, accessibility
 problems, bugs and in some cases to DOM errors. You should not put interactive
diff --git a/docs/rule/triple-curlies.md b/docs/rule/no-triple-curlies.md
similarity index 95%
rename from docs/rule/triple-curlies.md
rename to docs/rule/no-triple-curlies.md
index 7fb16cca..73a99931 100644
--- a/docs/rule/triple-curlies.md
+++ b/docs/rule/no-triple-curlies.md
@@ -1,4 +1,4 @@
-## triple-curlies
+## no-triple-curlies
 
 Usage of triple curly braces to allow raw HTML to be injected into the DOM is large vector for exploits of your application (especially when the raw HTML is user controllable ). Instead of using `{{{foo}}}`, you should use appropriate helpers or computed properties that return a `SafeString` (via `Ember.String.htmlSafe` generally) and ensure that user supplied data is properly escaped.
 
diff --git a/docs/rule/unused-block-params.md b/docs/rule/no-unused-block-params.md
similarity index 94%
rename from docs/rule/unused-block-params.md
rename to docs/rule/no-unused-block-params.md
index 5949a3d1..01d17360 100644
--- a/docs/rule/unused-block-params.md
+++ b/docs/rule/no-unused-block-params.md
@@ -1,4 +1,4 @@
-## unused-block-params
+## no-unused-block-params
 
 This rule forbids unused block parameters except when they are needed to access a later parameter.
 
diff --git a/docs/rules.md b/docs/rules.md
index 1adc6baf..e6b30474 100644
--- a/docs/rules.md
+++ b/docs/rules.md
@@ -1,17 +1,17 @@
 # Rules
 
 * [attribute-indentation](rule/attribute-indentation.md)
-* [bare-strings](rule/bare-strings.md)
+* [no-bare-strings](rule/no-bare-strings.md)
 * [block-indentation](rule/block-indentation.md)
 * [eol-last](rule/eol-last.md)
 * [invocable-blacklist](rule/invocable-blacklist.md)
-* [html-comments](rule/html-comments.md)
+* [no-html-comments](rule/no-html-comments.md)
 * [img-alt-attributes](rule/img-alt-attributes.md)
 * [inline-link-to](rule/inline-link-to.md)
-* [inline-styles](rule/inline-styles.md)
-* [invalid-interactive](rule/invalid-interactive.md)
+* [no-inline-styles](rule/no-inline-styles.md)
+* [no-invalid-interactive](rule/no-invalid-interactive.md)
 * [link-rel-noopener](rule/link-rel-noopener.md)
-* [nested-interactive](rule/nested-interactive.md)
+* [no-nested-interactive](rule/no-nested-interactive.md)
 * [no-debugger](rule/no-debugger.md)
 * [no-duplicate-attributes](rule/no-duplicate-attributes.md)
 * [no-log](rule/no-log.md)
@@ -27,8 +27,8 @@
 * [style-concatenation](rule/style-concatenation.md)
 * [table-groups](rule/table-groups.md)
 * [template-length](rule/template-length.md)
-* [triple-curlies](rule/triple-curlies.md)
-* [unused-block-params](rule/unused-block-params.md)
+* [no-triple-curlies](rule/no-triple-curlies.md)
+* [no-unused-block-params](rule/no-unused-block-params.md)
 
 ## Deprecations
 
diff --git a/lib/config/recommended.js b/lib/config/recommended.js
index 5bcaf6f0..89b3fb23 100644
--- a/lib/config/recommended.js
+++ b/lib/config/recommended.js
@@ -5,17 +5,17 @@ module.exports = {
     'block-indentation': 2,
     'no-debugger': true,
     'no-log': true,
-    'html-comments': true,
-    'nested-interactive': true,
+    'no-html-comments': true,
+    'no-nested-interactive': true,
     'self-closing-void-elements': true,
-    'triple-curlies': true,
+    'no-triple-curlies': true,
     'link-rel-noopener': true,
-    'invalid-interactive': true,
+    'no-invalid-interactive': true,
     'img-alt-attributes': true,
     'style-concatenation': true,
     'deprecated-inline-view-helper': true,
     'deprecated-render-helper': true,
     'simple-unless': true,
-    'unused-block-params': true
+    'no-unused-block-params': true
   }
 };
diff --git a/lib/get-config.js b/lib/get-config.js
index 50e840af..ff631dd3 100644
--- a/lib/get-config.js
+++ b/lib/get-config.js
@@ -6,6 +6,7 @@ const chalk = require('chalk');
 const Minimatch = require('minimatch').Minimatch;
 const defaultRules = require('./rules');
 const defaultConfigurations = require('./config/index');
+const DEPRECATED_RULES = require('./helpers/deprecated-rules');
 
 const KNOWN_ROOT_PROPERTIES = ['extends', 'rules', 'pending', 'ignore', 'plugins'];
 
@@ -276,16 +277,27 @@ function processIgnores(config) {
 function validateRules(config, options) {
   let logger = options.console || console;
   let invalidKeysFound = [];
+  let deprecatedNamesFound = [];
 
   for (let key in config.rules) {
     if (!config.loadedRules[key]) {
-      invalidKeysFound.push(key);
+      const deprecation = DEPRECATED_RULES.get(key);
+      if (deprecation) {
+        deprecatedNamesFound.push({ oldName: key, newName: deprecation });
+        config.rules[deprecation.newName] = config.rules[key];
+        delete config.rules[key];
+      } else {
+        invalidKeysFound.push(key);
+      }
     }
   }
 
   if (invalidKeysFound.length > 0) {
     logger.log(chalk.yellow(`Invalid rule configuration found: ${invalidKeysFound}`));
   }
+  if (deprecatedNamesFound.length > 0) {
+    logger.log(chalk.yellow(`Deprecated rule names found: ${JSON.stringify(deprecatedNamesFound, null, 4)}`));
+  }
 }
 
 module.exports = function(options) {
diff --git a/lib/helpers/deprecated-rules.js b/lib/helpers/deprecated-rules.js
new file mode 100644
index 00000000..a6237860
--- /dev/null
+++ b/lib/helpers/deprecated-rules.js
@@ -0,0 +1,14 @@
+'use strict';
+
+let DEPRECATED_RULES = new Map([
+  // deprecated in the 0.8.x cycle, can be removed just before 0.9.0
+  ['inline-styles', 'no-inline-styles'],
+  ['bare-strings', 'no-bare-strings'],
+  ['html-comments', 'no-html-comments'],
+  ['invalid-interactive', 'no-invalid-interactive'],
+  ['nested-interactive', 'no-nested-interactive'],
+  ['triple-curlies', 'no-triple-curlies'],
+  ['unused-block-params', 'no-unused-block-params'],
+]);
+
+module.exports = DEPRECATED_RULES;
diff --git a/lib/rules/base.js b/lib/rules/base.js
index 2fb571cc..f7b4b55e 100644
--- a/lib/rules/base.js
+++ b/lib/rules/base.js
@@ -2,6 +2,7 @@
 
 const chalk = require('chalk');
 const calculateLocationDisplay = require('../helpers/calculate-location-display');
+const DEPRECATED_RULES = require('../helpers/deprecated-rules');
 
 // Constant to return from AST handlers so we know to remove/unregister them
 const REMOVE_HANDLER = {};
@@ -67,13 +68,17 @@ module.exports = class BaseRule {
 
   }
 
-  // The `firstArg !== ruleName` check isn't strictly necessary, but allows
+  // The `name !== this.ruleName` check isn't strictly necessary, but allows
   // unit tests to register test rules
   _isRuleName(name) {
     // must be required lazily so that rules can be populated
     let rules = require('./index');
 
-    return rules[name] || name === this.ruleName;
+    return rules[name] || name === this.ruleName || DEPRECATED_RULES.has(name);
+  }
+
+  _refersToCurrentRule(name) {
+    return name === this.ruleName || DEPRECATED_RULES.get(name) === this.ruleName;
   }
 
   parseConfig(config) {
@@ -393,7 +398,7 @@ module.exports = class BaseRule {
           }
         }
 
-        if (names.indexOf(this.ruleName) === -1) {
+        if (names.every(name => !this._refersToCurrentRule(name))) {
           // Explicit list that doesn't include us
           return null;
         }
@@ -437,7 +442,7 @@ module.exports = class BaseRule {
         return;
       }
 
-      if (firstArg !== this.ruleName) {
+      if (!this._refersToCurrentRule(firstArg)) {
         // Valid rule, but not us, so not relevant
         return null;
       }
@@ -500,7 +505,7 @@ module.exports = class BaseRule {
       }
 
       // handle <!-- template-lint block-indentation=false -->
-      if (key === this.ruleName && value === 'false') {
+      if (this._refersToCurrentRule(key) && value === 'false') {
         for (i = 0; i < this._configStack.length; i++) {
           this._configStack[i] = false;
         }
diff --git a/lib/rules/index.js b/lib/rules/index.js
index f57de625..37759299 100644
--- a/lib/rules/index.js
+++ b/lib/rules/index.js
@@ -1,7 +1,7 @@
 'use strict';
 
 module.exports = {
-  'bare-strings': require('./lint-bare-strings'),
+  'no-bare-strings': require('./lint-no-bare-strings'),
   'block-indentation': require('./lint-block-indentation'),
   'no-debugger': require('./lint-no-debugger'),
   'no-log': require('./lint-no-log'),
@@ -9,21 +9,21 @@ module.exports = {
   'no-input-tagname': require('./lint-no-input-tagname'),
   'no-unbound': require('./lint-no-unbound'),
   'no-outlet-outside-routes': require('./lint-no-outlet-outside-routes'),
-  'html-comments': require('./lint-html-comments'),
+  'no-html-comments': require('./lint-no-html-comments'),
   'img-alt-attributes': require('./lint-img-alt-attributes'),
-  'inline-styles': require('./lint-inline-styles'),
+  'no-inline-styles': require('./lint-no-inline-styles'),
   'link-rel-noopener': require('./lint-link-rel-noopener'),
-  'triple-curlies': require('./lint-triple-curlies'),
+  'no-triple-curlies': require('./lint-no-triple-curlies'),
   'self-closing-void-elements': require('./lint-self-closing-void-elements'),
-  'nested-interactive': require('./lint-nested-interactive'),
+  'no-nested-interactive': require('./lint-no-nested-interactive'),
   'inline-link-to': require('./lint-inline-link-to'),
   'deprecated-each-syntax': require('./deprecations/lint-deprecated-each-syntax'),
   'deprecated-inline-view-helper': require('./deprecations/lint-deprecated-inline-view-helper'),
   'deprecated-render-helper': require('./deprecations/lint-deprecated-render-helper'),
-  'invalid-interactive': require('./lint-invalid-interactive'),
+  'no-invalid-interactive': require('./lint-no-invalid-interactive'),
   'style-concatenation': require('./lint-style-concatenation'),
   'simple-unless': require('./lint-simple-unless'),
-  'unused-block-params': require('./lint-unused-block-params'),
+  'no-unused-block-params': require('./lint-no-unused-block-params'),
   'no-duplicate-attributes': require('./lint-duplicate-attributes'),
   'linebreak-style': require('./lint-linebreak-style'),
   'attribute-indentation': require('./lint-attribute-indentation'),
diff --git a/lib/rules/internal/remove-configuration-html-comments.js b/lib/rules/internal/remove-configuration-html-comments.js
index 02fb580a..1a4d10a3 100644
--- a/lib/rules/internal/remove-configuration-html-comments.js
+++ b/lib/rules/internal/remove-configuration-html-comments.js
@@ -1,7 +1,7 @@
 'use strict';
 
 // this Babel plugin removes configuration comments such as:
-//   <!-- template-lint triple-curlies=false -->
+//   <!-- template-lint no-triple-curlies=false -->
 //   <!-- template-lint enabled=false -->
 
 const AstNodeInfo = require('../../helpers/ast-node-info');
diff --git a/lib/rules/lint-bare-strings.js b/lib/rules/lint-no-bare-strings.js
similarity index 100%
rename from lib/rules/lint-bare-strings.js
rename to lib/rules/lint-no-bare-strings.js
diff --git a/lib/rules/lint-html-comments.js b/lib/rules/lint-no-html-comments.js
similarity index 100%
rename from lib/rules/lint-html-comments.js
rename to lib/rules/lint-no-html-comments.js
diff --git a/lib/rules/lint-inline-styles.js b/lib/rules/lint-no-inline-styles.js
similarity index 100%
rename from lib/rules/lint-inline-styles.js
rename to lib/rules/lint-no-inline-styles.js
diff --git a/lib/rules/lint-invalid-interactive.js b/lib/rules/lint-no-invalid-interactive.js
similarity index 100%
rename from lib/rules/lint-invalid-interactive.js
rename to lib/rules/lint-no-invalid-interactive.js
diff --git a/lib/rules/lint-nested-interactive.js b/lib/rules/lint-no-nested-interactive.js
similarity index 96%
rename from lib/rules/lint-nested-interactive.js
rename to lib/rules/lint-no-nested-interactive.js
index 509348fe..06219a67 100644
--- a/lib/rules/lint-nested-interactive.js
+++ b/lib/rules/lint-no-nested-interactive.js
@@ -20,7 +20,7 @@ const Rule = require('./base');
 const isInteractiveElement = require('../helpers/is-interactive-element');
 const parseConfig = require('../helpers/parse-interactive-element-config');
 
-const ARRAY_DEPRECATION_MESSAGE = 'Specifying an array as the configurate for the `nested-interactive` rule is deprecated and will be removed in future versions.  Please update `.template-lintrc.js` to use the newer object format.';
+const ARRAY_DEPRECATION_MESSAGE = 'Specifying an array as the configurate for the `no-nested-interactive` rule is deprecated and will be removed in future versions.  Please update `.template-lintrc.js` to use the newer object format.';
 
 function convertConfigArrayToObject(config) {
   let base = {


Test patch:
diff --git a/lib/rules/lint-triple-curlies.js b/lib/rules/lint-no-triple-curlies.js
similarity index 100%
rename from lib/rules/lint-triple-curlies.js
rename to lib/rules/lint-no-triple-curlies.js
diff --git a/lib/rules/lint-unused-block-params.js b/lib/rules/lint-no-unused-block-params.js
similarity index 100%
rename from lib/rules/lint-unused-block-params.js
rename to lib/rules/lint-no-unused-block-params.js
diff --git a/test/acceptance-test.js b/test/acceptance-test.js
index 688b5e84..4826d574 100644
--- a/test/acceptance-test.js
+++ b/test/acceptance-test.js
@@ -113,7 +113,7 @@ describe('public api', function() {
           line: 1,
           column: 4,
           source: 'Here too!!',
-          rule: 'bare-strings',
+          rule: 'no-bare-strings',
           severity: 2
         }, {
           message: 'Non-translated string used',
@@ -121,7 +121,7 @@ describe('public api', function() {
           line: 2,
           column: 5,
           source: 'Bare strings are bad...',
-          rule: 'bare-strings',
+          rule: 'no-bare-strings',
           severity: 2
         }
       ];
@@ -147,7 +147,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true },
+          rules: { 'no-bare-strings': true },
           pending: ['some/path/here']
         }
       });
@@ -164,7 +164,7 @@ describe('public api', function() {
         line: 1,
         column: 5,
         source: 'bare string',
-        rule: 'bare-strings',
+        rule: 'no-bare-strings',
         severity: 1
       };
 
@@ -175,7 +175,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true, 'block-indentation': true },
+          rules: { 'no-bare-strings': true, 'block-indentation': true },
           pending: [
             { moduleId: 'some/path/here', only: ['block-indentation'] }
           ]
@@ -194,7 +194,7 @@ describe('public api', function() {
         line: 1,
         column: 5,
         source: 'bare string',
-        rule: 'bare-strings',
+        rule: 'no-bare-strings',
         severity: 2
       };
 
@@ -205,7 +205,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true, 'block-indentation': true },
+          rules: { 'no-bare-strings': true, 'block-indentation': true },
           pending: [
             { moduleId: 'some/path/here', only: ['block-indentation'] }
           ]
@@ -240,7 +240,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true },
+          rules: { 'no-bare-strings': true },
           pending: ['some/path/here' ]
         }
       });
@@ -264,9 +264,9 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true },
+          rules: { 'no-bare-strings': true },
           pending: [
-            { moduleId: 'some/path/here', only: ['bare-strings']}
+            { moduleId: 'some/path/here', only: ['no-bare-strings']}
           ]
         }
       });
@@ -290,7 +290,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true, 'block-indentation': true },
+          rules: { 'no-bare-strings': true, 'block-indentation': true },
           ignore: [ 'some/path/here' ]
         }
       });
@@ -308,7 +308,7 @@ describe('public api', function() {
       linter = new Linter({
         console: mockConsole,
         config: {
-          rules: { 'bare-strings': true, 'block-indentation': true },
+          rules: { 'no-bare-strings': true, 'block-indentation': true },
           ignore: [ 'some/path/*' ]
         }
       });
@@ -416,7 +416,7 @@ describe('public api', function() {
           line: 2,
           column: 2,
           source: '{{{myVar}}}',
-          rule: 'triple-curlies',
+          rule: 'no-triple-curlies',
           severity: 2
         },
         {
@@ -508,7 +508,7 @@ describe('public api', function() {
         config: {
           pending: [
             'some/path/here',
-            { moduleId: 'foo/bar/baz', only: ['bare-strings']}
+            { moduleId: 'foo/bar/baz', only: ['no-bare-strings']}
           ]
         }
       });
diff --git a/test/fixtures/config/disable-all.js b/test/fixtures/config/disable-all.js
index 9818668e..d214e6b7 100644
--- a/test/fixtures/config/disable-all.js
+++ b/test/fixtures/config/disable-all.js
@@ -1,6 +1,6 @@
 'use strict';
 
 module.exports = {
-  'bare-strings': false,
+  'no-bare-strings': false,
   'block-indentation': false
 };
diff --git a/test/fixtures/with-errors/.template-lintrc.js b/test/fixtures/with-errors/.template-lintrc.js
index b6f60b59..e894d9d8 100644
--- a/test/fixtures/with-errors/.template-lintrc.js
+++ b/test/fixtures/with-errors/.template-lintrc.js
@@ -1,5 +1,5 @@
 module.exports = {
   rules: {
-    'bare-strings': true
+    'no-bare-strings': true
   }
 };
diff --git a/test/fixtures/with-inline-plugins/.template-lintrc.js b/test/fixtures/with-inline-plugins/.template-lintrc.js
index 0573f880..73e12387 100644
--- a/test/fixtures/with-inline-plugins/.template-lintrc.js
+++ b/test/fixtures/with-inline-plugins/.template-lintrc.js
@@ -9,6 +9,6 @@ module.exports = {
   ],
   rules: {
     'inline-component': true,
-    'bare-strings': true
+    'no-bare-strings': true
   }
 };
diff --git a/test/fixtures/with-multiple-extends/plugins/plugin1.js b/test/fixtures/with-multiple-extends/plugins/plugin1.js
index da0c7f5c..18f7c270 100644
--- a/test/fixtures/with-multiple-extends/plugins/plugin1.js
+++ b/test/fixtures/with-multiple-extends/plugins/plugin1.js
@@ -15,7 +15,7 @@ module.exports = {
 
       rules: {
         'inline-component': true,
-        'bare-strings': true
+        'no-bare-strings': true
       }
 
     }
diff --git a/test/fixtures/with-plugin-with-configurations/plugins/plugin1.js b/test/fixtures/with-plugin-with-configurations/plugins/plugin1.js
index da0c7f5c..18f7c270 100644
--- a/test/fixtures/with-plugin-with-configurations/plugins/plugin1.js
+++ b/test/fixtures/with-plugin-with-configurations/plugins/plugin1.js
@@ -15,7 +15,7 @@ module.exports = {
 
       rules: {
         'inline-component': true,
-        'bare-strings': true
+        'no-bare-strings': true
       }
 
     }
diff --git a/test/fixtures/with-plugins-overwriting/.template-lintrc.js b/test/fixtures/with-plugins-overwriting/.template-lintrc.js
index fcd61cd7..f4326377 100644
--- a/test/fixtures/with-plugins-overwriting/.template-lintrc.js
+++ b/test/fixtures/with-plugins-overwriting/.template-lintrc.js
@@ -8,6 +8,6 @@ module.exports = {
     'plugin1:enable-inline-component',
   ],
   rules: {
-    'bare-strings': true
+    'no-bare-strings': true
   }
 };
diff --git a/test/fixtures/with-plugins/.template-lintrc.js b/test/fixtures/with-plugins/.template-lintrc.js
index b584deab..4dbba081 100644
--- a/test/fixtures/with-plugins/.template-lintrc.js
+++ b/test/fixtures/with-plugins/.template-lintrc.js
@@ -4,6 +4,6 @@ module.exports = {
   ],
   rules: {
     'inline-component': true,
-    'bare-strings': true
+    'no-bare-strings': true
   }
 };
diff --git a/test/fixtures/without-errors/.template-lintrc.js b/test/fixtures/without-errors/.template-lintrc.js
index f5b96a28..23ff9718 100644
--- a/test/fixtures/without-errors/.template-lintrc.js
+++ b/test/fixtures/without-errors/.template-lintrc.js
@@ -1,5 +1,5 @@
 module.exports = {
   rules: {
-    'bare-strings': false
+    'no-bare-strings': false
   }
 };
diff --git a/test/unit/base-plugin-test.js b/test/unit/base-plugin-test.js
index 2b039479..648e6077 100644
--- a/test/unit/base-plugin-test.js
+++ b/test/unit/base-plugin-test.js
@@ -161,11 +161,11 @@ describe('base plugin', function() {
     // Specific enable/disable
     expectConfig('template-lint-disable fake', { value: false, tree: false });
     expectConfig('template-lint-disable-tree "fake"', { value: false, tree: true });
-    expectConfig('template-lint-disable fake \'bare-strings\'', { value: false, tree: false });
-    expectConfig('template-lint-disable bare-strings fake block-indentation', { value: false, tree: false });
-    expectConfig('template-lint-disable bare-strings', null);
+    expectConfig('template-lint-disable fake \'no-bare-strings\'', { value: false, tree: false });
+    expectConfig('template-lint-disable no-bare-strings fake block-indentation', { value: false, tree: false });
+    expectConfig('template-lint-disable no-bare-strings', null);
     expectConfig(' template-lint-disable   fake ', { value: false, tree: false });
-    expectConfig('template-lint-disable   bare-strings    fake   block-indentation ', { value: false, tree: false });
+    expectConfig('template-lint-disable   no-bare-strings    fake   block-indentation ', { value: false, tree: false });
 
     // Configure
     expectConfig('template-lint-configure fake { "key1": "value", "key2": { "key3": 1 } }', {
@@ -184,7 +184,7 @@ describe('base plugin', function() {
       value: false,
       tree: true
     });
-    expectConfig('template-lint-configure-tree bare-strings { "key": "value" }', null);
+    expectConfig('template-lint-configure-tree no-bare-strings { "key": "value" }', null);
     expectConfig('  template-lint-configure-tree    fake   { "key": "value" }', {
       value: { key: 'value' },
       tree: true
diff --git a/test/unit/bin/ember-template-lint-test.js b/test/unit/bin/ember-template-lint-test.js
index e1ed75de..6fdddb98 100644
--- a/test/unit/bin/ember-template-lint-test.js
+++ b/test/unit/bin/ember-template-lint-test.js
@@ -92,8 +92,8 @@ describe('ember-template-lint executable', function() {
           expect(err).to.be.ok;
           expect(stdout.split('\n')).to.deep.equal([
             path.resolve('./test/fixtures/with-errors/app/templates/application.hbs'),
-            '  1:4  error  Non-translated string used  bare-strings',
-            '  2:5  error  Non-translated string used  bare-strings',
+            '  1:4  error  Non-translated string used  no-bare-strings',
+            '  2:5  error  Non-translated string used  no-bare-strings',
             '',
             '✖ 2 problems',
             ''
@@ -117,7 +117,7 @@ describe('ember-template-lint executable', function() {
               line: 1,
               message: 'Non-translated string used',
               moduleId: './app/templates/application',
-              rule: 'bare-strings',
+              rule: 'no-bare-strings',
               severity: 2,
               source: 'Here too!!'
             }, {
@@ -125,7 +125,7 @@ describe('ember-template-lint executable', function() {
               line: 2,
               message: 'Non-translated string used',
               moduleId: './app/templates/application',
-              rule: 'bare-strings',
+              rule: 'no-bare-strings',
               severity: 2,
               source: 'Bare strings are bad...'
             }
diff --git a/test/unit/get-config-test.js b/test/unit/get-config-test.js
index 12ec2563..0bc8aee6 100644
--- a/test/unit/get-config-test.js
+++ b/test/unit/get-config-test.js
@@ -77,11 +77,11 @@ describe('get-config', function() {
     let actual = getConfig({
       console: { log() { }},
       config: {
-        'bare-strings': false
+        'no-bare-strings': false
       }
     });
 
-    expect(actual.rules['bare-strings']).to.be.false;
+    expect(actual.rules['no-bare-strings']).to.be.false;
   });
 
   it('rules in the config root trigger a deprecation', function() {
@@ -92,7 +92,7 @@ describe('get-config', function() {
       }},
 
       config: {
-        'bare-strings': true
+        'no-bare-strings': true
       }
     });
 
@@ -150,7 +150,7 @@ describe('get-config', function() {
           configurations: {
             'basic-configuration': {
               rules: {
-                'bare-strings': false
+                'no-bare-strings': false
               }
             }
           }
@@ -160,7 +160,7 @@ describe('get-config', function() {
     });
 
     expect(message).to.not.be.ok;
-    expect(actual.rules['bare-strings']).to.be.false;
+    expect(actual.rules['no-bare-strings']).to.be.false;
   });
 
   it('throw exception when plugin path is incorrect', function() {
diff --git a/test/unit/rules/lint-block-indentation-test.js b/test/unit/rules/lint-block-indentation-test.js
index 9de1729a..eb76326b 100644
--- a/test/unit/rules/lint-block-indentation-test.js
+++ b/test/unit/rules/lint-block-indentation-test.js
@@ -181,7 +181,7 @@ generateRuleTests({
         '\t<p>Hi!</p>\n' +
         '</div>'
     },
-    '{{! template-lint-disable bare-strings }}',
+    '{{! template-lint-disable no-bare-strings }}',
     '{{! template-lint-disable }}',
     {
       template: [
diff --git a/test/unit/rules/lint-bare-strings-test.js b/test/unit/rules/lint-no-bare-strings-test.js
similarity index 98%
rename from test/unit/rules/lint-bare-strings-test.js
rename to test/unit/rules/lint-no-bare-strings-test.js
index 6247b428..5d1ee32e 100644
--- a/test/unit/rules/lint-bare-strings-test.js
+++ b/test/unit/rules/lint-no-bare-strings-test.js
@@ -3,7 +3,7 @@
 const generateRuleTests = require('../../helpers/rule-test-harness');
 
 generateRuleTests({
-  name: 'bare-strings',
+  name: 'no-bare-strings',
 
   config: true,
 
@@ -28,7 +28,7 @@ generateRuleTests({
     '{{t "foo"}}',
     '{{t "foo"}}, {{t "bar"}} ({{length}})',
     '(),.&+-=*/#%!?:[]{}',
-    '{{! template-lint-disable bare-strings }}',
+    '{{! template-lint-disable no-bare-strings }}',
     '{{! template-lint-disable }}',
 
     // placeholder is a <input> specific attribute
diff --git a/test/unit/rules/lint-html-comments-test.js b/test/unit/rules/lint-no-html-comments-test.js
similarity index 81%
rename from test/unit/rules/lint-html-comments-test.js
rename to test/unit/rules/lint-no-html-comments-test.js
index 494d293c..9173095b 100644
--- a/test/unit/rules/lint-html-comments-test.js
+++ b/test/unit/rules/lint-no-html-comments-test.js
@@ -3,15 +3,16 @@
 const generateRuleTests = require('../../helpers/rule-test-harness');
 
 generateRuleTests({
-  name: 'html-comments',
+  name: 'no-html-comments',
 
   config: true,
 
   good: [
     '{{!-- comment here --}}',
     '{{!--comment here--}}',
-    '{{! template-lint-disable bare-strings }}',
-    '{{! template-lint-disable }}'
+    '{{! template-lint-disable no-bare-strings }}',
+    '{{! template-lint-disable }}',
+    '{{! template-lint-disable html-comments }}<!-- lol -->',
   ],
 
   bad: [
diff --git a/test/unit/rules/lint-inline-styles-test.js b/test/unit/rules/lint-no-inline-styles-test.js
similarity index 96%
rename from test/unit/rules/lint-inline-styles-test.js
rename to test/unit/rules/lint-no-inline-styles-test.js
index 8864a559..1df7cd2d 100644
--- a/test/unit/rules/lint-inline-styles-test.js
+++ b/test/unit/rules/lint-no-inline-styles-test.js
@@ -17,7 +17,7 @@ function mapBadStyleExampleToTestRule(inlineStyle) {
 }
 
 generateRuleTests({
-  name: 'inline-styles',
+  name: 'no-inline-styles',
 
   config: true,
 
diff --git a/test/unit/rules/lint-invalid-interactive-test.js b/test/unit/rules/lint-no-invalid-interactive-test.js
similarity index 98%
rename from test/unit/rules/lint-invalid-interactive-test.js
rename to test/unit/rules/lint-no-invalid-interactive-test.js
index 8e23d9e2..e2a2f9fc 100644
--- a/test/unit/rules/lint-invalid-interactive-test.js
+++ b/test/unit/rules/lint-no-invalid-interactive-test.js
@@ -3,7 +3,7 @@
 const generateRuleTests = require('../../helpers/rule-test-harness');
 
 generateRuleTests({
-  name: 'invalid-interactive',
+  name: 'no-invalid-interactive',
 
   config: true,
 
diff --git a/test/unit/rules/lint-nested-interactive-test.js b/test/unit/rules/lint-no-nested-interactive-test.js
similarity index 98%
rename from test/unit/rules/lint-nested-interactive-test.js
rename to test/unit/rules/lint-no-nested-interactive-test.js
index 61d218bd..cfa0cce9 100644
--- a/test/unit/rules/lint-nested-interactive-test.js
+++ b/test/unit/rules/lint-no-nested-interactive-test.js
@@ -1,10 +1,10 @@
 'use strict';
 
 const generateRuleTests = require('../../helpers/rule-test-harness');
-const ARRAY_DEPRECATION_MESSAGE = require('../../../lib/rules/lint-nested-interactive').ARRAY_DEPRECATION_MESSAGE;
+const ARRAY_DEPRECATION_MESSAGE = require('../../../lib/rules/lint-no-nested-interactive').ARRAY_DEPRECATION_MESSAGE;
 
 generateRuleTests({
-  name: 'nested-interactive',
+  name: 'no-nested-interactive',
 
   config: true,
 
diff --git a/test/unit/rules/lint-triple-curlies-test.js b/test/unit/rules/lint-no-triple-curlies-test.js
similarity index 69%
rename from test/unit/rules/lint-triple-curlies-test.js
rename to test/unit/rules/lint-no-triple-curlies-test.js
index cef63a81..7cb95f7a 100644
--- a/test/unit/rules/lint-triple-curlies-test.js
+++ b/test/unit/rules/lint-no-triple-curlies-test.js
@@ -3,14 +3,15 @@
 const generateRuleTests = require('../../helpers/rule-test-harness');
 
 generateRuleTests({
-  name: 'triple-curlies',
+  name: 'no-triple-curlies',
 
   config: true,
 
   good: [
     '{{foo}}',
-    '{{! template-lint-disable bare-strings }}',
-    '{{! template-lint-disable }}'
+    '{{! template-lint-disable no-bare-strings }}',
+    '{{! template-lint-disable }}',
+    '{{! template-lint-disable triple-curlies}}{{{lol}}}'
   ],
 
   bad: [
diff --git a/test/unit/rules/lint-unused-block-params-test.js b/test/unit/rules/lint-no-unused-block-params-test.js
similarity index 93%
rename from test/unit/rules/lint-unused-block-params-test.js
rename to test/unit/rules/lint-no-unused-block-params-test.js
index 4e6393e3..f8a1abbc 100644
--- a/test/unit/rules/lint-unused-block-params-test.js
+++ b/test/unit/rules/lint-no-unused-block-params-test.js
@@ -3,7 +3,7 @@
 const generateRuleTests = require('../../helpers/rule-test-harness');
 
 generateRuleTests({
-  name: 'unused-block-params',
+  name: 'no-unused-block-params',
 
   config: true,
 
@@ -18,7 +18,8 @@ generateRuleTests({
       '{{#each cat.lives as |life|}}' +
         '{{index}}: {{life}}' +
       '{{/each}}' +
-    '{{/each}}'
+    '{{/each}}',
+    '{{! template-lint-disable unused-block-params}}{{#each cats as |cat|}}Dogs{{/each}}',
   ],
 
   bad: [