-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor
reduce
into plain for loops
Also, replace `delete` operators with "pick" where possible, as I read `delete` can cause v8 deoptimizations
- Loading branch information
1 parent
1736d63
commit 1837b89
Showing
10 changed files
with
291 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "space", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 100, | ||
"attributePosition": "auto" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "all", | ||
"semicolons": "asNeeded", | ||
"arrowParentheses": "asNeeded", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"quoteStyle": "single", | ||
"attributePosition": "auto" | ||
} | ||
}, | ||
"organizeImports": { "enabled": false }, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"style": { | ||
"useShorthandFunctionType": "error", | ||
"useShorthandAssign": "error", | ||
"useForOf": "error", | ||
"useConsistentArrayType": "error", | ||
"useShorthandArrayType": "error", | ||
"noDefaultExport": "error", | ||
"noCommaOperator": "error", | ||
"noArguments": "error", | ||
"noNonNullAssertion": "off", | ||
"useImportType": "off", | ||
"noParameterAssign": "off", | ||
"useTemplate": "off", | ||
"useNumberNamespace": "off", | ||
"noUnusedTemplateLiteral": "off" | ||
}, | ||
"correctness": { | ||
"noUnusedImports": "error", | ||
"useArrayLiterals": "error" | ||
}, | ||
"suspicious": { | ||
"noExplicitAny": "off", | ||
"noAssignInExpressions": "off", | ||
"noAsyncPromiseExecutor": "off", | ||
"noPrototypeBuiltins": "off", | ||
"noThenProperty": "off" | ||
}, | ||
"complexity": { | ||
// "useSimplifiedLogicExpression": "error", // consider | ||
"noForEach": "off", | ||
"noUselessThisAlias": "off", | ||
"useLiteralKeys": "off", | ||
"noBannedTypes": "off" | ||
} | ||
} | ||
}, | ||
"overrides": [{ "include": ["tsconfig.json", "tsconfig.*.json"] }] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,4 @@ | ||
// prettier-ignore | ||
module.exports = [ | ||
...require('@naturalcycles/dev-lib/cfg/eslint.config'), | ||
{ | ||
rules: { | ||
'unicorn/no-array-reduce': 0, | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.