Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit cf8117e

Browse files
committed
Switch from eslint to oxlint
1 parent edb2edd commit cf8117e

File tree

8 files changed

+133
-113
lines changed

8 files changed

+133
-113
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tsup.config.ts
2+
vitest.config.ts

.eslintrc.json

Lines changed: 0 additions & 70 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
/coverage/
66
/build/
77
/reports/
8-
dreamit-otel-json-logger*.*.tgz
8+
dreamit-funpara*.*.tgz

.npmignore

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1+
/.github/
12
/.idea/
2-
/test-report/
3+
/build/tests/
34
/coverage/
4-
.eslintrc.json
5-
/.github/
6-
vitest.config.js
7-
tsconfig.json
5+
/reports/
86
/src/
97
/tests/
10-
/build/tests/
8+
/test-report/
9+
.eslintignore
10+
.oxlintrc.json
11+
.prettierignore
12+
.prettierrc.json
13+
dreamit-funpara*.*.tgz
14+
stryker-incremental.json
15+
stryker.config.json
16+
tsconfig.json
17+
tsup.config.ts
18+
vitest.config.ts

.oxlintrc.json

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["import", "typescript", "unicorn", "oxc", "oxc-security"],
4+
"env": {
5+
"node": true,
6+
"commonjs": true,
7+
"es6": true
8+
},
9+
"globals": {
10+
"Atomics": "readonly",
11+
"SharedArrayBuffer": "readonly"
12+
},
13+
"settings": {},
14+
"categories": {
15+
"correctness": "error",
16+
"pedantic": "error",
17+
"perf": "error",
18+
"style": "error",
19+
"suspicious": "error"
20+
},
21+
"rules": {
22+
"eqeqeq": "warn",
23+
"eslint/default-case": "error",
24+
"eslint/no-console": "off",
25+
"eslint/no-div-regex": "error",
26+
"eslint/no-else-return": "off",
27+
"eslint/no-empty": "error",
28+
"eslint/no-empty-function": "error",
29+
"eslint/no-eq-null": "error",
30+
"eslint/no-eval": "error",
31+
"eslint/no-regex-spaces": "error",
32+
"eslint/no-restricted-globals": "error",
33+
"eslint/no-var": "error",
34+
"eslint/no-void": "error",
35+
"eslint/require-await": "off",
36+
"eslint/max-lines": ["error", 550],
37+
"eslint/max-params": "off",
38+
"eslint/no-magic-numbers": "off",
39+
"eslint/no-ternary": "off",
40+
"eslint/sort-imports": "off",
41+
"eslint/yoda": "off",
42+
"import/max-dependencies": "off",
43+
"import/no-amd": "error",
44+
"import/no-commonjs": "error",
45+
"import/no-cycle": "error",
46+
"import/no-default-export": "error",
47+
"import/no-dynamic-require": "error",
48+
"import/unambiguous": "error",
49+
"jsdoc/empty-tags": "error",
50+
"oxc/bad-bitwise-operator": "error",
51+
"oxc/no-barrel-file": "error",
52+
"oxc/no-const-enum": "error",
53+
"promise/catch-or-return": "error",
54+
"promise/spec-only": "error",
55+
"typescript/consistent-generic-constructors": "off",
56+
"typescript/consistent-indexed-object-style": "off",
57+
"typescript/explicit-function-return-type": "error",
58+
"typescript/no-dynamic-delete": "error",
59+
"typescript/no-empty-object-type": "error",
60+
"typescript/no-explicit-any": "error",
61+
"typescript/no-import-type-side-effects": "error",
62+
"typescript/no-namespace": "error",
63+
"typescript/no-non-null-asserted-nullish-coalescing": "error",
64+
"typescript/no-non-null-assertion": "error",
65+
"typescript/no-require-imports": "error",
66+
"typescript/prefer-literal-enum-member": "error",
67+
"unicorn/catch-error-name": "off",
68+
"unicorn/filename-case": "off",
69+
"unicorn/no-abusive-eslint-disable": "error",
70+
"unicorn/no-anonymous-default-export": "error",
71+
"unicorn/no-array-for-each": "error",
72+
"unicorn/no-array-reduce": "error",
73+
"unicorn/no-length-as-slice-end": "error",
74+
"unicorn/no-magic-array-flat-depth": "error",
75+
"unicorn/no-null": "off",
76+
"unicorn/no-process-exit": "error",
77+
"unicorn/prefer-modern-math-apis": "error",
78+
"unicorn/prefer-node-protocol": "error",
79+
"unicorn/prefer-number-properties": "error"
80+
}
81+
}

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@dreamit/funpara",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"description": "Function parameter library for coding and testing",
55
"scripts": {
66
"build": "tsup-node",
77
"check": "tsc --noEmit --pretty",
88
"checkformat": "prettier --check .",
99
"format": "prettier --cache --write .",
10-
"lint": "eslint src/*.ts tests/*.ts",
11-
"lintfix": "eslint --fix src/*.ts tests/*.ts",
10+
"lint": "oxlint -c .oxlintrc.json",
11+
"lintfix": "oxlint -c .oxlintrc.json --fix",
1212
"mutationtest": "stryker run",
1313
"mutationtestCI": "stryker run --incremental --incrementalFile stryker-incremental.json",
1414
"prepack": "npm run build",
@@ -48,15 +48,11 @@
4848
"@stryker-mutator/vitest-runner": "8.7.0",
4949
"@types/node": "22.10.1",
5050
"@vitest/coverage-v8": "2.1.8",
51-
"eslint-plugin-deprecation": "3.0.0",
52-
"eslint-plugin-import": "2.31.0",
53-
"eslint-plugin-security": "3.0.1",
54-
"eslint-plugin-unicorn": "56.0.1",
51+
"oxlint": "0.14.1",
5552
"prettier": "3.4.2",
5653
"prettier-plugin-organize-imports": "4.1.0",
5754
"tsup": "8.3.5",
5855
"typescript": "5.7.2",
59-
"typescript-eslint": "8.17.0",
6056
"vite-tsconfig-paths": "5.1.4",
6157
"vitest": "2.1.8"
6258
}

stryker-incremental.json

Lines changed: 26 additions & 21 deletions
Large diffs are not rendered by default.

tests/index.test.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import type {
2-
DateFunction,
3-
ExitFunction,
4-
FetchFunction,
5-
TimeoutFunction,
6-
} from '@/index'
71
import {
82
aggregateErrorFetchFunction,
93
badRequestFetchFunction,
104
brokenJSONFetchFunction,
5+
DateFunction,
116
doNotExitFunction,
7+
ExitFunction,
8+
FetchFunction,
129
fixedDateFunction,
1310
fixedResponseFetchFunction,
1411
graphQLIntrospectionDisabledFetchFunction,
@@ -21,6 +18,7 @@ import {
2118
testDateFunction,
2219
testDateString,
2320
timeoutFetchFunction,
21+
TimeoutFunction,
2422
unknownContentTypeFetchFunction,
2523
} from '@/index'
2624
import { expect, test } from 'vitest'
@@ -31,7 +29,7 @@ import { expect, test } from 'vitest'
3129
* and prepareLogMessage functions in order to be able to set a custom DateFunction if necessary.
3230
*/
3331
class Logger {
34-
logEntries: Array<string> = []
32+
logEntries: string[] = []
3533

3634
/**
3735
* Setting the default value to nowDateFunction will make it

0 commit comments

Comments
 (0)