mirror of
https://github.com/beefproject/beef
synced 2026-06-08 13:15:56 +00:00
Upgrade ESLint to v10.4.0 with flat config
This commit is contained in:
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
"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,
|
||||
{
|
||||
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",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
Generated
+411
-766
File diff suppressed because it is too large
Load Diff
+7
-5
@@ -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": {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user