Merge pull request #101 from AikidoSec/oxlint

Use oxlint instead of eslint
This commit is contained in:
Sander Declerck 2025-10-10 14:54:54 +02:00 committed by GitHub
commit 831621323b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 165 additions and 3318 deletions

View file

@ -28,7 +28,7 @@ jobs:
- name: Run unit tests - name: Run unit tests
run: npm test run: npm test
- name: Run ESLint - name: Run linting
run: npm run lint run: npm run lint
- name: Create package tarball - name: Create package tarball

29
.oxlintrc.json Normal file
View file

@ -0,0 +1,29 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": [
"node",
"promise",
"eslint",
"unicorn",
"oxc",
"import"
],
"env": {
"browser": false,
"node": true
},
"rules": {
"eslint/no-console": "error",
"eslint/no-empty": "error"
},
"overrides": [
{
"files": [
"*.spec.js"
],
"rules": {
"eslint/no-console": "off"
}
}
]
}

View file

@ -1,26 +0,0 @@
import js from "@eslint/js";
import { defineConfig, globalIgnores } from "@eslint/config-helpers";
import globals from "globals";
import importPlugin from "eslint-plugin-import";
export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts}"],
plugins: { js },
extends: ["js/recommended"],
},
{
files: ["**/*.{js,mjs,cjs,ts}"],
languageOptions: { globals: globals.node },
},
importPlugin.flatConfigs.recommended,
{
files: ["**/*.{js,mjs,cjs}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {},
},
globalIgnores(['test/e2e', 'node_modules']),
]);

3413
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -18,13 +18,6 @@
"author": "Aikido Security", "author": "Aikido Security",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.35.0", "oxlint": "^1.22.0"
"eslint": "^9.35.0",
"eslint-plugin-import": "^2.32.0",
"globals": "^16.1.0",
"typescript-eslint": "^8.32.0"
},
"overrides": {
"brace-expansion@<=2.0.2": "2.0.2"
} }
} }

View file

@ -1,3 +1,4 @@
// oxlint-disable no-console
import { auditChanges } from "@aikidosec/safe-chain/scanning"; import { auditChanges } from "@aikidosec/safe-chain/scanning";
// Bun Security Scanner for Safe-Chain // Bun Security Scanner for Safe-Chain

View file

@ -4,7 +4,7 @@
"scripts": { "scripts": {
"test": "node --test --experimental-test-module-mocks 'src/**/*.spec.js'", "test": "node --test --experimental-test-module-mocks 'src/**/*.spec.js'",
"test:watch": "node --test --watch --experimental-test-module-mocks 'src/**/*.spec.js'", "test:watch": "node --test --watch --experimental-test-module-mocks 'src/**/*.spec.js'",
"lint": "eslint ." "lint": "oxlint --deny-warnings"
}, },
"bin": { "bin": {
"aikido-npm": "bin/aikido-npm.js", "aikido-npm": "bin/aikido-npm.js",

View file

@ -1,3 +1,4 @@
// oxlint-disable no-console
import chalk from "chalk"; import chalk from "chalk";
import ora from "ora"; import ora from "ora";
import { createInterface } from "readline"; import { createInterface } from "readline";