2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 06:07:45 +00:00

Add eslint

This commit is contained in:
Tomas Kirda 2023-10-10 19:16:33 -05:00
parent 4ef474dd4b
commit f91b4af950
3 changed files with 1005 additions and 6 deletions

986
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -8,7 +8,8 @@
"types": "./typings/jquery.autocomplete.d.ts",
"license": "MIT",
"scripts": {
"format": "prettier --write ./src/**"
"format": "prettier --write ./src/**",
"lint": "eslint ./src"
},
"repository": {
"type": "git",
@ -19,6 +20,7 @@
},
"devDependencies": {
"@types/jquery": "^3.5.22",
"eslint": "^8.51.0",
"grunt": "^1.0.1",
"grunt-contrib-uglify": "^1.0.1",
"jquery-mockjax": "^2.6.0",
@ -31,6 +33,20 @@
"trailingComma": "es5",
"tabWidth": 4
},
"eslintConfig": {
"env": {
"browser": true
},
"extends": [
"eslint:recommended"
],
"globals": {
"define": "readonly",
"jQuery": "readonly",
"module": "readonly",
"require": "readonly"
}
},
"files": [
"dist/",
"typings/jquery-autocomplete/*.d.ts",

View File

@ -6,9 +6,6 @@
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
*/
/*jslint browser: true, white: true, single: true, this: true, multivar: true */
/*global define, window, document, jQuery, exports, require */
// Expose plugin as an AMD module if AMD loader is present:
(function (factory) {
'use strict';
@ -673,7 +670,7 @@
beforeRender = options.beforeRender,
html = '',
category,
formatGroup = function (suggestion, index) {
formatGroup = function (suggestion) {
var currentCategory = suggestion.data[groupBy];
if (category === currentCategory) {