From e71cd6bf28e0443eca8ac9a4f12086867e6ecba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=9B=E5=AE=9A=E8=B0=94=E7=9A=84=E7=8C=AB?= Date: Thu, 26 Oct 2017 18:08:41 +0800 Subject: [PATCH] Chore: fix linting errors (no-trailing-spaces). --- lib/rules/no-unused-prop-types.js | 14 +++++++------- lib/rules/prop-types.js | 14 +++++++------- tests/lib/rules/prefer-stateless-function.js | 10 +++++----- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/rules/no-unused-prop-types.js b/lib/rules/no-unused-prop-types.js index b03e05a392..0471913737 100644 --- a/lib/rules/no-unused-prop-types.js +++ b/lib/rules/no-unused-prop-types.js @@ -714,10 +714,10 @@ module.exports = { /** * Marks all props found inside ObjectTypeAnnotaiton as declared. - * + * * Modifies the declaredProperties object - * @param {ASTNode} propTypes - * @param {Object} declaredPropTypes + * @param {ASTNode} propTypes + * @param {Object} declaredPropTypes * @returns {Boolean} True if propTypes should be ignored (e.g. when a type can't be resolved, when it is imported) */ function declarePropTypesForObjectTypeAnnotation(propTypes, declaredPropTypes) { @@ -741,11 +741,11 @@ module.exports = { /** * Marks all props found inside IntersectionTypeAnnotation as declared. - * Since InterSectionTypeAnnotations can be nested, this handles recursively. - * + * Since InterSectionTypeAnnotations can be nested, this handles recursively. + * * Modifies the declaredPropTypes object - * @param {ASTNode} propTypes - * @param {Object} declaredPropTypes + * @param {ASTNode} propTypes + * @param {Object} declaredPropTypes * @returns {Boolean} True if propTypes should be ignored (e.g. when a type can't be resolved, when it is imported) */ function declarePropTypesForIntersectionTypeAnnotation(propTypes, declaredPropTypes) { diff --git a/lib/rules/prop-types.js b/lib/rules/prop-types.js index aff7508634..0be1083642 100644 --- a/lib/rules/prop-types.js +++ b/lib/rules/prop-types.js @@ -714,10 +714,10 @@ module.exports = { /** * Marks all props found inside ObjectTypeAnnotaiton as declared. - * + * * Modifies the declaredProperties object - * @param {ASTNode} propTypes - * @param {Object} declaredPropTypes + * @param {ASTNode} propTypes + * @param {Object} declaredPropTypes * @returns {Boolean} True if propTypes should be ignored (e.g. when a type can't be resolved, when it is imported) */ function declarePropTypesForObjectTypeAnnotation(propTypes, declaredPropTypes) { @@ -737,11 +737,11 @@ module.exports = { /** * Marks all props found inside IntersectionTypeAnnotation as declared. - * Since InterSectionTypeAnnotations can be nested, this handles recursively. - * + * Since InterSectionTypeAnnotations can be nested, this handles recursively. + * * Modifies the declaredPropTypes object - * @param {ASTNode} propTypes - * @param {Object} declaredPropTypes + * @param {ASTNode} propTypes + * @param {Object} declaredPropTypes * @returns {Boolean} True if propTypes should be ignored (e.g. when a type can't be resolved, when it is imported) */ function declarePropTypesForIntersectionTypeAnnotation(propTypes, declaredPropTypes) { diff --git a/tests/lib/rules/prefer-stateless-function.js b/tests/lib/rules/prefer-stateless-function.js index 5f8c6528dc..5f2b01f06a 100644 --- a/tests/lib/rules/prefer-stateless-function.js +++ b/tests/lib/rules/prefer-stateless-function.js @@ -100,7 +100,7 @@ ruleTester.run('prefer-stateless-function', rule, { } ` }, { - // Use refs + // Use refs code: ` class Foo extends React.Component { doStuff() { @@ -122,7 +122,7 @@ ruleTester.run('prefer-stateless-function', rule, { } ` }, { - // Has an empty (no super) constructor + // Has an empty (no super) constructor code: ` class Foo extends React.Component { constructor() {} @@ -132,7 +132,7 @@ ruleTester.run('prefer-stateless-function', rule, { } ` }, { - // Has a constructor + // Has a constructor code: ` class Foo extends React.Component { constructor() { @@ -144,7 +144,7 @@ ruleTester.run('prefer-stateless-function', rule, { } ` }, { - // Has a constructor (2) + // Has a constructor (2) code: ` class Foo extends React.Component { constructor() { @@ -156,7 +156,7 @@ ruleTester.run('prefer-stateless-function', rule, { } ` }, { - // Use this.bar + // Use this.bar code: ` class Foo extends React.Component { render() {