Skip to content

Commit

Permalink
fix nits
Browse files Browse the repository at this point in the history
  • Loading branch information
cyan33 committed Apr 24, 2020
1 parent 6fc2bab commit 7e3671a
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,8 @@ const tests = {
},
{
code: `
// This is a false positive (it's valid) that unfortunately
// we cannot avoid. Prefer to rename it to not start with "use"
class Foo extends Component {
render() {
if (cond) {
Expand All @@ -402,17 +404,6 @@ const tests = {
`,
errors: [conditionalError('Namespace.useConditionalHook')],
},
{
code: `
// Extending the isHook check to [A-Z].*\.use
// to not let it be called on top level
const History = require('history-2.1.2');
const browserHistory = History.useBasename(History.createHistory)({
basename: '/',
});
`,
errors: [topLevelError('History.useBasename')],
},
{
code: `
// Invalid because it's dangerous and might not warn otherwise.
Expand Down

0 comments on commit 7e3671a

Please sign in to comment.