Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio-Emmolo committed Nov 13, 2023
1 parent 88ef951 commit 9765eb2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"scripts": {
"start": "http-server -p 8080"
},
"dependencies": {
"http-server": "^14.1.1"
},
"devDependencies": {
"eslint": "^8.45.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-promise": "^6.1.1"
}
"scripts": {
"start": "http-server -p 8080",
"lint": "npx eslint . --fix"
},
"dependencies": {
"http-server": "^14.1.1"
},
"devDependencies": {
"eslint": "^8.45.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-n": "^16.0.1",
"eslint-plugin-promise": "^6.1.1"
}
}
2 changes: 1 addition & 1 deletion src/leggianche.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ tinymce.PluginManager.add('leggianche', function (editor, url) {
.then(function (data) {
console.table(data)
return data.filter(function (item) {
return type.includes(item.resourceName)
return type.includes(item.resourceName)
})
})

Expand Down
14 changes: 6 additions & 8 deletions src/mediahubPhoto.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ tinymce.PluginManager.add('mediahubPhoto', function (editor, url) {
</div>
</div>
</form>
`
Expand Down Expand Up @@ -274,21 +274,19 @@ function sliderDimensions (value) {
const imageContainers = document.querySelectorAll('.checkboxes div')

imageContainers.forEach(imageContainer => {
const image = imageContainer.querySelector('img')

if (value == 2) {
if (value === 2) {
imageContainer.style.height = '300px'
}
if (value == 3) {
if (value === 3) {
imageContainer.style.height = '250px'
}
if (value == 4) {
if (value === 4) {
imageContainer.style.height = '160px'
}
if (value == 5) {
if (value === 5) {
imageContainer.style.height = '150px'
}
if (value == 6) {
if (value === 6) {
imageContainer.style.height = '100px'
}
})
Expand Down
6 changes: 3 additions & 3 deletions src/widgetbay.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ tinymce.PluginManager.add('widgetbay', function (editor, url) {
onSubmit: function (api) {
const data = api.getData()

$id = data.id ? 'id="' + data.id + '"' : null
$link = data.link ? 'link="' + data.link + '"' : null
const id = data.id ? 'id="' + data.id + '"' : null
const link = data.link ? 'link="' + data.link + '"' : null

editor.insertContent('[widgetbay ' + ($id ?? $link) + ']')
editor.insertContent('[widgetbay ' + (id ?? link) + ']')
api.close()
}
})
Expand Down

0 comments on commit 9765eb2

Please sign in to comment.