Skip to content

Commit

Permalink
chore: migrate to biome
Browse files Browse the repository at this point in the history
  • Loading branch information
Sukaato committed Aug 13, 2024
1 parent 26b07a7 commit b54c3d1
Show file tree
Hide file tree
Showing 14 changed files with 192 additions and 297 deletions.
19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

13 changes: 0 additions & 13 deletions .prettierrc

This file was deleted.

2 changes: 1 addition & 1 deletion audit-ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
"critical": true,
"moderate": false,
"low": false
}
}
94 changes: 94 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"files": {
"include": ["src/*"]
},
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 120,
"attributePosition": "auto"
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noBannedTypes": "error",
"noExtraBooleanCast": "error",
"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",
"useIsNan": "error",
"useValidForDirection": "error",
"useYield": "error"
},
"style": { "noNamespace": "error", "useAsConstAssertion": "error" },
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "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",
"noUnsafeDeclarationMerging": "error",
"noUnsafeNegation": "error",
"useGetterReturn": "error",
"useValidTypeof": "error"
}
}
},
"javascript": {
"formatter": {
"arrowParentheses": "asNeeded",
"bracketSpacing": true,
"quoteStyle": "single"
}
}
}
16 changes: 8 additions & 8 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { UserConfig, RuleConfigSeverity } from '@commitlint/types';

export default {
extends: ['@commitlint/config-conventional'],
rules: {
"body-empty": [RuleConfigSeverity.Disabled, 'never'],
"body-leading-blank": [RuleConfigSeverity.Disabled, 'never'],
"footer-empty": [RuleConfigSeverity.Disabled, 'never'],
"footer-leading-blank": [RuleConfigSeverity.Disabled, 'never'],
}
} satisfies UserConfig;
extends: ['@commitlint/config-conventional'],
rules: {
'body-empty': [RuleConfigSeverity.Disabled, 'never'],
'body-leading-blank': [RuleConfigSeverity.Disabled, 'never'],
'footer-empty': [RuleConfigSeverity.Disabled, 'never'],
'footer-leading-blank': [RuleConfigSeverity.Disabled, 'never'],
},
} satisfies UserConfig;
Loading

0 comments on commit b54c3d1

Please sign in to comment.