kit icon indicating copy to clipboard operation
kit copied to clipboard

Migrate to `eslint.config.js`

Open jasongitmail opened this issue 2 years ago • 3 comments

Describe the problem

SvelteKit currently uses .eslintrc.cjs, the outgoing format.

Describe the proposed solution

Switch to eslint.config.js and remove .eslintignore and .eslintrc.cjs.

Starting in v9, ESLint will use one config file named eslint.config.js, and it's possible to remove .eslintignore and specify ignored file patterns within the config.

Good info: https://eslint.org/blog/2022/08/new-config-system-part-2/

Comes with a bunch of benefits--including reducing config pollution within a project--and its easier to extend with custom user configs.

Alternatives considered

Will be required in v9 ESLint.

Importance

nice to have

Additional Information

Adding the issue to track it, so I can update existing projects similarly.

jasongitmail avatar Sep 16 '23 18:09 jasongitmail

I think we'll need to wait for the typescript-eslint parser to support flat configs before we can go ahead with this. More info here https://github.com/typescript-eslint/typescript-eslint/issues/7694#issuecomment-1854655034

teemingc avatar Dec 23 '23 11:12 teemingc

Will such change be something the migration script will do anything about? At least emit a notice of sorts?

victormihalache avatar Jan 30 '24 08:01 victormihalache

No longer blocked https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/

polyzen avatar Feb 15 '24 20:02 polyzen

Any updates on this? Eslint v9 just got released a few hours ago

https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

lts20050703 avatar Apr 06 '24 10:04 lts20050703

I just tried migrating by myself EmeraldHQ/Website@29f3a15 (#227) But it seems that eslint-plugin-svelte isn't ready yet or that something is wrong in my attempt: I get lint errors (related to TypeScript I guess?), not sure why

WarningImHack3r avatar Apr 06 '24 10:04 WarningImHack3r