Add regression test for babel/babel-eslint#223 (babel/babel-eslint#305)
This commit is contained in:
parent
81ce743986
commit
97af2b0b62
@ -1472,6 +1472,16 @@ describe("verify", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("Flow definition does not trigger warnings #223", function () {
|
||||||
|
verifyAndAssertMessages([
|
||||||
|
"import { Map as $Map } from 'immutable';",
|
||||||
|
"function myFunction($state: $Map, { a, b, c } : { a: ?Object, b: ?Object, c: $Map }) {}"
|
||||||
|
].join("\n"),
|
||||||
|
{ "no-dupe-args": 1, "no-redeclare": 1, "no-shadow": 1 },
|
||||||
|
[]
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
// it("regex with es6 unicodeCodePointEscapes", function () {
|
// it("regex with es6 unicodeCodePointEscapes", function () {
|
||||||
// verifyAndAssertMessages(
|
// verifyAndAssertMessages(
|
||||||
// "string.replace(/[\u{0000A0}-\u{10FFFF}<>\&]/gmiu, (char) => `&#x${char.codePointAt(0).toString(16)};`);",
|
// "string.replace(/[\u{0000A0}-\u{10FFFF}<>\&]/gmiu, (char) => `&#x${char.codePointAt(0).toString(16)};`);",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user