Skip to content

Commit

Permalink
Used bang in file-header (palantir#3741)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Goldberg authored and johnwiseheart committed Apr 9, 2018
1 parent 375de6d commit c89e0a7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/rules/fileHeaderRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class Rule extends Lint.Rules.AbstractRule {
const maybeCarriageReturn = sourceFile.text[sourceFile.getLineEndOfPosition(0)] === "\r" ? "\r" : "";
const lineEnding = `${maybeCarriageReturn}\n`;
return lineEnding.repeat(leadingNewlines) + [
"/*",
"/*!",
// split on both types of line endings in case users just typed "\n" in their configs
// but are working in files with \r\n line endings
// Trim trailing spaces to play nice with `no-trailing-whitespace` rule
Expand Down
2 changes: 1 addition & 1 deletion test/rules/file-header/bad-shebang/test.ts.fix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

/*
/*!
* Good header 2
*/

Expand Down
2 changes: 1 addition & 1 deletion test/rules/file-header/bad-single-line/test.ts.fix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*!
* Good header 2
*/

Expand Down
2 changes: 1 addition & 1 deletion test/rules/file-header/bad-use-strict/test.ts.fix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*!
* Good header 2
*/

Expand Down
2 changes: 1 addition & 1 deletion test/rules/file-header/bad/test.ts.fix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*!
* Good header 2
*/

Expand Down

0 comments on commit c89e0a7

Please sign in to comment.