Skip to content

Commit

Permalink
32129139: Apply automatic eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DamienCassou committed Dec 14, 2023
1 parent ef8b47a commit f3d80a2
Show file tree
Hide file tree
Showing 24 changed files with 1,093 additions and 853 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ module.exports = {
"**/.eslintrc.js",
"webpack*",
"src/router/optionalParameterSegment.js",
"src/router/staticSegment.js"
"src/router/staticSegment.js",
],
},
]
}
],
},
};
31 changes: 12 additions & 19 deletions src/Widget2.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import router from "./router.js";
import {eventCategory} from "yaem";
import { eventCategory } from "yaem";
import htmlCanvas from "./htmlCanvas.js";
import jQuery from "jquery";
import {getCurrentWidget, withCurrentWidget} from "./currentWidget.js";
import {newId} from "./idGenerator.js";
import { getCurrentWidget, withCurrentWidget } from "./currentWidget.js";
import { newId } from "./idGenerator.js";

/**
* Base for all widgets. A widget can keep state in variables, contain logic and
Expand Down Expand Up @@ -43,7 +43,7 @@ import {newId} from "./idGenerator.js";
* be generated and assigned.
*/
export default class Widget2 {
constructor({id} = {}) {
constructor({ id } = {}) {
this._id = id || newId();

// When within an update transaction, do not update the widget
Expand Down Expand Up @@ -90,14 +90,12 @@ export default class Widget2 {
* of `_initializeSubwidgets()`). In particular, don't override
* `constructor()`.
*/
_initialize(spec) {
}
_initialize(spec) {}

/**
* Hook evaluated at the end of initialization.
*/
_initializeSubwidgets(spec) {
}
_initializeSubwidgets(spec) {}

//
// Public
Expand Down Expand Up @@ -262,7 +260,7 @@ export default class Widget2 {
_createEvents() {
let names = Array.prototype.slice.apply(arguments);

names.forEach(name => this._createEvent(name));
names.forEach((name) => this._createEvent(name));
}

//
Expand All @@ -282,8 +280,7 @@ export default class Widget2 {
/**
* Widget specific dispose.
*/
_dispose() {
}
_dispose() {}

//
// Render
Expand Down Expand Up @@ -380,27 +377,23 @@ export default class Widget2 {
* Hook evaluated before the widget is attached (or reattached due
* to an update of rendering) to the DOM.
*/
_willAttach() {
}
_willAttach() {}

/**
* Hook evaluated each time the widget is attached (or
* reattached due to an update of rendering) to the DOM.
*/
_didAttach() {
}
_didAttach() {}

/**
* Hook evaluated when a widget is detached from the DOM.
*/
_willDetach() {
}
_willDetach() {}

/**
* Hook evaluated before widget update.
*/
_willUpdate() {
}
_willUpdate() {}

/**
* Re-renders the widget and replace it in the DOM
Expand Down
Loading

0 comments on commit f3d80a2

Please sign in to comment.