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.

[BUG] Fix eslint warnings on whole examples

See original GitHub issue

Describe the bug

All examples has a known eslint warning like following:

const container = document.getElementById("root");
const root = createRoot(container!); // this line throw null-assertion warning

It can be solved like this:

const container = document.getElementById("root");
// eslint-disable-next-line
const root = createRoot(container!); // this line throw null-assertion warning

Also, some variables, types or functions are declared but not using.

Steps To Reproduce

  1. npm run bootstrap
  2. npm run bootstrap -- --scope "example-name"
  3. npm run start -- --scope "example-name"
  4. Shows eslint warnings and errors in the terminal.

Expected behavior

The examples run with no lint warnings or errors.

Screenshot

No response

Desktop

No response

Mobile

No response

Additional Context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
sevkioruccommented, Oct 16, 2022

Thanks for your explanation @salihozdemir 😃

1reaction
salihozdemircommented, Oct 16, 2022

The main reason for using the eslint is because every developer has own style of writing (like naming conventions/tabs/single or double quotes for a string). With different styling techniques, your codebase may look weird, more error-prone and vulnerable. For these reasons we don’t want to ignore eslint.

Thanks @sevkioruc for helping us to maintain the code standard. 🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command Line Interface - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
How to Use ESLint "fix": Options, Issue Types, Exit Codes, and ...
The output from eslint --fix will be a list of errors and warnings. If desired, warnings can be silenced with the --quiet flag....
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 >
10. Fixing ESLint problems that are reported by the ... - YouTube
In this video, we will see how to fix the ESlint problems that are reposted by the customer rules that are created by...
Read more >
How to run eslint --fix from npm script - Stack Overflow
You can run below command: npm run lint -- --fix.
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