]> git.koha-community.org Git - koha.git/commit
Bug 25353: Correct eslint errors in additems.js
authorOwen Leonard <oleonard@myacpl.org>
Mon, 19 Oct 2020 18:32:18 +0000 (18:32 +0000)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 13 Nov 2020 21:30:21 +0000 (21:30 +0000)
commit8232e315ad9b08a33e0f7b0a5a5c06a5a00f823d
tree9a26e1ff5da32f4fb9e5b2c477e0577b12256367
parente7c500439c323fb2bee3d5f1a4ec848bdf600cbf
Bug 25353: Correct eslint errors in additems.js

This patch makes minor changes to additem.js to correct errors
highlighted by eslint:

- Consistent indentation
- Notation of global and exported variables and functions
- Consistent use of the "var" declaration for all new variables
- Remove variables from function calls which aren't used

To test, apply the patch and use your preferred eslint-enabled tool to
check for errors. There should be none.

If you don't have eslint integrated in your development environment you
could use the online ESLint demo at https://eslint.org/demo.

The demo isn't configured to assume a browser environment with jQuery
present, so you'll have to modify the top line after pasting the
contents of additem.js:

/* global $ alert window __ */

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ebe08fb745b04899404bed5ceb00c891a518e89c)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/additem.js