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 multiple projects in my workspace, two of the projects have type "module" and one is commonjs. The projects with module are able to format on save properly, however the project with the "commonjs" type gives the following error:
"FormattingExtension 'ESLint' is configured as formatter but it cannot format 'TypeScript'-files"
{
"compilerOptions": {
"target": "ES2018",
"module": "CommonJS" /* Specify what module code is generated. */,
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"baseUrl": "." /* Specify the base directory to resolve non-relative module names. */,
"paths": {
"*": ["node_modules/*", "./*"]
},
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
"sourceMap": true /* Create source map files for emitted JavaScript files. */ /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */,
"outDir": "dist" /* Specify an output folder for all emitted files. */,
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */
},
"include": ["./src/**/*"]
}
eslint version 9.18.0
The text was updated successfully, but these errors were encountered:
Does formatting work correctly for you in the terminal using the --fix option?
If so can you please provide me with a GitHub repository I can clone with a minimal repro that demos what you are seeing. That will help me investigate the issue.
I have multiple projects in my workspace, two of the projects have type "module" and one is commonjs. The projects with module are able to format on save properly, however the project with the "commonjs" type gives the following error:
"FormattingExtension 'ESLint' is configured as formatter but it cannot format 'TypeScript'-files"
My package.json:
tsconfig:
eslint version 9.18.0
The text was updated successfully, but these errors were encountered: