From c169b809e1fc24d892bdfe65d25fb40bd821b0a0 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Wed, 15 Apr 2026 17:06:48 +0545 Subject: [PATCH 1/3] feat: add oxlint configuration and update dependencies --- oxlint.config.ts | 19 +++ package-lock.json | 393 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 413 insertions(+) create mode 100644 oxlint.config.ts diff --git a/oxlint.config.ts b/oxlint.config.ts new file mode 100644 index 0000000..de4f4d6 --- /dev/null +++ b/oxlint.config.ts @@ -0,0 +1,19 @@ +import { defineConfig } from "oxlint"; + +export default defineConfig({ + plugins: ["import", "typescript", "unicorn"], + + ignorePatterns: ["**/*.{mjs,cjs,js,d.ts,d.mts}", ".next"], + overrides: [ + { + files: ["*.test.ts", "*.spec.ts"], + rules: { + "@typescript-eslint/no-explicit-any": "off", + }, + }, + ], + rules: { + eqeqeq: "warn", + "no-thenable": "off", + }, +}); diff --git a/package-lock.json b/package-lock.json index 84afe18..a1b58f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "husky": "^9.1.7", "jest": "^30.2.0", "lint-staged": "^16.2.7", + "oxlint": "^1.60.0", "prettier": "^3.8.1", "ts-jest": "^29.4.6", "ts-node": "^10.9.2", @@ -1827,6 +1828,353 @@ "@tybys/wasm-util": "^0.10.0" } }, + "node_modules/@oxlint/binding-android-arm-eabi": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.60.0.tgz", + "integrity": "sha512-YdeJKaZckDQL1qa62a1aKq/goyq48aX3yOxaaWqWb4sau4Ee4IiLbamftNLU3zbePky6QsDj6thnSSzHRBjDfA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-android-arm64": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.60.0.tgz", + "integrity": "sha512-7ANS7PpXCfq84xZQ8E5WPs14gwcuPcl+/8TFNXfpSu0CQBXz3cUo2fDpHT8v8HJN+Ut02eacvMAzTnc9s6X4tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-arm64": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.60.0.tgz", + "integrity": "sha512-pJsgd9AfplLGBm1fIr25V6V14vMrayhx4uIQvlfH7jWs2SZwSrvi3TfgfJySB8T+hvyEH8K2zXljQiUnkgUnfQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-darwin-x64": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.60.0.tgz", + "integrity": "sha512-Ue1aXHX49ivwflKqGJc7zcd/LeLgbhaTcDCQStgx5x06AXgjEAZmvrlMuIkWd4AL4FHQe6QJ9f33z04Cg448VQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-freebsd-x64": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.60.0.tgz", + "integrity": "sha512-YCyQzsQtusQw+gNRW9rRTifSO+Dt/+dtCl2NHoDMZqJlRTEZ/Oht9YnuporI9yiTx7+cB+eqzX3MtHHVHGIWhg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-gnueabihf": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.60.0.tgz", + "integrity": "sha512-c7dxM2Zksa45Qw16i2iGY3Fti2NirJ38FrsBsKw+qcJ0OtqTsBgKJLF0xV+yLG56UH01Z8WRPgsw31e0MoRoGQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm-musleabihf": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.60.0.tgz", + "integrity": "sha512-ZWALoA42UYqBEP1Tbw9OWURgFGS1nWj2AAvLdY6ZcGx/Gj93qVCBKjcvwXMupZibYwFbi9s/rzqkZseb/6gVtQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-gnu": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.60.0.tgz", + "integrity": "sha512-tpy+1w4p9hN5CicMCxqNy6ymfRtV5ayE573vFNjp1k1TN/qhLFgflveZoE/0++RlkHikBz2vY545NWm/hp7big==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-arm64-musl": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.60.0.tgz", + "integrity": "sha512-eDYDXZGhQAXyn6GwtwiX/qcLS0HlOLPJ/+iiIY8RYr+3P8oKBmgKxADLlniL6FtWfE7pPk7IGN9/xvDEvDvFeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-ppc64-gnu": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.60.0.tgz", + "integrity": "sha512-nxehly5XYBHUWI9VJX1bqCf9j/B43DaK/aS/T1fcxCpX3PA4Rm9BB54nPD1CKayT8xg6REN1ao+01hSRNgy8OA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-gnu": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.60.0.tgz", + "integrity": "sha512-j1qf/NaUfOWQutjeoooNG1Q0zsK0XGmSu1uDLq3cctquRF3j7t9Hxqf/76ehCc5GEUAanth2W4Fa+XT1RFg/nw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-riscv64-musl": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.60.0.tgz", + "integrity": "sha512-YELKPRefQ/q/h3RUmeRfPCUhh2wBvgV1RyZ/F9M9u8cDyXsQW2ojv1DeWQTt466yczDITjZnIOg/s05pk7Ve2A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-s390x-gnu": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.60.0.tgz", + "integrity": "sha512-JkO3C6Gki7Y6h/MiIkFKvHFOz98/YWvQ4WYbK9DLXACMP2rjULzkeGyAzorJE5S1dzLQGFgeqvN779kSFwoV1g==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.60.0.tgz", + "integrity": "sha512-XjKHdFVCpZZZSWBCKyyqCq65s2AKXykMXkjLoKYODrD+f5toLhlwsMESscu8FbgnJQ4Y/dpR/zdazsahmgBJIA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-linux-x64-musl": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.60.0.tgz", + "integrity": "sha512-js29ZWIuPhNWzY8NC7KoffEMEeWG105vbmm+8EOJsC+T/jHBiKIJEUF78+F/IrgEWMMP9N0kRND4Pp75+xAhKg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-openharmony-arm64": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.60.0.tgz", + "integrity": "sha512-H+PUITKHk04stFpWj3x3Kg08Afp/bcXSBi0EhasR5a0Vw7StXHTzdl655PUI0fB4qdh2Wsu6Dsi+3ACxPoyQnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-arm64-msvc": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.60.0.tgz", + "integrity": "sha512-WA/yc7f7ZfCefBXVzNHn1Ztulb1EFwNBb4jMZ6pjML0zz6pHujlF3Q3jySluz3XHl/GNeMTntG1seUBWVMlMag==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-ia32-msvc": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.60.0.tgz", + "integrity": "sha512-33YxL1sqwYNZXtn3MD/4dno6s0xeedXOJlT1WohkVD565WvohClZUr7vwKdAk954n4xiEWJkewiCr+zLeq7AeA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxlint/binding-win32-x64-msvc": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.60.0.tgz", + "integrity": "sha512-JOro4ZcfBLamJCyfURQmOQByoorgOdx3ZjAkSqnb/CyG/i+lN3KoV5LAgk5ZAW6DPq7/Cx7n23f8DuTWXTWgyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -6345,6 +6693,51 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/oxlint": { + "version": "1.60.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.60.0.tgz", + "integrity": "sha512-tnRzTWiWJ9pg3ftRWnD0+Oqh78L6ZSwcEudvCZaER0PIqiAnNyXj5N1dPwjmNpDalkKS9m/WMLN1CTPUBPmsgw==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/Boshen" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.60.0", + "@oxlint/binding-android-arm64": "1.60.0", + "@oxlint/binding-darwin-arm64": "1.60.0", + "@oxlint/binding-darwin-x64": "1.60.0", + "@oxlint/binding-freebsd-x64": "1.60.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.60.0", + "@oxlint/binding-linux-arm-musleabihf": "1.60.0", + "@oxlint/binding-linux-arm64-gnu": "1.60.0", + "@oxlint/binding-linux-arm64-musl": "1.60.0", + "@oxlint/binding-linux-ppc64-gnu": "1.60.0", + "@oxlint/binding-linux-riscv64-gnu": "1.60.0", + "@oxlint/binding-linux-riscv64-musl": "1.60.0", + "@oxlint/binding-linux-s390x-gnu": "1.60.0", + "@oxlint/binding-linux-x64-gnu": "1.60.0", + "@oxlint/binding-linux-x64-musl": "1.60.0", + "@oxlint/binding-openharmony-arm64": "1.60.0", + "@oxlint/binding-win32-arm64-msvc": "1.60.0", + "@oxlint/binding-win32-ia32-msvc": "1.60.0", + "@oxlint/binding-win32-x64-msvc": "1.60.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=0.18.0" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + } + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", diff --git a/package.json b/package.json index 71be686..8d18ed5 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "husky": "^9.1.7", "jest": "^30.2.0", "lint-staged": "^16.2.7", + "oxlint": "^1.60.0", "prettier": "^3.8.1", "ts-jest": "^29.4.6", "ts-node": "^10.9.2", From 874caca9447b55c2c7a98f760aaf5e2edb659acf Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Mon, 20 Apr 2026 21:32:03 +0545 Subject: [PATCH 2/3] feat: enhance linting process by integrating oxlint into npm scripts Co-authored-by: Copilot --- package.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 8d18ed5..100e1a5 100644 --- a/package.json +++ b/package.json @@ -44,12 +44,14 @@ "test": "jest", "coverage": "jest --coverage", "prepare": "husky && npm run build", - "lint": "prettier --check .", "format": "prettier --write .", - "example": "ts-node example.ts" + "example": "ts-node example.ts", + "oxlint": "oxlint", + "lint": "prettier --check . && npm run oxlint" }, "lint-staged": { - "*": "prettier --ignore-unknown --write" + "*.ts": ["oxlint", "prettier --ignore-unknown --write"], + "*": "prettier --ignore-unknown --write" }, "repository": { "url": "https://github.com/opensource-nepal/node-nepali-datetime.git", From ab1ba7e4700e157ff8815738f2c6bcaffdc46c85 Mon Sep 17 00:00:00 2001 From: Rubin Bhandari Date: Mon, 20 Apr 2026 21:34:13 +0545 Subject: [PATCH 3/3] style: format oxlint.config.ts and package.json for consistency --- oxlint.config.ts | 30 +++++++++++++++--------------- package.json | 7 +++++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/oxlint.config.ts b/oxlint.config.ts index de4f4d6..0f17c0e 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -1,19 +1,19 @@ -import { defineConfig } from "oxlint"; +import { defineConfig } from 'oxlint' export default defineConfig({ - plugins: ["import", "typescript", "unicorn"], + plugins: ['import', 'typescript', 'unicorn'], - ignorePatterns: ["**/*.{mjs,cjs,js,d.ts,d.mts}", ".next"], - overrides: [ - { - files: ["*.test.ts", "*.spec.ts"], - rules: { - "@typescript-eslint/no-explicit-any": "off", - }, + ignorePatterns: ['**/*.{mjs,cjs,js,d.ts,d.mts}', '.next'], + overrides: [ + { + files: ['*.test.ts', '*.spec.ts'], + rules: { + '@typescript-eslint/no-explicit-any': 'off', + }, + }, + ], + rules: { + eqeqeq: 'warn', + 'no-thenable': 'off', }, - ], - rules: { - eqeqeq: "warn", - "no-thenable": "off", - }, -}); +}) diff --git a/package.json b/package.json index 100e1a5..1633df6 100644 --- a/package.json +++ b/package.json @@ -50,8 +50,11 @@ "lint": "prettier --check . && npm run oxlint" }, "lint-staged": { - "*.ts": ["oxlint", "prettier --ignore-unknown --write"], - "*": "prettier --ignore-unknown --write" + "*.ts": [ + "oxlint", + "prettier --ignore-unknown --write" + ], + "*": "prettier --ignore-unknown --write" }, "repository": { "url": "https://github.com/opensource-nepal/node-nepali-datetime.git",