codesandbox / codesandbox-client

An online IDE for rapid web development
https://codesandbox.io
Other
13.1k stars 2.29k forks source link

What is the way to do disable eslint? #3401

Open zerosheepmoo opened 4 years ago

zerosheepmoo commented 4 years ago

❔ Question

I know that already similar issue exists. However, at least, it seems that I can turn off or on. As the previous version supported, like this issue is shown.

Could you tell me how to turn it off except for typing/* eslint-disable */ per file?

Your Environment

Software Name/Version
Сodesandbox
Browser Chrome
Operating System Catalina 10.15.2
github-actions[bot] commented 4 years ago

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

seanstrom commented 4 years ago

I would also like to know if there's an easy way of disabling ESLint, I'm currently using ClojureScript with CodeSandbox.io and it seems that ESLint is ran on those source files too. Unideal since it will report errors that don't relate to ClojureScript.

Screenshot

Screen Shot 2020-09-04 at 3 06 44 PM

maddhruv commented 4 years ago

I have even added an .eslintignore file and still getting eslint errors 😢

github-actions[bot] commented 3 years ago

This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed.

github-actions[bot] commented 3 years ago

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

CompuIves commented 3 years ago

Opening this issue again, because I think there should be a way to disable eslint on a sandbox if it's not behaving as expected.

hamitaksln commented 3 years ago

I like sandbox but eslint nonsense errors are annoying a lot.

drcmda commented 3 years ago

here's another issue, codesandbox can't access JSX.IntrinsicElements due to eslint

Screenshot 2021-04-03 at 23 27 59

typescript says "We strongly recommend that you do not use the no-undef lint rule on TypeScript projects. The checks it provides are already provided by TypeScript without the need for configuration - TypeScript just does this significantly better." but can't turn it off anywhere it seems.

https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors

smhutch commented 3 years ago

Oops, issue unintentionally closed due to my comment on #6086.

The TypeScript issue raised by @drcmda should be resolved now though 😄

NickCarducci commented 3 years ago

If we need a reason, I might have stumbled upon one. I'm experimenting with an AST for class-based react, and I can't seem to disable eslint, Unexpected token '='. Why I am doing it: We usually use babel for class components, but something(s'/ is) amiss along the cra toolchain right now. Even for babel there's a problem now, "Class Static Block," if there is a step after finished-proposals.md Class Static Blocks to stage 4, per 2021.08.31 25 days ago before public release I don't see what's not happening...

/src/app.js: Unexpected token (7:8)

   5 | 
   6 | class Page extends React.Component {
>  7 |   state = {};
     |        ^
   8 |   render() {
   9 |     return <div>body</div>;
  10 |   }

Deploy to the static site server (e.g. netlify) without even package.json scripts, it seems, just "main":"public/index.html"

sdkdeepa commented 2 years ago

Not sure if this helps....To temporarily turn off ESLint, you should add a block comment /* eslint-disable */ before the lines that you're interested in. It worked for me. Hope this works for you too.

ishwarrimal commented 2 years ago

If anyone is still facing the issue, you can disable eslint by following this step: preferences -> editor -> untick enable linking

Razorshnegax018 commented 2 years ago

@ishwarrimal Nicceee bro it works, thank you. Now I can use Nuxt typescript in peace

JoshMcCullough commented 1 year ago

If anyone is still facing the issue, you can disable eslint by following this step: preferences -> editor -> untick enable linking

Thank you. I'd like some linting though, just not the ones that are unnecessary e.g. @typescript-eslint/no-use-before-define is often not accurate/important.

markusjohnsson commented 1 year ago

If anyone is still facing the issue, you can disable eslint by following this step: preferences -> editor -> untick enable linking

Nope, no such preference.

stathis1998 commented 1 year ago

Why is this issue open since 2020 and still not fixed ? I get random errors while they are not valid.

CompuIves commented 1 year ago

A fix for this should launch in about a month. The challenge here is that we're running ESLint in the browser, and for that we had to apply some patches that make it harder to upgrade it to newer versions. We have a way to disable eslint in our settings, so this issue should be "resolved", but we're also working on a new editor that allows us to use the real ESLint. That should fix any misconfiguration that you're seeing.