Skip to content

Commit 8e1a095

Browse files
authoredOct 29, 2017
Chore: enable a modified version of multiline-comment-style on codebase (#9452)
This makes the following changes: * Creates a project-specific `multiline-comment-style` rule, which is the same as the built-in `multiline-comment-style` rule except that it ignores the banner comments that we use at the top of files. * Enables the `multiline-comment-style` rule on the ESLint codebase
1 parent cb60285 commit 8e1a095

File tree

122 files changed

+1470
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1470
-1039
lines changed
 

‎.eslintrc.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
"eslint-plugin/prefer-placeholders": "error",
2525
"eslint-plugin/report-message-format": ["error", "[^a-z].*\\.$"],
2626
"eslint-plugin/test-case-property-ordering": "error",
27-
"eslint-plugin/test-case-shorthand-strings": "error"
27+
"eslint-plugin/test-case-shorthand-strings": "error",
28+
"rulesdir/multiline-comment-style": "error"
2829
}
2930
};

‎Makefile.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,11 @@ target.checkRuleFiles = function() {
843843
const docText = cat(docFilename);
844844
const idOldAtEndOfTitleRegExp = new RegExp(`^# (.*?) \\(${id}\\)`); // original format
845845
const idNewAtBeginningOfTitleRegExp = new RegExp(`^# ${id}: `); // new format is same as rules index
846-
// 1. Added support for new format.
847-
// 2. Will remove support for old format after all docs files have new format.
848-
// 3. Will remove this check when the main heading is automatically generated from rule metadata.
846+
/*
847+
* 1. Added support for new format.
848+
* 2. Will remove support for old format after all docs files have new format.
849+
* 3. Will remove this check when the main heading is automatically generated from rule metadata.
850+
*/
849851

850852
return idNewAtBeginningOfTitleRegExp.test(docText) || idOldAtEndOfTitleRegExp.test(docText);
851853
}

0 commit comments

Comments
 (0)
Please sign in to comment.