Skip to content

Conversation

@SaladFork
Copy link

@SaladFork SaladFork commented Oct 30, 2018

Resolves #6. Thanks for tagging with Hacktoberfest and having good documentation!

This PR adds tests for all the rules in the project except for no-filter-instead-of-find, which already had tests. It also adds a test framework and test commands for running said tests (I picked Jest but it's easy to swap to whatever runner you'd prefer).

As part of writing these tests, I believe I found two bugs. I commented out the failing case and added a FIXME in both relevant tests:

  • classbody-starts-with-newline throws an error for this code which the documentation suggests should pass:
export class SomeClass {
    /**
     * Some comment
     */
    constructor() {
        super()
    }
}
  • no-duplicated-chains passes this code but the documentation suggests it should throw an error:
function render() {
    return (<div className={this.props.className}>
        <p>{this.props.text}</p>
    </div>);
}

This PR also corrects a few minor mistakes in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant