Browse Source

DOC,REFA,LINT: implemented first couple of lint issues

dev-feat-component_preview
chris 2 months ago
parent
commit
1a51451e82
  1. 17
      src/base/extStore.js
  2. 2
      src/builder.js
  3. 2
      src/component/Component.js
  4. 1
      src/context/context.js
  5. 10
      src/decorators/border.js

17
src/base/extStore.js

@ -62,6 +62,9 @@ function clearFunctionDeclarationText(func) {
}
/**
* @todo when ExtStorage-feature/logic is reevaluated
* the resolvement of functions (as basically major or main target)
* needs to be overlooked improved and simplified.
*
* @param {Function} func
* @param {string} registrationName
@ -536,10 +539,12 @@ function resolveOverwrite(key, container, overwriteBehaviour) {
)].length;
switch (overwriteBehaviour) {
case OverwriteBehaviour.REPLACE:
case OverwriteBehaviour.REPLACE: {
break;
case OverwriteBehaviour.RENAME_OLD:
nameForOld = `${key}${occurances}`;
}
case OverwriteBehaviour.RENAME_OLD: {
let nameForOld = `${key}${occurances}`;
if (dealAsMap) {
container.set(nameForOld, container.get(key));
container.delete(key);
@ -548,8 +553,10 @@ function resolveOverwrite(key, container, overwriteBehaviour) {
delete container[key];
}
break;
case OverwriteBehaviour.RENAME:
default:
}
case OverwriteBehaviour.RENAME:
default:
key = `${key}${occurances}`;
break;
}

2
src/builder.js

@ -181,7 +181,7 @@ const builder = {
input: function (type, attr = {}, modifier = null) {
let comp = new InputComponent(
document.createElement("input"),
Object.assign({ "type": type }, attr),
Object.assign({ "type": (type || "text") }, attr),
modifier
)
.addStyleClass(`el-input`);

2
src/component/Component.js

@ -321,7 +321,7 @@ class Component extends StyleAndScriptStoringComponent {
let parent = this._parentComponent;
this._parentComponent = null;
return parent.childContext(this)
.generate(generator, modifier, styleStore, functionStore);
.generate(generator, styleStore, functionStore);
}
return generator.generate(this, styleStore, functionStore);

1
src/context/context.js

@ -192,4 +192,5 @@ const CommonCompelGroups = Object.freeze({
DROP_TARGET: "droptarget",
});
const Page = new PageBuilder();

10
src/decorators/border.js

@ -85,11 +85,17 @@ class Border extends Sides {
this._fForth = new BorderDefinition(width, color, style);
}
/**
* @override
* @param {number} index
* @param {number} value
* @returns {Border}
*/
setByIndex(index, value) {
if (value instanceof BorderDefinition) {
this.getByIndex(index).join(value)
this.getByIndex(index).join(value);
} else {
this.getByIndex(index)._width = value
this.getByIndex(index)._width = value;
}
return this;
}

Loading…
Cancel
Save