You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated my project to ESLint 9 and all packages required for this to the latest version. Among all these packages I eslint-config-xo-typescript to enable linting for TypeScript files. Two issues arise from this:
In my case the file extension is .ts but eslint-config-xo-typescript uses .tsx, therefore I have to adjust the configuration somehow and the only solution I found was mangling the configuration object like
// eslint.config.mjsimportxoTypeScriptfrom'eslint-config-xo-typescript';consttsxConfigurationObject=xoTypeScript[xoTypeScript.length-1];// Include .ts files in liniting, required because file extension .tsx is configured by defaulttsxConfigurationObject.files.push('**/*.ts');exportdefault[
...xoTypeScript];
With the update to ESLint 9 the config file needs to use the .mjs extension to have the config file linted correctly but this causes addtional errors thrown by the project service. To fix this the following configuration is needed:
I need to mangle with the configuration object returned from import. The use of index-based access raises a warning flag on my side because this could break easily. So, is there another way to adjust the configuration or is there any plan to support adjustments?
The text was updated successfully, but these errors were encountered:
Hi there,
I have updated my project to ESLint 9 and all packages required for this to the latest version. Among all these packages I
eslint-config-xo-typescript
to enable linting for TypeScript files. Two issues arise from this:.ts
buteslint-config-xo-typescript
uses.tsx
, therefore I have to adjust the configuration somehow and the only solution I found was mangling the configuration object like.mjs
extension to have the config file linted correctly but this causes addtional errors thrown by the project service. To fix this the following configuration is needed:TLDR;
I need to mangle with the configuration object returned from
import
. The use of index-based access raises a warning flag on my side because this could break easily. So, is there another way to adjust the configuration or is there any plan to support adjustments?The text was updated successfully, but these errors were encountered: