Skip to content

Commit

Permalink
Merge pull request #3994 from 3liz/backport-3993-to-release_3_7
Browse files Browse the repository at this point in the history
[Backport release_3_7] Eslint auto fix
  • Loading branch information
nboisteault authored Dec 1, 2023
2 parents cefee9b + 5fe5cd2 commit 6009b79
Show file tree
Hide file tree
Showing 69 changed files with 8,456 additions and 8,096 deletions.
5 changes: 4 additions & 1 deletion assets/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"es6": true,
"jquery": true
},
"extends": ["eslint:recommended"],
"extends": ["eslint:recommended", "plugin:jsdoc/recommended"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly",
Expand All @@ -17,6 +17,9 @@
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": [
"jsdoc"
],
"rules": {
"indent": ["error", 4, {
"SwitchCase": 1, "ignoredNodes": ["TemplateLiteral *"]
Expand Down
147 changes: 147 additions & 0 deletions assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"devDependencies": {
"eslint": "^8.54.0",
"eslint-plugin-jsdoc": "^46.9.0",
"jsts": "^2.11.0",
"lit-html": "^3.1.0",
"ol": "^8.2.0",
Expand Down
7 changes: 2 additions & 5 deletions assets/src/components/FeatureToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export default class FeatureToolbar extends HTMLElement {

/**
* Return true if childLayer has a relation with parentLayer
*
* @readonly
*/
get hasRelation(){
Expand All @@ -228,7 +227,6 @@ export default class FeatureToolbar extends HTMLElement {

/**
* Return true if layer has geometry, WFS capability and popup_allow_download = true
*
* @readonly
*/
get isFeatureExportable(){
Expand Down Expand Up @@ -274,8 +272,7 @@ export default class FeatureToolbar extends HTMLElement {

/**
* Return the list of children layers for which a feature can be created
*
* @return array
* @returns array
*/
get editableChildrenLayers() {
const editableChildrenLayers = [];
Expand Down Expand Up @@ -561,7 +558,7 @@ export default class FeatureToolbar extends HTMLElement {

/**
* Launch the creation of a new feature for the given child layer
*
* @param childItem
*/
createChild(childItem) {
// Get the parent feature corresponding to the popup
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/FullScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class FullScreen extends HTMLElement {
}

this._template = () =>
html`
html`
<button @click=${() => document.fullscreenElement ? document.exitFullscreen() : this._elementFullscreened.requestFullscreen()}>
${document.fullscreenElement
? html`<svg><use xlink:href="#fullscreen-exit"></use></svg>`
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/SelectionInvert.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import '../images/svg/mActionInvertSelection.svg';
/**
* Webcomponent used to invert selection on layer selection defined by 'feature-type' attribute
* or allFeatureTypeSelected defined in SelectionTool module
* @extends HTMLElement
* @augments HTMLElement
*/
export default class SelectionInvert extends HTMLElement {
constructor() {
Expand Down
4 changes: 2 additions & 2 deletions assets/src/components/Treeview.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default class Treeview extends HTMLElement {
};

this._symbolTemplate = symbol =>
html`
html`
<li>
<label class="symbol-title">
${symbol.ruleKey
Expand All @@ -38,7 +38,7 @@ export default class Treeview extends HTMLElement {
</li>`

this._layerTemplate = layerTreeGroupState =>
html`
html`
<ul>
${layerTreeGroupState.children.map(item => html`
<li data-testid="${item.name}" class="${this._isVisible(item) ? '' : 'not-visible'}">
Expand Down
4 changes: 2 additions & 2 deletions assets/src/components/edition/PasteGeom.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import '../../images/svg/mActionEditPaste.svg';

/**
* Webcomponent used to reverse vertices order for a modified feature
* @extends HTMLElement
* @augments HTMLElement
*/
export default class pasteGeom extends HTMLElement {
constructor() {
Expand Down Expand Up @@ -36,7 +36,7 @@ export default class pasteGeom extends HTMLElement {

connectedCallback() {
this._template = () =>
html`
html`
<button class='btn btn-small' data-original-title='${lizDict['edition.geom.paste']}' ?disabled=${!mainLizmap.featureStorage.get().length} @click=${() => this._paste()}>
<svg>
<use xlink:href="#mActionEditPaste"></use>
Expand Down
2 changes: 1 addition & 1 deletion assets/src/components/edition/ReverseGeom.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '../../images/svg/mActionReverseLine.svg';

/**
* Webcomponent used to reverse vertices order for a modified feature
* @extends HTMLElement
* @augments HTMLElement
*/
export default class reverseGeom extends HTMLElement {
constructor() {
Expand Down
Loading

0 comments on commit 6009b79

Please sign in to comment.