mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Use oxlint instead of eslint
- Less dev dependencies - Much faster - More helpful output - More sane defaults - Easier config
This commit is contained in:
parent
7603a29182
commit
41ab4b1edb
8 changed files with 164 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
|
||||
run: npm test
|
||||
|
||||
- name: Run ESLint
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
|
||||
- name: Create package tarball
|
||||
|
|
|
|||
28
.oxlintrc.json
Normal file
28
.oxlintrc.json
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"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",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.35.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"
|
||||
"oxlint": "^1.22.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// oxlint-disable no-console
|
||||
import { auditChanges } from "@aikidosec/safe-chain/scanning";
|
||||
|
||||
// Bun Security Scanner for Safe-Chain
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"scripts": {
|
||||
"test": "node --test --experimental-test-module-mocks 'src/**/*.spec.js'",
|
||||
"test:watch": "node --test --watch --experimental-test-module-mocks 'src/**/*.spec.js'",
|
||||
"lint": "eslint ."
|
||||
"lint": "oxlint"
|
||||
},
|
||||
"bin": {
|
||||
"aikido-npm": "bin/aikido-npm.js",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// oxlint-disable no-console
|
||||
import chalk from "chalk";
|
||||
import ora from "ora";
|
||||
import { createInterface } from "readline";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue