Merge pull request #3572 from beefproject/red/eslint-upgrade

Upgrade ESLint to v10.4.0 with flat config
This commit is contained in:
zinduolis
2026-05-19 20:05:51 +10:00
committed by GitHub
6 changed files with 481 additions and 819 deletions
-47
View File
@@ -1,47 +0,0 @@
{
"env": {
"browser": true,
"es6": false
},
"extends": ["eslint:recommended"],
"parserOptions": {
"ecmaVersion": 5,
"sourceType": "script"
},
"ignorePatterns": [
"core/main/client/lib/**",
"modules/**"
],
"rules": {
/* Keep this minimal at first. Add project-specific rules after seeing CI logs. */
},
"globals": {
// beef
"beef": "readonly",
// jQuery / alias
"$": "readonly",
"jQuery": "readonly",
"$j": "readonly",
// BeEF bootstrapping
"beef_init": "readonly",
// Existing libraries
"MobileEsp": "readonly",
"evercookie": "readonly",
"swfobject": "readonly",
// Browser-specific globals (old IE / old Firefox)
"XDomainRequest": "readonly",
"MozWebSocket": "readonly",
"clipboardData": "readonly",
// Debug
"isDebug": "readonly"
}
}
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
run: |
echo "Running ESLint on entire codebase"
echo "This is a report-only job and will not block the PR."
npx eslint "**/*.js" || true
npx eslint . || true
- name: Summary
if: always()
+1
View File
@@ -0,0 +1 @@
min-release-age=3
+61
View File
@@ -0,0 +1,61 @@
"use strict";
const js = require("@eslint/js");
const globals = require("globals");
module.exports = [
{
ignores: [
"core/main/client/lib/**",
"modules/**",
"node_modules/**",
"extensions/admin_ui/media/javascript-min/**",
"**/*.min.js",
],
},
js.configs.recommended,
{
files: ["**/*.js"],
ignores: ["eslint.config.js"],
languageOptions: {
ecmaVersion: 5,
sourceType: "script",
globals: {
...globals.browser,
// BeEF
beef: "readonly",
beef_init: "readonly",
// jQuery
$: "readonly",
jQuery: "readonly",
$j: "readonly",
// Libraries
MobileEsp: "readonly",
evercookie: "readonly",
swfobject: "readonly",
// Browser-specific (old IE / old Firefox)
XDomainRequest: "readonly",
MozWebSocket: "readonly",
clipboardData: "readonly",
// Debug
isDebug: "readonly",
},
},
},
{
files: ["eslint.config.js"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "commonjs",
globals: {
module: "writable",
require: "readonly",
},
},
},
];
+411 -766
View File
File diff suppressed because it is too large Load Diff
+7 -5
View File
@@ -4,15 +4,17 @@
"description": "The Browser Exploitation Framework Project",
"scripts": {
"docs": "./node_modules/.bin/jsdoc -c conf.json",
"lint": "eslint",
"lint:fix": "eslint --fix"
"lint": "eslint .",
"lint:fix": "eslint --fix ."
},
"author": "Wade Alcorn",
"license": "GNU General Public License v2.0",
"devDependencies": {
"eslint": "^7.32.0",
"jsdoc": "^4.0.5",
"jsdoc-to-markdown": "^9.1.3"
"@eslint/js": "10.0.1",
"eslint": "10.4.0",
"globals": "17.6.0",
"jsdoc": "4.0.5",
"jsdoc-to-markdown": "9.1.3"
},
"dependencies": {}
}