Skip to content

Commit

Permalink
Merge pull request #146 from alexjoverm/feat/vrsource-tslint-rules/mu…
Browse files Browse the repository at this point in the history
…ltiline-arrow

feat(rules): add vrsource-tslint-rules/multiline-arrow
  • Loading branch information
alexjoverm authored May 20, 2018
2 parents 07ccb33 + a298bd1 commit f7ad874
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`should affect error message after formatting 1`] = `
"
<<<<<< before
no error
======
ERROR: (multiline-arrow) /src/vrsource-tslint-rules/multiline-arrow/test.ts[1, 11]: Multi-line arrow function must have parentheses around parameters.
>>>>>> after
"
`;
exports[`should be pretty after formatting 1`] = `
"
<<<<<< before
const x = a => longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong;
======
const x = a =>
longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong;
>>>>>> after
"
`;
1 change: 1 addition & 0 deletions src/vrsource-tslint-rules/multiline-arrow/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const x = a => longlonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglonglong;
6 changes: 6 additions & 0 deletions src/vrsource-tslint-rules/multiline-arrow/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../tslint.json",
"rules": {
"multiline-arrow": [true, "require-parens"]
}
}

0 comments on commit f7ad874

Please sign in to comment.