Associated files cannot be formatted if the file extension is not a standard JavaScript or TypeScript extension.
Instead of the file being formatted, an error occurs:
Error formatting text. Error: Expected ',', got 'EmptyArray' at file:///__fixtures__/visit.ts.txt:10:8
Changing the extension to .ts makes the error go away, but this is not ideal when working with file fixtures. I want my fixtures formatted, but not linted or typechecked.
Input Code
import {
define,
isArray,
isBoolean,
isFalsy,
isFunction,
isNIL,
isNumber,
sift,
type EmptyArray,
type Fn,
type Nullable,
type Optional
} from '@flex-development/tutils'
Describe the bug
dprint-plugin-typescript version:
0.90.5
Associated files cannot be formatted if the file extension is not a standard JavaScript or TypeScript extension.
Instead of the file being formatted, an error occurs:
Changing the extension to
.ts
makes the error go away, but this is not ideal when working with file fixtures. I want my fixtures formatted, but not linted or typechecked.Input Code
Expected Output
See input code.
Actual Output
See input code.
.dprint.jsonc