-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade eslint and prettier (#27)
* Upgrade eslint and prettier * Update test workflow * Use node 18 for benchmark
- Loading branch information
1 parent
f281a16
commit 642b31e
Showing
12 changed files
with
1,212 additions
and
891 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import js from "@eslint/js"; | ||
import ts from "typescript-eslint"; | ||
import importPlugin from "eslint-plugin-import"; | ||
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; | ||
|
||
export default ts.config( | ||
js.configs.recommended, | ||
ts.configs.recommended, | ||
importPlugin.flatConfigs.errors, | ||
importPlugin.flatConfigs.warnings, | ||
importPlugin.flatConfigs.typescript, | ||
eslintPluginPrettierRecommended, | ||
{ | ||
rules: { | ||
"prettier/prettier": "error", | ||
"constructor-super": "off", | ||
"@typescript-eslint/await-thenable": "error", | ||
"@typescript-eslint/explicit-function-return-type": ["error", {allowExpressions: true}], | ||
"@typescript-eslint/member-ordering": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/no-unused-vars": ["error", {varsIgnorePattern: "^_"}], | ||
"@typescript-eslint/ban-ts-comment": "error", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
"@typescript-eslint/explicit-member-accessibility": ["error", {accessibility: "no-public"}], | ||
"@typescript-eslint/no-unsafe-assignment": "error", | ||
"@typescript-eslint/no-unsafe-call": "error", | ||
"@typescript-eslint/no-unsafe-member-access": "error", | ||
"@typescript-eslint/no-unsafe-return": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{devDependencies: false, optionalDependencies: false, peerDependencies: false}, | ||
], | ||
"func-call-spacing": "error", | ||
"import/no-duplicates": "off", | ||
"new-parens": "error", | ||
"no-caller": "error", | ||
"no-bitwise": "off", | ||
"no-cond-assign": "error", | ||
"no-consecutive-blank-lines": 0, | ||
"no-console": "warn", | ||
"no-var": "error", | ||
"object-curly-spacing": ["error", "never"], | ||
"object-literal-sort-keys": 0, | ||
"no-prototype-builtins": 0, | ||
"prefer-const": "error", | ||
quotes: ["error", "double"], | ||
semi: "error", | ||
}, | ||
languageOptions: { | ||
globals: { | ||
BigInt: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 10, | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
}, | ||
{ | ||
files: ["**/test/**/*.ts"], | ||
rules: { | ||
"import/no-extraneous-dependencies": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"no-console": "off" | ||
}, | ||
} | ||
); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
/* eslint-disable no-console */ | ||
|
||
export type BenchmarkResult = { | ||
id: string; | ||
averageNs: number; | ||
|
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.