Skip to content

Commit d9fc45a

Browse files
committed
refactor: fix lint errors
No change to logic. This fixes some lint errors. This is technically a breaking change because we're dropping official support for node v4 (although the real breaking change will come after this when I update shelljs). For some reason the old eslint-wrapper wasn't actually reporting lint errors (there were several on the main branch). I'm not going to debug this since we can just delete the wrapper entirely.
1 parent 49c948a commit d9fc45a

File tree

6 files changed

+7
-19
lines changed

6 files changed

+7
-19
lines changed

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
"prefer-template": 0,
1717
"func-names": 0,
1818
"import/no-extraneous-dependencies": ["error", {"devDependencies": true}],
19+
"import/order": 0,
20+
"no-restricted-globals": 0,
1921
"new-cap": [2, {
2022
"capIsNewExceptions": [
2123
"ShellString"

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
node-version:
13-
- 4
1413
- 6
1514
- 8
1615
- 10

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var plugin = require('shelljs/plugin');
44
// Require whatever modules you need for your project
55
var opener = require('opener');
66
var fs = require('fs');
7+
78
var pathExistsSync = function (filePath) {
89
try {
910
fs.accessSync(filePath);
@@ -32,7 +33,7 @@ function open(options, fileName) {
3233

3334
// Register the new plugin as a ShellJS command
3435
plugin.register('open', open, {
35-
cmdOptions: {}, // There are no supported options for this command
36+
cmdOptions: {}, // There are no supported options for this command
3637
});
3738

3839
// Optionally, you can export the implementation of the command like so:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"posttest": "npm run lint",
88
"test": "mocha",
9-
"lint": "node scripts/eslint-wrapper.js",
9+
"lint": "eslint .",
1010
"changelog": "shelljs-changelog",
1111
"release:major": "shelljs-release major",
1212
"release:minor": "shelljs-release minor",
@@ -43,6 +43,6 @@
4343
"opener": "^1.4.1"
4444
},
4545
"engines": {
46-
"node": ">=4"
46+
"node": ">=6"
4747
}
4848
}

scripts/eslint-wrapper.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var pluginOpen = require('..');
2727
* want to use ShellJS like this normally):
2828
*/
2929
var shell = require('shelljs'); // recommended
30-
require('shelljs/global'); // not recommended
30+
require('shelljs/global'); // not recommended
3131

3232
/*
3333
* Now, require whichever other modules you want to require:

0 commit comments

Comments
 (0)