typescript-formatter
typescript-formatter copied to clipboard
Error: Unknown compiler option 'incremental'
Unable to run tsfmt for projects with 'incremental' typescript flag set.
Are you/anyone still running into this issue?
I'm able to run tsfmt with incremental
set to true
in my tsconfig.json. Here are my files for reference:
tsfmt.json
{ "baseIndentSize": 0, "indentSize": 4, "tabSize": 4, "indentStyle": 2, "newLineCharacter": "\n", "convertTabsToSpaces": false, "insertSpaceAfterCommaDelimiter": true, "insertSpaceAfterSemicolonInForStatements": true, "insertSpaceBeforeAndAfterBinaryOperators": true, "insertSpaceAfterConstructor": false, "insertSpaceAfterKeywordsInControlFlowStatements": true, "insertSpaceAfterFunctionKeywordForAnonymousFunctions": false, "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true, "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false, "insertSpaceAfterTypeAssertion": false, "insertSpaceBeforeFunctionParenthesis": false, "insertSpaceBeforeTypeAnnotation": false, "placeOpenBraceOnNewLineForFunctions": false, "placeOpenBraceOnNewLineForControlBlocks": false }
tsconfig.json
{ "compilerOptions": { "incremental": true, "noEmit": true, "target": "esnext", "module": "commonjs", "lib": ["esnext", "dom"], "downlevelIteration": true, "strict": true, "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "declaration": true, "noImplicitReturns": true, "jsx": "react", "baseUrl": "./", "paths": { "@shared": ["shared/*"] }, }, "include": [ "*.ts", "*.tsx", "components/**/*", "shared/**/*" ] }
And here's how I'm running tsfmt:
npx tsfmt -- [filename]
Dependencies:
"typescript": "^4.0.0",
"typescript-formatter": "^7.2.2"