-
-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(strip)!: support specifying both functions and labels (#471)
* FIX: Now supports specifying both functions and labels in the same config. FIX: Supports spaces around the . for functions and : for labels DOC: Updated documentation REFACTOR: Adjust tests so that the input and expected output can be seen next to each other. * restoring test fixtures * code review changes * additional tests * attempt to clean up filemodes * revert subjective style change * revert extra newline * revert extra newlines Co-authored-by: Andrew Powell <[email protected]>
- Loading branch information
1 parent
56b3725
commit a014c66
Showing
14 changed files
with
327 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable */ | ||
export default function foo() { | ||
before(); | ||
debugger; | ||
logging: | ||
console.log('a'); | ||
console.error('b'); | ||
after(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* eslint-disable */ | ||
before(); | ||
f().t(); | ||
after(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* eslint-disable */ | ||
before(); | ||
function f() { | ||
return { | ||
g: function () { | ||
return { | ||
hello: function () { | ||
console.log('hello'); | ||
} | ||
}; | ||
} | ||
}; | ||
} | ||
|
||
Test | ||
. | ||
f() | ||
. g() . | ||
hello(); | ||
after(); |
10 changes: 10 additions & 0 deletions
10
packages/strip/test/fixtures/label-awkward-spacing/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* eslint-disable */ | ||
before(); | ||
unittest | ||
: { | ||
test('some test', (assert) => { | ||
}); | ||
} | ||
again(); | ||
unittest:console.log(); | ||
after(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* eslint-disable */ | ||
before();unittest:console.log();after(); |
10 changes: 10 additions & 0 deletions
10
packages/strip/test/fixtures/label-multiple-times/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* eslint-disable */ | ||
before(); | ||
unittest | ||
: { | ||
test('some test', (assert) => { | ||
}); | ||
} | ||
again(); | ||
unittest:console.log(); | ||
after(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* eslint-disable */ | ||
before(); | ||
unittest : { | ||
test('some test', (assert) => { | ||
}); | ||
} | ||
after(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* eslint-disable */ | ||
console.log(['h', 'e', 'y'].forEach((letter) => console.warn(letter))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* eslint-disable */ | ||
export default function foo() { | ||
before(); | ||
debugger; | ||
logging: | ||
console.log('a'); | ||
console.error('b'); | ||
after(); | ||
} |
Oops, something went wrong.