question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix types and linting errors

See original GitHub issue

Although type checking and linting was implemented in the app from the beginning, we disabled it early so that scientists could iterate faster without being bothered too much with the latest web dev novelties.

We need to apply fixes incrementally, a few files a day. Preferably as a part of the routine PRs.

At some point we can re-enable linting on build-time, but currently you can use these commands to run eslint stylelint tsc and tslint all together in a separate terminal instance:

yarn lint
yarn lint:fix
yarn lint:watch
yarn lint:fix:watch

Or yarn <tool_name>:[fix|watch|fix:watch] for a specific tool.

Current output:

Eslint
512 warnings found.
400 warnings potentially fixable with the `--fix` option.

tsc:
Found 85 errors.

Note that my linting tastes are somewhat peculiar and controversial: there is a whole lot of eslint and tslint plugins and tsc is configured very strictly. I like it this way, but most developers find it annoying.

Feel free to post your thoughts. We can relax the default config, but I’d like to keep my hard-mode one at leas as an option.

PLEASE do not submit one giant merge conflict. It could not be merged and is a waste of everyone’s time. ⏰

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
ivan-aksamentovcommented, Mar 25, 2020

@patrikvarga Thanks Patrick! I really enjoyed your focused PRs. It’s a pleasure to see a green merge button on a PR, and yours were all green 😃 Also these have improved quality of code significantly. I am looking forward to see more of your contributions!

1reaction
ivan-aksamentovcommented, Mar 22, 2020

@jsmith Absolutely! But careful with moving things around. Maybe tests first? Correctness of the results is of utter importance for this project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix your Javascript linting errors in four easy steps
To Generate the errors, type 'npx eslint .' This will check all files in the current directory. Or you may replace '.' with ......
Read more >
Quickly fix all linter errors in a file with the ESLint extension
Today's VS Code extension tip: ESLint fix all actions Quickly fix all linter problems for a given ESLint rule or fix all auto...
Read more >
How to Use ESLint "fix": Options, Issue Types, Exit Codes, and ...
Many React projects have ESLint set up and devs are fixing lint errors as they code. This is great for reducing bugs, and...
Read more >
Linting tools to identify and fix code mistakes - IBM
By using linting tools, you can identify and correct common code mistakes without having to run your app or write test cases.
Read more >
What is linting and how can it save you time? - freeCodeCamp
What all can linting help with? · Flagging bugs in your code from syntax errors · Giving you warnings when code may not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found