2 Commits

Author SHA1 Message Date
c19eec4913 JQuery type install for eslint 2025-03-07 15:28:02 +09:00
d95160cfe1 esbuild/eslint installer, eslint setup
Minor code cleanup
2025-03-07 13:57:19 +09:00
6 changed files with 1651 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules/

59
eslint.config.mjs Normal file
View File

@@ -0,0 +1,59 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
/*
module.exports = {
// in globals block
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 6
},
// rules copied
};
*/
/** @type {import('eslint').Linter.Config[]} */
export default [
{languageOptions: {
globals: {
...globals.browser,
...globals.jquery
}
}},
pluginJs.configs.recommended,
{
'rules': {
'indent': [
'error',
'tab',
{
'SwitchCase': 1
}
],
'linebreak-style': [
'error',
'unix'
],
// 'quotes': [
// 'error',
// 'single'
// ],
'semi': [
'error',
'always'
],
'no-console': 'off',
'no-unused-vars': [
'error', {
'vars': 'all',
'args': 'after-used',
'ignoreRestSiblings': false
}
],
// Requires eslint >= v8.14.0
'no-constant-binary-expression': 'error'
}
}
];
// __END__

1572
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

18
package.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "ajax-file-upload",
"version": "1.0.0",
"main": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Clemens Schwaighofer",
"license": "",
"description": "Ajax File Upload",
"devDependencies": {
"@eslint/js": "^9.20.0",
"@types/jquery": "^3.5.32",
"esbuild": "^0.25.0",
"eslint": "^9.20.1",
"globals": "^15.15.0"
}
}

View File

@@ -1226,7 +1226,7 @@ function afusOnReadyStateChangeHandler(target_file, file_pos, target_router, evt
// must set dynamic // must set dynamic
console.log('[AJAX Uploader ORSC: %s/%s] Running: %s, Uploader response: %s -> %o', target_file, file_pos, afusRunningGet(target_file), responseData.status, responseData); console.log('[AJAX Uploader ORSC: %s/%s] Running: %s, Uploader response: %s -> %o', target_file, file_pos, afusRunningGet(target_file), responseData.status, responseData);
// the return msg is normally on base level, but it can be in content too // the return msg is normally on base level, but it can be in content too
msg = []; let msg = [];
if (afusKeyInObject('msg', responseData.content)) { if (afusKeyInObject('msg', responseData.content)) {
msg = responseData.content.msg; msg = responseData.content.msg;
} else if (afusKeyInObject('msg', responseData)) { } else if (afusKeyInObject('msg', responseData)) {