Skip to content

Commit ab10190

Browse files
authored
Merge pull request #123 from bcomnes/neostandard
2 parents 3dc69f6 + 0fb8f0f commit ab10190

File tree

10 files changed

+248
-207
lines changed

10 files changed

+248
-207
lines changed

bin/main.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
*/
66
'use strict'
77

8-
// TODO: remove.
9-
/* eslint-disable no-process-exit, no-process-env */
10-
118
// ------------------------------------------------------------------------------
129
// Requirements
1310
// ------------------------------------------------------------------------------
@@ -182,5 +179,3 @@ module.exports = function main (source, outDir, args) {
182179
})
183180
}
184181
}
185-
186-
/* eslint-enable no-process-exit, no-process-env */

eslint.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict'
2+
3+
const neostandard = require('neostandard')
4+
const mochaPlugin = require('eslint-plugin-mocha')
5+
6+
const ignores = [
7+
'coverage/**/*',
8+
...neostandard.resolveIgnoresFromGitignore()
9+
]
10+
11+
module.exports = [
12+
{ ignores },
13+
...neostandard(),
14+
{
15+
...mochaPlugin.configs.flat.recommended,
16+
ignores: ['**/*', '!test/**/*'],
17+
},
18+
]

lib/copy-sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ module.exports = function copySync (source, outputDir, options) {
4646
)
4747
}
4848

49-
options = normalizeOptions(source, outputDir, options) // eslint-disable-line no-param-reassign
49+
options = normalizeOptions(source, outputDir, options)
5050

5151
// Clean
5252
let cleaned = []

lib/copy.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,10 @@ const removeFile = require('./utils/remove-file')
3737
* @returns {Promise<void>} The promise which will go fulfilled after done.
3838
*/
3939
module.exports = async function copy (source, outputDir, options, callback) {
40-
/* eslint-disable no-param-reassign */
4140
if (typeof options === 'function') {
4241
callback = options
4342
options = undefined
4443
}
45-
/* eslint-enable no-param-reassign */
4644

4745
assert(typeof source === 'string', "'source' should be a string.")
4846
assert(source.trim().length >= 1, "'source' should not be empty.")
@@ -58,7 +56,6 @@ module.exports = async function copy (source, outputDir, options, callback) {
5856
)
5957
}
6058

61-
// eslint-disable-next-line no-param-reassign
6259
options = normalizeOptions(source, outputDir, options)
6360

6461
// Clean

lib/watch.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ module.exports = function watch (source, outputDir, options) {
4444
assert(typeof options === 'object', "'options' should be an object.")
4545
}
4646

47-
// eslint-disable-next-line no-param-reassign
4847
options = normalizeOptions(source, outputDir, options)
4948

5049
const watcher = new Watcher(options)

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"_mocha": "_mocha \"test/*.js\" --timeout 35000",
1717
"clean": "rm -rf .nyc_output coverage test-ws",
1818
"coverage": "nyc report -r lcov && opener coverage/lcov-report/index.html",
19-
"lint": "standard",
19+
"lint": "eslint",
2020
"test": "nyc --require @babel/register npm run -s _mocha",
2121
"watch": "npm run -s _mocha -- --require @babel/register --watch --growl"
2222
},
@@ -40,14 +40,16 @@
4040
"@babel/register": "^7.5.5",
4141
"auto-changelog": "^2.2.0",
4242
"babel-preset-power-assert": "^3.0.0",
43+
"eslint": "^9.11.1",
44+
"eslint-plugin-mocha": "^10.5.0",
4345
"gh-release": "^7.0.2",
4446
"mocha": "^10.2.0",
47+
"neostandard": "^0.11.6",
4548
"nyc": "17.0.0",
4649
"opener": "^1.5.1",
4750
"p-event": "^6.0.0",
4851
"power-assert": "^1.6.1",
4952
"shelljs": "^0.8.3",
50-
"standard": "^17.1.0",
5153
"through": "^2.3.8"
5254
},
5355
"repository": {

0 commit comments

Comments
 (0)