Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/tests/lib/rules/no-typos.js b/tests/lib/rules/no-typos.js
- index bd4bfc5..a1229cc 100644
- --- a/tests/lib/rules/no-typos.js
- +++ b/tests/lib/rules/no-typos.js
- @@ -847,5 +847,49 @@ ruleTester.run('no-typos', rule, {
- }, {
- message: 'Typo in prop type chain qualifier: isrequired'
- }]
- + }, {
- + code: `
- + import React from 'react';
- + import PropTypes from 'prop-types';
- + const Component = React.createClass({
- + propTypes: {
- + a: PropTypes.string.isrequired,
- + b: PropTypes.shape({
- + c: PropTypes.number
- + }).isrequired
- + }
- + });
- + `,
- + parser: 'babel-eslint',
- + parserOptions: parserOptions,
- + errors: [{
- + message: 'Typo in prop type chain qualifier: isrequired'
- + }, {
- + message: 'Typo in prop type chain qualifier: isrequired'
- + }]
- + }, {
- + code: `
- + import React from 'react';
- + import PropTypes from 'prop-types';
- + const Component = React.createClass({
- + childContextTypes: {
- + a: PropTypes.bools,
- + b: PropTypes.Array,
- + c: PropTypes.function,
- + d: PropTypes.objectof,
- + }
- + });
- + `,
- + parser: 'babel-eslint',
- + parserOptions: parserOptions,
- + errors: [{
- + message: 'Typo in declared prop type: bools'
- + }, {
- + message: 'Typo in declared prop type: Array'
- + }, {
- + message: 'Typo in declared prop type: function'
- + }, {
- + message: 'Typo in declared prop type: objectof'
- + }]
- }]
- });
Add Comment
Please, Sign In to add comment