mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Merge pull request #101 from AikidoSec/oxlint
Use oxlint instead of eslint
This commit is contained in:
commit
831621323b
8 changed files with 165 additions and 3318 deletions
2
.github/workflows/test-on-pr.yml
vendored
2
.github/workflows/test-on-pr.yml
vendored
|
|
@ -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
29
.oxlintrc.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -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']),
|
|
||||||
]);
|
|
||||||
3417
package-lock.json
generated
3417
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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",
|
||||||
|
|
|
||||||
|
|
@ -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";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue