codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

What is the way to do disable eslint?

Open zerosheepmoo opened this issue 5 years ago • 17 comments

❔ 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

zerosheepmoo avatar Jan 28 '20 05:01 zerosheepmoo

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.

github-actions[bot] avatar Sep 04 '20 12:09 github-actions[bot]

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

seanstrom avatar Sep 04 '20 22:09 seanstrom

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

maddhruv avatar Oct 06 '20 15:10 maddhruv

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] avatar Jan 05 '21 01:01 github-actions[bot]

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

github-actions[bot] avatar Jan 20 '21 01:01 github-actions[bot]

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.

CompuIves avatar Feb 23 '21 11:02 CompuIves

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

hamitaksln avatar Feb 26 '21 14:02 hamitaksln

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

drcmda avatar Apr 03 '21 21:04 drcmda

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

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

smhutch avatar Aug 31 '21 18:08 smhutch

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"

NickCarducci avatar Sep 25 '21 23:09 NickCarducci

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.

sdkdeepa avatar Mar 06 '22 02:03 sdkdeepa

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

ishwarrimal avatar Jul 22 '22 14:07 ishwarrimal

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

Razorshnegax018 avatar Nov 04 '22 00:11 Razorshnegax018

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.

JoshMcCullough avatar May 24 '23 14:05 JoshMcCullough

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

Nope, no such preference.

markusjohnsson avatar Oct 18 '23 07:10 markusjohnsson

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

stathis1998 avatar Oct 23 '23 08:10 stathis1998

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.

CompuIves avatar Oct 23 '23 10:10 CompuIves