Linting the source code is currently broken #4027

Closed
opened 2020-04-21 07:31:45 +02:00 by jeffslofish · 4 comments
jeffslofish commented 2020-04-21 07:31:45 +02:00 (Migrated from github.com)

Bug
According to https://github.com/lbryio/lbry-desktop/blob/master/CONTRIBUTING.md#lint we should be able to lint the code by running $ yarn lint. However, this currently produces an error because it is trying to lint starting at the top level "src/" directory, but there is no longer a top level "src/" directory. I can fix this issue if you let me know what directories you actually want linted.

To Reproduce
Steps to reproduce the behavior:

  1. Run $ yarn lint

Expected behavior
The code should be linted.

Screenshots
Screen Shot 2020-04-20 at 10 19 58 PM

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Additional context
Add any other context about the problem here.

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-desktop/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.com --> **Bug** According to https://github.com/lbryio/lbry-desktop/blob/master/CONTRIBUTING.md#lint we should be able to lint the code by running `$ yarn lint`. However, this currently produces an error because it is trying to lint starting at the top level "src/" directory, but there is no longer a top level "src/" directory. I can fix this issue if you let me know what directories you actually want linted. **To Reproduce** Steps to reproduce the behavior: 1. Run `$ yarn lint` **Expected behavior** The code should be linted. **Screenshots** ![Screen Shot 2020-04-20 at 10 19 58 PM](https://user-images.githubusercontent.com/1240484/79828725-2e927e00-8356-11ea-8e90-e144087d408e.png) **System Configuration** <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: **Additional context** Add any other context about the problem here.
tzarebczan commented 2020-05-06 02:43:59 +02:00 (Migrated from github.com)

Thanks for filing this issue! I would say it's all the directories outside of the . ones.

Thanks for filing this issue! I would say it's all the directories outside of the . ones.
jeffslofish commented 2021-01-27 23:03:07 +01:00 (Migrated from github.com)

Linting is still broken for me, but for a different reason. With eslint in package.json set to ^5.15.2, I get the following errors:

image

If I set the eslint version in package.json to the latest release (^7.18.0), then this error goes away. It appears that the older eslint has problems ignoring the directory if it ends in ".js".

Can you reopen this issue, and I'll open a pull request to fix it?

Linting is still broken for me, but for a different reason. With eslint in package.json set to ^5.15.2, I get the following errors: ![image](https://user-images.githubusercontent.com/1240484/106059496-a345d600-60a7-11eb-8dfe-75b20b3facc5.png) If I set the eslint version in package.json to the latest release (^7.18.0), then this error goes away. It appears that the older eslint has problems ignoring the directory if it ends in ".js". Can you reopen this issue, and I'll open a pull request to fix it?
neb-b commented 2021-01-27 23:07:23 +01:00 (Migrated from github.com)

@jeffslofish Weird error. Just reopened!

@jeffslofish Weird error. Just reopened!
jeffslofish commented 2021-01-28 00:04:55 +01:00 (Migrated from github.com)

Actually, I found a solution to this problem here: https://github.com/eslint/eslint/issues/10880. All you have to do is add single quotes around the glob pattern and then it will work properly. Pull request coming shortly.

Actually, I found a solution to this problem here: https://github.com/eslint/eslint/issues/10880. All you have to do is add single quotes around the glob pattern and then it will work properly. Pull request coming shortly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#4027
No description provided.