mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-09 23:01:00 +00:00
Add eslint
This commit is contained in:
parent
4ef474dd4b
commit
f91b4af950
986
package-lock.json
generated
986
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -8,7 +8,8 @@
|
|||||||
"types": "./typings/jquery.autocomplete.d.ts",
|
"types": "./typings/jquery.autocomplete.d.ts",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format": "prettier --write ./src/**"
|
"format": "prettier --write ./src/**",
|
||||||
|
"lint": "eslint ./src"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -19,6 +20,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jquery": "^3.5.22",
|
"@types/jquery": "^3.5.22",
|
||||||
|
"eslint": "^8.51.0",
|
||||||
"grunt": "^1.0.1",
|
"grunt": "^1.0.1",
|
||||||
"grunt-contrib-uglify": "^1.0.1",
|
"grunt-contrib-uglify": "^1.0.1",
|
||||||
"jquery-mockjax": "^2.6.0",
|
"jquery-mockjax": "^2.6.0",
|
||||||
@ -31,6 +33,20 @@
|
|||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"tabWidth": 4
|
"tabWidth": 4
|
||||||
},
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended"
|
||||||
|
],
|
||||||
|
"globals": {
|
||||||
|
"define": "readonly",
|
||||||
|
"jQuery": "readonly",
|
||||||
|
"module": "readonly",
|
||||||
|
"require": "readonly"
|
||||||
|
}
|
||||||
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist/",
|
"dist/",
|
||||||
"typings/jquery-autocomplete/*.d.ts",
|
"typings/jquery-autocomplete/*.d.ts",
|
||||||
|
@ -6,9 +6,6 @@
|
|||||||
* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete
|
* 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:
|
// Expose plugin as an AMD module if AMD loader is present:
|
||||||
(function (factory) {
|
(function (factory) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -673,7 +670,7 @@
|
|||||||
beforeRender = options.beforeRender,
|
beforeRender = options.beforeRender,
|
||||||
html = '',
|
html = '',
|
||||||
category,
|
category,
|
||||||
formatGroup = function (suggestion, index) {
|
formatGroup = function (suggestion) {
|
||||||
var currentCategory = suggestion.data[groupBy];
|
var currentCategory = suggestion.data[groupBy];
|
||||||
|
|
||||||
if (category === currentCategory) {
|
if (category === currentCategory) {
|
||||||
|
Loading…
Reference in New Issue
Block a user