Skip to content

Commit

Permalink
Fix: Rule no-unused-vars had missing period (fixes #6738) (#6739)
Browse files Browse the repository at this point in the history
The other rules in ESLint seem to end their messages with a period, but `no-unused-vars` doesn't, so this PR attempts to change that.
  • Loading branch information
Brian Mock authored and gyandeeps committed Jul 24, 2016
1 parent 71ae64c commit e825458
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 85 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-unused-vars.js
Expand Up @@ -60,7 +60,7 @@ module.exports = {

create: function(context) {

var MESSAGE = "'{{name}}' is defined but never used";
var MESSAGE = "'{{name}}' is defined but never used.";

var config = {
vars: "all",
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/cli-engine.js
Expand Up @@ -2010,7 +2010,7 @@ describe("CLIEngine", function() {

var report = engine.executeOnFiles([getFixturePath("processors", "test", "test-processor.txt")]);

assert.equal(report.results[0].messages[0].message, "'b' is defined but never used");
assert.equal(report.results[0].messages[0].message, "'b' is defined but never used.");
assert.equal(report.results[0].messages[0].ruleId, "post-processed");
});
it("should run processors when calling executeOnFiles with config file that specifies preloaded processor", function() {
Expand Down Expand Up @@ -2041,7 +2041,7 @@ describe("CLIEngine", function() {

var report = engine.executeOnFiles([getFixturePath("processors", "test", "test-processor.txt")]);

assert.equal(report.results[0].messages[0].message, "'b' is defined but never used");
assert.equal(report.results[0].messages[0].message, "'b' is defined but never used.");
assert.equal(report.results[0].messages[0].ruleId, "post-processed");
});
it("should run processors when calling executeOnText with config file that specifies a processor", function() {
Expand All @@ -2054,7 +2054,7 @@ describe("CLIEngine", function() {

var report = engine.executeOnText("function a() {console.log(\"Test\");}", "tests/fixtures/processors/test/test-processor.txt");

assert.equal(report.results[0].messages[0].message, "'b' is defined but never used");
assert.equal(report.results[0].messages[0].message, "'b' is defined but never used.");
assert.equal(report.results[0].messages[0].ruleId, "post-processed");
});
it("should run processors when calling executeOnText with config file that specifies preloaded processor", function() {
Expand Down Expand Up @@ -2085,7 +2085,7 @@ describe("CLIEngine", function() {

var report = engine.executeOnText("function a() {console.log(\"Test\");}", "tests/fixtures/processors/test/test-processor.txt");

assert.equal(report.results[0].messages[0].message, "'b' is defined but never used");
assert.equal(report.results[0].messages[0].message, "'b' is defined but never used.");
assert.equal(report.results[0].messages[0].ruleId, "post-processed");
});
});
Expand Down

0 comments on commit e825458

Please sign in to comment.