Skip to content

Commit

Permalink
feat(rules): add vrsource-tslint-rules/multiline-arrow
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatyang committed May 17, 2018
1 parent 07ccb33 commit a298bd1
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 a298bd1

Please sign in to comment.