Skip to content

Commit df7ffc1

Browse files
committed
[Tests] no-typos: test case from #2136
1 parent c7e5f38 commit df7ffc1

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/lib/rules/no-typos.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,20 @@ ruleTester.run('no-typos', rule, {
619619
`,
620620
parser: 'babel-eslint',
621621
parserOptions: parserOptions
622+
}, {
623+
code: `
624+
import { string, element } from "prop-types";
625+
626+
class Sample extends React.Component {
627+
render() { return null; }
628+
}
629+
630+
Sample.propTypes = {
631+
title: string.isRequired,
632+
body: element.isRequired
633+
};
634+
`,
635+
parserOptions: parserOptions
622636
}],
623637

624638
invalid: [{

0 commit comments

Comments
 (0)