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
2 changes: 1 addition & 1 deletion WritableStream.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Make exports work in Node < 12
// eslint-disable-next-line no-undef, unicorn/prefer-module
// eslint-disable-next-line no-undef
module.exports = require("./dist/commonjs/WritableStream.js");
96 changes: 96 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.6/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["**/*.{ts,md,json,yml}", "!**/.*"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 4
},
"javascript": {
"formatter": {}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noConstEnum": "off",
"noConstantBinaryExpressions": "error",
"useAwait": "error"
},
"complexity": {
"noUselessStringConcat": "error",
"noUselessUndefined": "error",
"useSimplifiedLogicExpression": "error",
"useWhile": "error"
},
"performance": {
"useTopLevelRegex": "error"
},
"style": {
"noInferrableTypes": "error",
"noNegationElse": "error",
"noUnusedTemplateLiteral": "error",
"noUselessElse": "error",
"noYodaExpression": "error",
"useAsConstAssertion": "error",
"useCollapsedElseIf": "error",
"useCollapsedIf": "error",
"useConsistentArrayType": "error",
"useConsistentArrowReturn": "error",
"useConsistentMemberAccessibility": "error",
"useConsistentObjectDefinitions": "error",
"useConsistentTypeDefinitions": "error",
"useDefaultParameterLast": "error",
"useExplicitLengthCheck": "error",
"useNumberNamespace": "error",
"useNumericSeparators": "error",
"useObjectSpread": "error",
"useShorthandAssign": "error",
"useUnifiedTypeSignatures": "error"
}
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"overrides": [
{
"includes": ["**/*.{test,spec}.ts", "test/**/*.ts"],
"javascript": {
"globals": [
"jest",
"describe",
"it",
"beforeEach",
"afterEach",
"expect",
"vi"
]
}
},
{
"includes": ["**/*.ts", "**/*.cts", "**/*.mts", "**/*.tsx"],
"linter": {
"rules": {
"complexity": {
"useLiteralKeys": "off"
}
}
}
}
]
}
100 changes: 14 additions & 86 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,56 +1,22 @@
import { defineConfig } from "eslint/config";
import globals from "globals";
import js from "@eslint/js";
import n from "eslint-plugin-n";
import unicorn from "eslint-plugin-unicorn";
import { commonTypeScriptRules } from "@feedic/eslint-config/typescript";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";
import eslintConfigBiome from "eslint-config-biome";
import feedicFlatConfig from "@feedic/eslint-config";

export default defineConfig([
js.configs.recommended,
n.configs["flat/recommended"],
unicorn.configs.recommended,
tseslint.configs.recommended,
eslintConfigPrettier,
...feedicFlatConfig,
{
languageOptions: {
globals: {
...globals.node,
},
linterOptions: {
reportUnusedDisableDirectives: "error",
},

},
eslintConfigBiome,
{
ignores: ["coverage/**", "dist/**", "eslint.config.{js,cjs,mjs}"],
},
{
rules: {
eqeqeq: [2, "smart"],
"no-caller": 2,
"dot-notation": 2,
"no-var": 2,
"prefer-const": 2,

"prefer-arrow-callback": [
2,
{
allowNamedFunctions: true,
},
],

"arrow-body-style": [2, "as-needed"],
"object-shorthand": 2,
"prefer-template": 2,
"one-var": [2, "never"],

"prefer-destructuring": [
2,
{
object: true,
},
],

"capitalized-comments": 2,
"multiline-comment-style": [2, "starred-block"],
"spaced-comment": 2,
yoda: [2, "never"],
curly: [2, "multi-line"],
"no-else-return": 2,
"n/no-unpublished-import": 0,

"unicorn/filename-case": [
Expand All @@ -62,17 +28,11 @@ export default defineConfig([
},
},
],

"unicorn/no-null": 0,
"unicorn/prefer-code-point": 0,
"unicorn/prefer-string-slice": 0,
"unicorn/prefer-add-event-listener": 0,
"unicorn/prefer-at": 0,
"unicorn/prefer-string-replace-all": 0,
},
},
{
files: ["**/*.ts"],
extends: [...tseslint.configs.recommended],

languageOptions: {
sourceType: "module",
Expand All @@ -84,39 +44,7 @@ export default defineConfig([
},

rules: {
curly: [2, "multi-line"],
"@typescript-eslint/prefer-for-of": 0,
"@typescript-eslint/member-ordering": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-unused-vars": 0,

"@typescript-eslint/no-use-before-define": [
2,
{
functions: false,
},
],

"@typescript-eslint/consistent-type-definitions": [2, "interface"],
"@typescript-eslint/prefer-function-type": 2,
"@typescript-eslint/no-unnecessary-type-arguments": 2,
"@typescript-eslint/prefer-string-starts-ends-with": 2,
"@typescript-eslint/prefer-readonly": 2,
"@typescript-eslint/prefer-includes": 2,
"@typescript-eslint/no-unnecessary-condition": 2,
"@typescript-eslint/switch-exhaustiveness-check": 2,
"@typescript-eslint/prefer-nullish-coalescing": 2,

"@typescript-eslint/consistent-type-imports": [
2,
{
fixStyle: "inline-type-imports",
},
],

"@typescript-eslint/consistent-type-exports": 2,
"n/no-missing-import": 0,
"n/no-unsupported-features/es-syntax": 0,
...commonTypeScriptRules,
},
},
{
Expand Down
Loading