Skip to content

Commit fc6145e

Browse files
committed
Replace unmaintained jshint/nodeunit with QUnit and ESLint
* Reduce dev dependencies from 365 (v3.0.0) to X (this patch). Reduce npm-audit warnings from 5 to 0. * Immediate motivation is npm-audit warning for lodash 4.17, because JSHint requires 4.17.x via a narrow tilde range, instead of caret range. JSHint had its last release four years ago. Ref #35 Ref https://github.com/jshint/jshint * Match main Grunt repo which moved to ESLint years ago The newest ESLint we can use is ESLint 7, because ESLint 8 requires Node 12+. This matches what gruntjs/grunt uses via grunt-eslint 24, which depends on ESLint 7 for the same reason. Ref gruntjs/grunt#1533 * Fix ESLint output noise by overriding eslint-plugin-pabigot until the upstream config is updated accordingly. Ref markelog/eslint-config-grunt#2 * Switch from unmaintained nodeunit to latest QUnit. Ref https://github.com/gruntjs/nodeunit-x
1 parent 83ba5ad commit fc6145e

7 files changed

Lines changed: 302 additions & 391 deletions

File tree

.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "grunt",
3+
"root": true
4+
}

.jshintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
v3.0.0:
2-
date: 2020-07-27
3-
changes:
1+
- v3.0.0:
2+
- date: 2020-07-27
3+
- changes:
44
- Update dependencies
5-
v2.0.0:
6-
date: 2018-05-19
7-
changes:
5+
- v2.0.0:
6+
- date: 2018-05-19
7+
- changes:
88
- Fix to security warnings
99
- Update to latest grunt-legacy-log-utils
10-
v1.0.1:
11-
date: 2018-03-01
12-
changes:
10+
- v1.0.1:
11+
- date: 2018-03-01
12+
- changes:
1313
- Update lodash to fix security warning
14-
v1.0.0:
15-
date: 2016-04-03
16-
changes:
14+
- v1.0.0:
15+
- date: 2016-04-03
16+
- changes:
1717
- Add appveyor testing
1818
- Fix node.js version support
1919
- Peer dependency updates

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
[![Build Status](https://github.com/gruntjs/grunt-legacy-log/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-legacy-log/actions?workflow=Tests)
2+
[![Built with Grunt](https://gruntjs.com/builtwith.svg)](https://gruntjs.com/)
3+
[![npm](https://img.shields.io/npm/v/grunt-legacy-log.svg?style=flat)](https://www.npmjs.com/package/grunt-legacy-log)
4+
15
# grunt-legacy-log
2-
> The Grunt logger.
36

4-
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.svg)](http://gruntjs.com/)
5-
[![Build Status](https://github.com/gruntjs/grunt-legacy-log/workflows/Tests/badge.svg)](https://github.com/gruntjs/grunt-legacy-log/actions?workflow=Tests)
7+
> The Grunt logger.

examples.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ function doThings(options) {
44
console.log();
55
console.log(options);
66
var log = new Log(options);
7-
log.header("Header line.");
8-
log.subhead("Subhead line.");
9-
log.write("Testing").write(" 123...").writeln("done!");
10-
log.write("Verbose: ").verbose.write("YES").or.write("NO").always.write(", ");
11-
log.notverbose.write("NO").or.write("YES").always.writeln("!");
12-
log.warn("This is a warning.");
13-
log.write("Doing something...").warn();
14-
log.error("This is an error.");
15-
log.write("Doing something...").error();
16-
log.ok("This is ok.");
17-
log.write("Doing something...").ok();
18-
log.errorlns("This is a very long line in errorlns that should wrap eventually, given that it is a very long line.");
19-
log.oklns("This is a very long line in oklns that should wrap eventually, given that it is a very long line.");
20-
log.success("This is a success message.");
21-
log.fail("This is a fail message.");
22-
log.debug("This is a debug message.");
7+
log.header('Header line.');
8+
log.subhead('Subhead line.');
9+
log.write('Testing').write(' 123...').writeln('done!');
10+
log.write('Verbose: ').verbose.write('YES').or.write('NO').always.write(', ');
11+
log.notverbose.write('NO').or.write('YES').always.writeln('!');
12+
log.warn('This is a warning.');
13+
log.write('Doing something...').warn();
14+
log.error('This is an error.');
15+
log.write('Doing something...').error();
16+
log.ok('This is ok.');
17+
log.write('Doing something...').ok();
18+
log.errorlns('This is a very long line in errorlns that should wrap eventually, given that it is a very long line.');
19+
log.oklns('This is a very long line in oklns that should wrap eventually, given that it is a very long line.');
20+
log.success('This is a success message.');
21+
log.fail('This is a fail message.');
22+
log.debug('This is a debug message.');
2323
}
2424

2525
doThings({});

package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"license": "MIT",
1515
"main": "index.js",
1616
"scripts": {
17-
"test": "grunt test"
17+
"test": "eslint . && qunit"
1818
},
1919
"engines": {
2020
"node": ">= 0.10.0"
@@ -29,11 +29,13 @@
2929
"hooker": "~0.2.3",
3030
"lodash": "~4.17.19"
3131
},
32+
"overrides": {
33+
"eslint-plugin-pabigot": "^1.1.0"
34+
},
3235
"devDependencies": {
33-
"grunt": "^1.2.1",
34-
"grunt-cli": "^1.3.2",
35-
"grunt-contrib-jshint": "^2.1.0",
36-
"grunt-contrib-nodeunit": "^2.1.0",
37-
"grunt-contrib-watch": "^1.1.0"
36+
"eslint-config-grunt": "^2.0.1",
37+
"eslint-plugin-pabigot": "^1.1.0",
38+
"eslint": "^7.32.0",
39+
"qunit": "^2.25.0"
3840
}
3941
}

0 commit comments

Comments
 (0)