Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function foo() {
{ let f = () => this; }
{ let f2 = () => this; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ function foo() {
return _this;
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ try {
throw 0;
} catch {
console.log(_unused);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ try {
throw 0;
} catch (_unused2) {
console.log(_unused);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export const Foo = () => useContext(X);
module.exports = () => useContext(X);
const Bar = () => useContext(X);
const Baz = memo(() => useContext(X));
const Qux = () => (0, useContext(X));
const Qux = () => (0, useContext(X));
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ $RefreshReg$(_c, "Foo");
$RefreshReg$(_c2, "Bar");
$RefreshReg$(_c3, "Baz$memo");
$RefreshReg$(_c4, "Baz");
$RefreshReg$(_c5, "Qux");
$RefreshReg$(_c5, "Qux");
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ export default function App() {
<D />
</div>
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ while (item) {
(item => {
useFoo();
})(item);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export default function App() {
const [foo, setFoo] = useState(0);
React.useEffect(() => {});
return <h1>{foo}</h1>;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ function hoc() {
};
}

export let C = hoc();
export let C = hoc();
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ $RefreshReg$(_c2, "A$React.memo");
$RefreshReg$(_c3, "A");
$RefreshReg$(_c4, "B$React.memo$React.forwardRef");
$RefreshReg$(_c5, "B$React.memo");
$RefreshReg$(_c6, "B");
$RefreshReg$(_c6, "B");
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ export default function App() {
React.useState();
useThePlatform();
return <h1>{bar}{baz}</h1>;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ let C = () => () => {
};
let D = bar && (() => {
return <h1>Hi</h1>;
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ const throttledAlert = throttle(function() {
const TooComplex = (function() { return hello })(() => {});
if (cond) {
const Foo = thing(() => {});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ function withRouter() {
const handleClick = () => {};
return <h1 onClick={handleClick}>Hi</h1>;
}
};
};
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function() {}
export default function() {}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default function() {}
export default function() {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import {useFancyState} from './hooks';
export default function App() {
const bar = useFancyState();
return <h1>{bar}</h1>;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
"transform-modules-commonjs"
]
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ const useFancyEffect = () => {
export default function App() {
const bar = useFancyState();
return <h1>{bar}</h1>;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function hello() {
return 2 * 2;
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function hello() {
return 2 * 2;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ function Foo() {

export default hoc(Foo);
export const A = hoc(Foo);
const B = hoc(Foo);
const B = hoc(Foo);
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ function Foo() {
const B = hoc(A);
// This is currently registered as a false positive:
const NotAComponent = wow(A);
// We could avoid it but it also doesn't hurt.
// We could avoid it but it also doesn't hurt.
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ React.createContext(Store);
const B = hoc(A);
// This is currently registered as a false positive:
const NotAComponent = wow(A);
// We could avoid it but it also doesn't hurt.
// We could avoid it but it also doesn't hurt.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ $RefreshReg$(_c3, "StyledFactory2");
$RefreshReg$(_c4, "StyledFactory3");
$RefreshReg$(_c5, "Foo");
$RefreshReg$(_c6, "B");
$RefreshReg$(_c7, "NotAComponent");
$RefreshReg$(_c7, "NotAComponent");
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const B = memo(React.forwardRef(() => {
}));
export default React.memo(forwardRef((props, ref) => {
return <h1>Foo</h1>;
}));
}));
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default React.memo(forwardRef(function (props, ref) {
return <h1>Foo</h1>;
}));
}));
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ export default _c3 = React.memo(_c2 = forwardRef(_c = function(props, ref) {
var _c, _c2, _c3;
$RefreshReg$(_c, "%default%$React.memo$forwardRef");
$RefreshReg$(_c2, "%default%$React.memo");
$RefreshReg$(_c3, "%default%");
$RefreshReg$(_c3, "%default%");
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default React.memo(forwardRef(function Named(props, ref) {
return <h1>Foo</h1>;
}));
}));
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ const NotAComp = 'hi';
export { Baz, NotAComp };

export function sum() {}
export const Bad = 42;
export const Bad = 42;
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ var _c, _c2, _c3;

$RefreshReg$(_c, "Hello");
$RefreshReg$(_c2, "Bar");
$RefreshReg$(_c3, "Baz");
$RefreshReg$(_c3, "Baz");
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export default () => {
// This one should be ignored.
// You should name your components.
return <Hello />;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ function Hello() {

function Bar() {
return <Hello />;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ _c2 = Bar;
var _c, _c2;

$RefreshReg$(_c, "Hello");
$RefreshReg$(_c2, "Bar");
$RefreshReg$(_c2, "Bar");
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const Bar = () => {
return <Hello />;
};
var Baz = () => <div />;
var sum = () => {};
var sum = () => {};
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ const Bar = function Baz() {
};
function sum() {}
let Baz = 10;
var Qux;
var Qux;
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ namespace Foo {
namespace NotExported {
export const E = () => {};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ var _c, _c2, _c3, _c4;
$RefreshReg$(_c, "Foo$Bar$A");
$RefreshReg$(_c2, "Foo$Bar$B");
$RefreshReg$(_c3, "Foo$C");
$RefreshReg$(_c4, "Foo$D");
$RefreshReg$(_c4, "Foo$D");
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function Bar () {
useContext(X)
return <Foo />
};
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function Hello() {
return <h1>Hi</h1>;
}
Hello = connect(Hello);
Hello = connect(Hello);
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ var D = /*#__PURE__*/function (D) {
D[D["b"] = NaN] = "b";
D[D["c"] = -1] = "c";
return D;
}(D || {});
}(D || {});
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ export declare class ReactiveMarker {
private [ReactiveMarkerSymbol]?: void
}

export declare const A = 1
export declare const A = 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {};
export {};
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ var Foo = function(Foo) {
Foo[Foo['b'] = 10] = 'b';
Foo[Foo['c'] = Foo.b + x] = 'c';
return Foo;
}(Foo || {});
}(Foo || {});
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ type T = number;
function T(): T {
return 123;
}
export { T }
export { T }
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export { Im, Ok, Foo, Bar, Func, Name };
function T() {
return 123;
}
export { T }
export { T }
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export { T }
import { B } from './b';
const B: B = 0;
type B = number;
export { B }
export { B }
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export { T };
// CASE 3: redeclaration of VariableDeclaration and TypeAlias
const B = 0;
export { B };

Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ d1 = /\p{Emoji}/u
f1 = /y/d
// ES2024
// RegExpSetNotation
g1 = /[\p{White_Space}&&\p{ASCII}]/v
g1 = /[\p{White_Space}&&\p{ASCII}]/v
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ c1 = new RegExp("(?<a>b)", "");
c2 = new RegExp("((?<c>d)){4}", "");
d1 = new RegExp("\\p{Emoji}", "u");
f1 = new RegExp("y", "d");
g1 = new RegExp("[\\p{White_Space}&&\\p{ASCII}]", "v");
g1 = new RegExp("[\\p{White_Space}&&\\p{ASCII}]", "v");
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a1 = /a.b/igm;
a1 = /a.b/igm;
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
}
}]
]
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a1 = /a.b/igm;
a1 = /a.b/igm;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a1 = /a.b/s
a1 = /a.b/s
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a1 = new RegExp("a.b", "s");
a1 = new RegExp("a.b", "s");
Original file line number Diff line number Diff line change
@@ -1 +1 @@
x1 = /./y
x1 = /./y
Original file line number Diff line number Diff line change
@@ -1 +1 @@
x2 = /./u
x2 = /./u
Original file line number Diff line number Diff line change
@@ -1 +1 @@
g1 = new RegExp("[\\p{White_Space}&&\\p{ASCII}]", "v");
g1 = new RegExp("[\\p{White_Space}&&\\p{ASCII}]", "v");