Skip to content

Commit f0bec9b

Browse files
tkirdatkirda-bison
authored andcommitted
update dependencies, format code
1 parent 4f59596 commit f0bec9b

5 files changed

Lines changed: 1255 additions & 1238 deletions

File tree

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from '@eslint/js';
2+
3+
export default [
4+
js.configs.recommended,
5+
{
6+
languageOptions: {
7+
ecmaVersion: 2022,
8+
sourceType: 'script',
9+
globals: {
10+
define: 'readonly',
11+
jQuery: 'readonly',
12+
module: 'readonly',
13+
require: 'readonly',
14+
window: 'readonly',
15+
document: 'readonly',
16+
console: 'readonly',
17+
setTimeout: 'readonly',
18+
clearTimeout: 'readonly',
19+
},
20+
},
21+
files: ['src/**/*.js'],
22+
rules: {
23+
// Add any custom rules here if needed
24+
},
25+
},
26+
];

gruntfile.js

Lines changed: 54 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,54 @@
1-
module.exports = function(grunt) {
2-
3-
var pkg = grunt.file.readJSON('package.json');
4-
5-
var banner = [
6-
'/**',
7-
'* Ajax Autocomplete for jQuery, version ' + pkg.version,
8-
'* (c) 2017 Tomas Kirda',
9-
'*',
10-
'* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.',
11-
'* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete',
12-
'*/'].join('\n') + '\n';
13-
14-
// Project configuration.
15-
grunt.initConfig({
16-
pkg: pkg,
17-
uglify: {
18-
options: {
19-
banner: banner
20-
},
21-
build: {
22-
src: 'src/jquery.autocomplete.js',
23-
dest: 'dist/jquery.autocomplete.min.js'
24-
}
25-
}
26-
});
27-
28-
// Load the plugin that provides the "uglify" task.
29-
grunt.loadNpmTasks('grunt-contrib-uglify');
30-
31-
// Default task(s).
32-
grunt.registerTask('default', ['uglify']);
33-
34-
grunt.task.registerTask('build', 'Create release', function() {
35-
var version = pkg.version,
36-
src = grunt.file.read('src/jquery.autocomplete.js').replace('%version%', version),
37-
filePath = 'dist/jquery.autocomplete.js';
38-
39-
// Update not minimized release version:
40-
console.log('Updating: ' + filePath);
41-
grunt.file.write(filePath, src);
42-
43-
// Minify latest version:
44-
grunt.task.run('uglify');
45-
46-
// Update plugin version:
47-
filePath = 'devbridge-autocomplete.jquery.json';
48-
src = grunt.file.readJSON(filePath);
49-
50-
if (src.version !== version){
51-
src.version = version;
52-
console.log('Updating: ' + filePath);
53-
grunt.file.write(filePath, JSON.stringify(src, null, 4));
54-
} else {
55-
console.log('No updates for: ' + filePath);
56-
}
57-
});
58-
};
1+
module.exports = function (grunt) {
2+
var pkg = grunt.file.readJSON("package.json");
3+
4+
var banner =
5+
[
6+
"/**",
7+
"* Ajax Autocomplete for jQuery, version " + pkg.version,
8+
"* (c) 2025 Tomas Kirda",
9+
"*",
10+
"* Ajax Autocomplete for jQuery is freely distributable under the terms of an MIT-style license.",
11+
"* For details, see the web site: https://github.com/devbridge/jQuery-Autocomplete",
12+
"*/",
13+
].join("\n") + "\n";
14+
15+
// Project configuration.
16+
grunt.initConfig({
17+
pkg: pkg,
18+
uglify: {
19+
options: { banner: banner },
20+
build: { src: "src/jquery.autocomplete.js", dest: "dist/jquery.autocomplete.min.js" },
21+
},
22+
});
23+
24+
// Load the plugin that provides the "uglify" task.
25+
grunt.loadNpmTasks("grunt-contrib-uglify");
26+
27+
// Default task(s).
28+
grunt.registerTask("default", ["uglify"]);
29+
30+
grunt.task.registerTask("build", "Create release", function () {
31+
var version = pkg.version,
32+
src = grunt.file.read("src/jquery.autocomplete.js").replace("%version%", version),
33+
filePath = "dist/jquery.autocomplete.js";
34+
35+
// Update not minimized release version:
36+
console.log("Updating: " + filePath);
37+
grunt.file.write(filePath, src);
38+
39+
// Minify latest version:
40+
grunt.task.run("uglify");
41+
42+
// Update plugin version:
43+
filePath = "devbridge-autocomplete.jquery.json";
44+
src = grunt.file.readJSON(filePath);
45+
46+
if (src.version !== version) {
47+
src.version = version;
48+
console.log("Updating: " + filePath);
49+
grunt.file.write(filePath, JSON.stringify(src, null, 4));
50+
} else {
51+
console.log("No updates for: " + filePath);
52+
}
53+
});
54+
};

0 commit comments

Comments
 (0)