Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 72 additions & 86 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,119 +1,105 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.6/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"files": { "ignoreUnknown": false },
"formatter": {
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["**/*.ts", "**/*.{md,json,yml,js}", "!**/.*"]
},
"formatter": {
"indentStyle": "space",
"indentWidth": 4
},
"linter": {
"enabled": true,
"rules": {
"recommended": false,
"complexity": {
"noAdjacentSpacesInRegex": "error",
"noExtraBooleanCast": "error",
"noUselessCatch": "error",
"noUselessEscapeInRegex": "error",
"useArrowFunction": "error"
"recommended": true,
"suspicious": {
"noAssignInExpressions": "off",
"noConstantBinaryExpressions": "error",
"useAwait": "error"
},
"correctness": {
"noConstAssign": "error",
"noConstantCondition": "error",
"noEmptyCharacterClassInRegex": "error",
"noEmptyPattern": "error",
"noGlobalObjectCalls": "error",
"noInnerDeclarations": "error",
"noInvalidConstructorSuper": "error",
"noInvalidUseBeforeDeclaration": "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",
"useIsNan": "error",
"useValidForDirection": "error",
"useValidTypeof": "error",
"useYield": "error"
"complexity": {
"noUselessStringConcat": "error",
"noUselessUndefined": "error",
"useSimplifiedLogicExpression": "error",
"useWhile": "error"
},
"nursery": {
"useExhaustiveSwitchCases": "error"
"performance": {
"useTopLevelRegex": "error"
},
"style": {
"noInferrableTypes": "error",
"noNegationElse": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noYodaExpression": "error",
"useBlockStatements": "error",
"useConst": "error",
"useImportType": {
"level": "error",
"options": { "style": "inlineType" }
},
"useAsConstAssertion": "error",
"useCollapsedElseIf": "error",
"useCollapsedIf": "error",
"useConsistentArrayType": "error",
"useConsistentArrowReturn": "error",
"useConsistentMemberAccessibility": "error",
"useConsistentObjectDefinitions": "error",
"useReadonlyClassProperties": "error",
"useShorthandFunctionType": "error",
"useSingleVarDeclarator": "error",
"useTemplate": "error"
},
"suspicious": {
"noAssignInExpressions": "error",
"noAsyncPromiseExecutor": "error",
"noCatchAssign": "error",
"noClassAssign": "error",
"noCompareNegZero": "error",
"noControlCharactersInRegex": "error",
"noDebugger": "error",
"noDoubleEquals": "error",
"noDuplicateCase": "error",
"noDuplicateClassMembers": "error",
"noDuplicateElseIf": "error",
"noDuplicateObjectKeys": "error",
"noDuplicateParameters": "error",
"noEmptyBlockStatements": "error",
"noFallthroughSwitchClause": "error",
"noFunctionAssign": "error",
"noGlobalAssign": "error",
"noImportAssign": "error",
"noIrregularWhitespace": "error",
"noMisleadingCharacterClass": "error",
"noPrototypeBuiltins": "error",
"noRedeclare": "error",
"noShadowRestrictedNames": "error",
"noSparseArray": "error",
"noUnsafeNegation": "error",
"noUselessRegexBackrefs": "error",
"noVar": "error",
"noWith": "error",
"useGetterReturn": "error"
"useConsistentTypeDefinitions": "error",
"useDefaultParameterLast": "error",
"useExplicitLengthCheck": "error",
"useFilenamingConvention": "error",
"useNumberNamespace": "error",
"useNumericSeparators": "error",
"useObjectSpread": "error",
"useShorthandAssign": "error",
"useUnifiedTypeSignatures": "error"
}
}
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"overrides": [
{
"includes": ["**/*.test.ts", "**/*.spec.ts", "test/**/*.ts"],
"linter": {
"rules": {
"suspicious": {
"noDeprecatedImports": "off",
"noMisplacedAssertion": "off",
"noSkippedTests": "off"
}
}
},
"javascript": {
"globals": [
"jest",
"describe",
"it",
"beforeEach",
"afterEach",
"expect"
"expect",
"vi"
]
}
},
{
"includes": ["**/*.ts", "**/*.cts", "**/*.mts", "**/*.tsx"],
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "off"
}
}
}
}
],

"html": { "formatter": { "selfCloseVoidElements": "always" } },
"assist": {
"enabled": true,
"actions": { "source": { "organizeImports": "on" } }
"html": {
"formatter": {
"selfCloseVoidElements": "always"
}
}
}
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { fileURLToPath } from "node:url";
import { includeIgnoreFile } from "@eslint/compat";
import feedicFlatConfig from "@feedic/eslint-config";
import { commonTypeScriptRules } from "@feedic/eslint-config/typescript";
import { defineConfig } from "eslint/config";
import eslintConfigBiome from "eslint-config-biome";
import globals from "globals";
import tseslint from "typescript-eslint";

const gitignorePath = fileURLToPath(new URL(".gitignore", import.meta.url));

export default defineConfig([
includeIgnoreFile(gitignorePath),
{
linterOptions: {
reportUnusedDisableDirectives: "error",
},
},
{
ignores: ["eslint.config.{js,cjs,mjs}", "vitest.config.ts"],
},
...feedicFlatConfig,
{
files: ["**/*.{c,m,}ts"],
extends: [...tseslint.configs.recommended],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
sourceType: "module",
project: "./tsconfig.eslint.json",
},
},
rules: {
...commonTypeScriptRules,
"unicorn/no-array-callback-reference": 0,
"unicorn/prefer-string-raw": 0,
},
},
{
files: ["**/*.{test,spec}.ts", "test/**/*.ts"],
languageOptions: {
globals: globals.vitest,
},
rules: {
"n/no-unpublished-import": 0,
"unicorn/prefer-query-selector": 0,
},
},
eslintConfigBiome,
]);
Loading
Loading