-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 File corrupted on save after adding import with quickfix #442
Comments
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"files": {
"ignore": [
"**/animations/*.json",
"**/assets/*",
"**/build/**/*",
"**/dist/**/*",
"**/isolate/**/*",
"**/native-app/android/**/*",
"**/native-app/ios/**/*",
"**/node_modules/**/*",
"**/.emulator-data/**/*"
],
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"quoteStyle": "double"
}
},
"linter": {
"enabled": true,
"rules": {
"complexity": {
"noBannedTypes": "error",
"noExtraBooleanCast": "error",
"noForEach": "off",
"noMultipleSpacesInRegularExpressionLiterals": "error",
"noUselessCatch": "error",
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"noWith": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noNewSymbol": "error",
"noNonoctalDecimalEscape": "error",
"noPrecisionLoss": "error",
"noSelfAssign": "error",
"noSetterReturn": "error",
"noSwitchDeclarations": "error",
"noUndeclaredVariables": "error",
"noUnreachable": "error",
"noUnreachableSuper": "error",
"noUnsafeFinally": "error",
"noUnsafeOptionalChaining": "error",
"noUnusedLabels": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "off",
"useHookAtTopLevel": "error",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"nursery": {
"useSortedClasses": {
"fix": "safe",
"level": "warn",
"options": {
"attributes": [
"class",
"className",
"containerStyle",
"contentContainerStyle",
"contentStyle",
"ngClass",
"style",
"titleClassName"
],
"functions": ["clsx", "cva", "tw", "tw.style"]
}
}
},
"recommended": true,
"style": {
"noNamespace": "error",
"noNonNullAssertion": "off",
"noParameterAssign": "off",
"useAsConstAssertion": "error",
"useBlockStatements": "off",
"useImportType": "off",
"useNodejsImportProtocol": "off"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noConsole": {
"level": "warn",
"options": {
"allow": ["error"]
}
},
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noExplicitAny": "error",
"noExtraNonNullAssertion": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noMisleadingCharacterClass": "error",
"noMisleadingInstantiator": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
}
},
"organizeImports": {
"enabled": true
},
"overrides": [
{
"include": [
"**/*.stories.tsx",
"scripts/*.ts",
"packages/*/scripts/*.js",
"packages/*/scripts/*.ts"
],
"linter": {
"rules": {
"suspicious": {
"noConsole": "off"
}
}
}
},
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts"],
"linter": {
"rules": {
"correctness": {
"noConstAssign": "off",
"noGlobalObjectCalls": "off",
"noInvalidConstructorSuper": "off",
"noNewSymbol": "off",
"noSetterReturn": "off",
"noUndeclaredVariables": "off",
"noUnreachable": "off",
"noUnreachableSuper": "off"
},
"style": {
"noArguments": "error",
"noVar": "error",
"useConst": "error"
},
"suspicious": {
"noDuplicateClassMembers": "off",
"noDuplicateObjectKeys": "off",
"noDuplicateParameters": "off",
"noFunctionAssign": "off",
"noImportAssign": "off",
"noRedeclare": "off",
"noUnsafeNegation": "off",
"useGetterReturn": "off"
}
}
}
},
{
"formatter": {
"enabled": false
},
"include": [
"someLongPath/animations/*.json",
"someLongPath/animations/*.ts"
],
"linter": {
"enabled": false
},
"organizeImports": {
"enabled": false
}
},
{
"formatter": {
"enabled": false
},
"include": ["**/storybook.requires.ts"],
"linter": {
"enabled": false
}
}
],
"vcs": {
"clientKind": "git",
"enabled": false,
"useIgnoreFile": false
}
} |
Same issue, some ppl say to switch to the pre-release version but that breaks the extension even more to the point where it cant edit .tsx files... |
I have the same issue but it is complicated to reproduce, i tried going back to the previous version and the bug did not appear, then i went back to the current version and it did not appear either. 🤷♂️ 30 minutes later, he simply came back... |
I have been using version 2.2.3 for a couple of days now and so far the problem has not returned. |
VS Code version
1.95.3
Extension version
2.3.0
Biome version
1.9.4
Operating system
Description
Occasionally, I will add some code that requires an import adding. I use the quickfix to automatically add the import, and when it hit Cmd+S to format and save the file the imports get corrupted.
Steps to reproduce
biomebug.mp4
Expected behavior
I don't want my imports mangled 😁
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
No response
Logs
No response
The text was updated successfully, but these errors were encountered: