mirror of
https://github.com/HeyPuter/puter.git
synced 2025-01-23 06:00:21 +08:00
removed jsdom in test file
removed because wasn't being used
This commit is contained in:
parent
540132cc71
commit
2ca1f71595
145
eslint.config.js
145
eslint.config.js
@ -1,139 +1,12 @@
|
|||||||
import js from "@eslint/js";
|
|
||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
|
import pluginJs from "@eslint/js";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {import('eslint').Linter.Config[]} */
|
||||||
export default [
|
export default [
|
||||||
js.configs.recommended,
|
{files: ["**/*.{js,mjs,cjs,ts}"]},
|
||||||
|
{languageOptions: { globals: globals.browser }},
|
||||||
{
|
pluginJs.configs.recommended,
|
||||||
// Global ignores
|
...tseslint.configs.recommended,
|
||||||
ignores: [
|
];
|
||||||
"**/*.min.js",
|
|
||||||
"**/src/lib/**",
|
|
||||||
"**/dist/",
|
|
||||||
"src/backend/src/public/assets/**",
|
|
||||||
"incubator/**"
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Top-level and tools use Node
|
|
||||||
files: [
|
|
||||||
"tools/**/*.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Back end
|
|
||||||
files: [
|
|
||||||
"src/backend/**/*.js",
|
|
||||||
"mods/**/*.js",
|
|
||||||
"dev-server.js",
|
|
||||||
"utils.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
"kv": true,
|
|
||||||
"def": true,
|
|
||||||
"use": true,
|
|
||||||
"ll":true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Front end
|
|
||||||
files: [
|
|
||||||
"src/**/*.js",
|
|
||||||
],
|
|
||||||
ignores: [
|
|
||||||
"src/backend/**/*.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.browser,
|
|
||||||
...globals.commonjs,
|
|
||||||
// Weird false positives
|
|
||||||
"Buffer": true,
|
|
||||||
// Puter Common
|
|
||||||
"puter": true,
|
|
||||||
"i18n": true,
|
|
||||||
"html_encode": true,
|
|
||||||
"html_decode": true,
|
|
||||||
"isMobile": true,
|
|
||||||
// Class Registry
|
|
||||||
"logger": true,
|
|
||||||
"def": true,
|
|
||||||
"use": true,
|
|
||||||
// Libraries
|
|
||||||
"saveAs": true, // FileSaver
|
|
||||||
"iro": true, // iro.js color picker
|
|
||||||
"$": true, // jQuery
|
|
||||||
"jQuery": true, // jQuery
|
|
||||||
"fflate": true, // fflate
|
|
||||||
"_": true, // lodash
|
|
||||||
"QRCode": true, // qrcode
|
|
||||||
"io": true, // socket.io
|
|
||||||
"timeago": true, // timeago
|
|
||||||
"SelectionArea": true, // viselect
|
|
||||||
// Puter GUI Globals
|
|
||||||
"set_menu_item_prop": true,
|
|
||||||
"determine_active_container_parent": true,
|
|
||||||
"privacy_aware_path": true,
|
|
||||||
"api_origin": true,
|
|
||||||
"auth_token": true,
|
|
||||||
"logout": true,
|
|
||||||
"is_email": true,
|
|
||||||
"select_ctxmenu_item": true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Mods
|
|
||||||
// NOTE: Mods have backend and frontend parts, so this just includes the globals for both.
|
|
||||||
files: [
|
|
||||||
"mods/**/*.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
"use": true,
|
|
||||||
"window": true,
|
|
||||||
"puter": true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Tests
|
|
||||||
files: [
|
|
||||||
"**/test/**/*.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.mocha,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Phoenix
|
|
||||||
files: [
|
|
||||||
"src/phoenix/**/*.js",
|
|
||||||
],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// Global rule settings
|
|
||||||
rules: {
|
|
||||||
"no-prototype-builtins": "off", // Complains about any use of hasOwnProperty()
|
|
||||||
"no-unused-vars": "off", // Temporary, we just have a lot of these
|
|
||||||
"no-debugger": "warn",
|
|
||||||
"no-async-promise-executor": "off", // We do this quite often and it's fine
|
|
||||||
}
|
|
||||||
},
|
|
||||||
];
|
|
31908
output.txt
Normal file
31908
output.txt
Normal file
File diff suppressed because it is too large
Load Diff
1079
package-lock.json
generated
1079
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
19
package.json
19
package.json
@ -11,18 +11,20 @@
|
|||||||
"lib": "lib"
|
"lib": "lib"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.1.1",
|
"@eslint/js": "^9.16.0",
|
||||||
"chalk": "^4.1.0",
|
"chalk": "^4.1.0",
|
||||||
"clean-css": "^5.3.2",
|
"clean-css": "^5.3.2",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"eslint": "^9.1.1",
|
"eslint": "^9.16.0",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"globals": "^15.0.0",
|
"globals": "^15.13.0",
|
||||||
"html-entities": "^2.3.3",
|
"html-entities": "^2.3.3",
|
||||||
"html-webpack-plugin": "^5.6.0",
|
"html-webpack-plugin": "^5.6.0",
|
||||||
"license-check-and-add": "^4.0.5",
|
"license-check-and-add": "^4.0.5",
|
||||||
"mocha": "^10.6.0",
|
"mocha": "^10.6.0",
|
||||||
"nodemon": "^3.1.0",
|
"nodemon": "^3.1.0",
|
||||||
|
"nyc": "^17.1.0",
|
||||||
|
"typescript-eslint": "^8.17.0",
|
||||||
"uglify-js": "^3.17.4",
|
"uglify-js": "^3.17.4",
|
||||||
"webpack": "^5.88.2",
|
"webpack": "^5.88.2",
|
||||||
"webpack-cli": "^5.1.1"
|
"webpack-cli": "^5.1.1"
|
||||||
@ -32,7 +34,8 @@
|
|||||||
"start=gui": "nodemon --exec \"node dev-server.js\" ",
|
"start=gui": "nodemon --exec \"node dev-server.js\" ",
|
||||||
"start": "node ./tools/run-selfhosted.js",
|
"start": "node ./tools/run-selfhosted.js",
|
||||||
"build": "cd src/gui; node ./build.js",
|
"build": "cd src/gui; node ./build.js",
|
||||||
"check-translations": "node tools/check-translations.js"
|
"check-translations": "node tools/check-translations.js",
|
||||||
|
"lint": "eslint ."
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"src/*",
|
"src/*",
|
||||||
@ -53,5 +56,11 @@
|
|||||||
"simple-git": "^3.25.0",
|
"simple-git": "^3.25.0",
|
||||||
"string-template": "^1.0.0",
|
"string-template": "^1.0.0",
|
||||||
"uuid": "^9.0.1"
|
"uuid": "^9.0.1"
|
||||||
}
|
},
|
||||||
|
"nyc": {
|
||||||
|
"include": ["src/**/*.js"],
|
||||||
|
"exclude": ["test/**/*.js"],
|
||||||
|
"reporter": ["text", "html"],
|
||||||
|
"all": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import assert from 'assert';
|
import assert from 'assert';
|
||||||
import { JSDOM } from 'jsdom';
|
|
||||||
|
|
||||||
// Function to test
|
// Function to test
|
||||||
async function hasGitDirectory(items) {
|
async function hasGitDirectory(items) {
|
||||||
|
Loading…
Reference in New Issue
Block a user