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.

[Maintenance Task] - Review ESLint settings and fix linting issues

See original GitHub issue

A while ago I switched the project from JSHint to ESLint (the latter being better-maintained and offering more features). However, I set many of the settings as warnings because I didn’t have time to address potential issues. Nor did I really have time to tweak linting for settings that make the code more maintainable.

So, the task would essentially be to look at ESLint warnings, and see what can be safely addressed. (For example, a lot of the == equality warnings may not be “fixable” to === without testing for every value that passes through that check.) It would be helpful to also set warnings for things to address in the future / ongoing, such as enforcing JSDoc documentation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
umuurcommented, Jan 20, 2021

@matthew-dean thank you for the detailed comments! Will let you know about the updates.

1reaction
matthew-deancommented, Jan 20, 2021

@umuur

Do we want to keep current eslint configuration?

It depends. If you want to make alterations that don’t change code formatting, that’s fine. But as far as warnings, IMO those are all valid warnings and we either want to address them, or leave a code comment about disabled eslint and (most importantly) why it’s not valid there.

Do we want to keep current eslint configuration?

Even though the codebase does not use TypeScript yet, in my experience, it does a better job transpiling than Babel. In terms of ESLint… 🤔 yes you’re right it’s not technically needed until there’s code in TypeScript. I probably did that in anticipation of converting the codebase to TS, but now I don’t know if / when that will happen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Enable Linting on Save with Visual Studio Code and ...
Go to File > Preferences > Settings (or Code > Preferences > Settings). Then click settings.
Read more >
Why and how to use ESLint in your project - IBM Developer
This articles covers why you should use ESLint for linting Node.js packages -- and how to use ESLint.
Read more >
Find and fix problems in your JavaScript code - ESLint ...
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
gulp-eslint-auto-fix - npm Package Health Analysis - Snyk
Makes a Gulp task that watches your files for changes, runs them through ESLint's fix function, then overwrites them if they have been...
Read more >
Static Application Security Testing (SAST) - GitLab Docs
Review and merge the merge request to enable SAST. Pipelines now include a SAST job. Configure SAST in the UI with customizations. ultimate....
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