Relative Content

Tag Archive for typescripteslint

ESLint Stylistic is ignoring ts files

I’m using the new ESLint flat style with @stylistic/eslint-plugin but it fails to detect ts files and when I try to run it directly against a ts file it gives me the error:

Configure @typescript-eslint/quotes for double-quotes

I’ve not yet gone down the flat-config path but I’m setting up ESLint for a new NextJS Typescript project in VSCode and find that I cannot configure the “@typescript-eslint/quotes” rule to enforce double-quotes rather than single-quotes.

Eslint rule to enforce only one usage of process.env

I have a webpack plugin to define some custom variables like process.env.MY_VAR and they won’t be reachable by the plugin with the process.env['MY_VAR'] so I need a eslint rule to throw an error when the second form is used, and suggest to use the first one only.