Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Merge db4c271 into 80e8e41
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo committed Mar 6, 2016
2 parents 80e8e41 + db4c271 commit 304d855
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion lib/rules/require-capitalized-comments.js
Expand Up @@ -106,6 +106,7 @@
*/

var assert = require('assert');
var cst = require('cst');

var isPragma = require('../utils').isPragma;
var letterPattern = require('../../patterns/L');
Expand Down Expand Up @@ -279,6 +280,9 @@ module.exports.prototype = {
var comment = error.additional;
var first = this._getFirstChar(comment);

comment.value = comment.value.replace(first, first.toUpperCase());
var newValue = comment.value.replace(first, first.toUpperCase());
var newComment = new cst.Token(comment.type, newValue);

comment.parentElement.replaceChild(newComment, comment);
}
};
2 changes: 1 addition & 1 deletion test/specs/rules/disallow-comma-before-line-break.js
Expand Up @@ -12,7 +12,7 @@ describe('rules/disallow-comma-before-line-break', function() {
checker.configure(rules);
});

describe.skip('autofix', function() {
describe('autofix', function() {
reportAndFix({
name: 'illegal comma placement in multiline var declaration',
rules: rules,
Expand Down
3 changes: 1 addition & 2 deletions test/specs/rules/require-capitalized-comments.js
Expand Up @@ -317,8 +317,7 @@ describe('rules/require-capitalized-comments', function() {
});
});

// TODO: 3.0
describe.skip('fix', function() {
describe('fix', function() {
reportAndFix({
name: 'simple case',
rules: {
Expand Down

0 comments on commit 304d855

Please sign in to comment.