Skip to content

Newly created app fails ESlint checks and fails to call test target on preact CLI #369

@lambrospetrou

Description

@lambrospetrou

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When I run yarn test in a newly created preact app it fails with 2 errors and 2 eslint warnings.

If the current behavior is a bug, please provide the steps to reproduce.

  1. Created a new preact app using preact create app-name --yarn
  2. Run yarn test

What is the expected behavior?
The project should conform to all defined ESLint rules.

Please mention other relevant information.

Output

yarn test
yarn test v1.0.1
$ eslint src && preact test

/path/to/app/lvb-events/lvb-events/src/components/app.js
  11:2  error  Expected line before comment  lines-around-comment

/path/to/app/lvb-events/lvb-events/src/components/header/index.js
  5:16  warning  Component should be written as a pure function  react/prefer-stateless-function

/path/to/app/lvb-events/lvb-events/src/routes/home/index.js
  4:16  warning  Component should be written as a pure function  react/prefer-stateless-function

/path/to/app/lvb-events/lvb-events/src/routes/profile/index.js
  22:2  error  updateTime should be placed before componentDidMount  react/sort-comp

✖ 4 problems (2 errors, 2 warnings)
  1 error, 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions