diff --git a/.eslintrc.js b/.eslintrc.js index 4247f91..f18f1d2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,13 +16,18 @@ module.exports = { "error", "unix" ], - "quotes": [ - "error", - "double" - ], "semi": [ "error", "always" ] + }, + "globals": { + "File": "readonly", + "FileInfo": "readonly", + "MapObject": "readonly", + "TextFile": "readonly", + "TileLayer": "readonly", + "TileMap": "readonly", + "tiled": "readonly" } }; diff --git a/find-layer-by-id.js b/find-layer-by-id.js index a2f224e..cb4baaf 100644 --- a/find-layer-by-id.js +++ b/find-layer-by-id.js @@ -8,8 +8,6 @@ * you know its ID. */ -/* global tiled */ - function findLayerById(thing, id) { for (let i = thing.layerCount - 1; i >= 0; i--) { const layer = thing.layerAt(i); diff --git a/find-object-by-id.js b/find-object-by-id.js index 07d9725..deba955 100644 --- a/find-object-by-id.js +++ b/find-object-by-id.js @@ -11,8 +11,6 @@ * function to work properly for isometric maps. */ -/* global tiled */ - function findObjectById(thing, id) { for (let i = thing.layerCount - 1; i >= 0; i--) { const layer = thing.layerAt(i); diff --git a/follow-warp.js b/follow-warp.js index 965d3d2..de618e5 100644 --- a/follow-warp.js +++ b/follow-warp.js @@ -12,8 +12,6 @@ * with some adjustments it probably could! */ -/* global tiled */ - /** * @param thing {TileMap | GroupLayer} * @param name {string} diff --git a/rectangle-chain.js b/rectangle-chain.js index 20d331b..8ed96ba 100644 --- a/rectangle-chain.js +++ b/rectangle-chain.js @@ -7,8 +7,6 @@ * the map. */ -/* global tiled, MapObject */ - tiled.registerTool("RectangleChain", { name: "Draw Rectangle Chain", icon: "rectangle-chain.svg", diff --git a/remove-unused-tilesets.js b/remove-unused-tilesets.js index 31247a6..16111b2 100644 --- a/remove-unused-tilesets.js +++ b/remove-unused-tilesets.js @@ -9,8 +9,6 @@ * automatically on save. */ -/* global tiled */ - /** * @param {TileMap} map */ diff --git a/shortcuts.mjs b/shortcuts.mjs index 2f90a39..afa8038 100644 --- a/shortcuts.mjs +++ b/shortcuts.mjs @@ -18,8 +18,6 @@ * the Preferences dialog. */ -/* global tiled */ - /** * @param {Tileset} tileset */ diff --git a/tile-rectangle.js b/tile-rectangle.js index c08e92f..c3a823b 100644 --- a/tile-rectangle.js +++ b/tile-rectangle.js @@ -10,8 +10,6 @@ * brush is repeated in all directions. */ -/* global tiled, TileLayer, TileMap */ - tiled.registerTool("PaintTileRectangle", { name: "Paint Tile Rectangle", icon: "tile-rectangle.svg", diff --git a/videogame-format.js b/videogame-format.js index 53e4432..e3354b9 100644 --- a/videogame-format.js +++ b/videogame-format.js @@ -8,8 +8,6 @@ * method from the videogame library (https://github.com/diogoeichert/videogame) */ -/* global tiled, FileInfo, TextFile */ - tiled.registerMapFormat("videogame", { name: "videogame map format", extension: "json",