Skip to content

Commit

Permalink
[npm-dev]: Bump eslint from 8.54.0 to 9.8.0 and migrate the configura…
Browse files Browse the repository at this point in the history
…tion (#17)

Bumps [eslint](https://github.com/eslint/eslint) from 8.54.0 to 9.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.54.0...v9.8.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: Ryuu Mitsuki <dhefam31@gmail.com>
Authored-by: dependabot[bot] <support@github.com>
Co-authored-by: Ryuu Mitsuki <dhefam31@gmail.com>
  • Loading branch information
mitsuki31 committed Jul 31, 2024
2 parents 7ca6e57 + e10c26f commit d9dd2d4
Show file tree
Hide file tree
Showing 9 changed files with 210 additions and 282 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

65 changes: 0 additions & 65 deletions .eslintrc.js

This file was deleted.

2 changes: 2 additions & 0 deletions config/example/ytmp3-js.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* global module:readonly */

module.exports = {
downloadOptions: {
cwd: '.',
Expand Down
61 changes: 61 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
'use strict';

const globals = require('globals');
const js = require('@eslint/js');

module.exports = [
js.configs.recommended,

{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.es6
}
},
linterOptions: {
reportUnusedDisableDirectives: 'error'
},
rules: {
strict: [ 'error', 'safe' ],
'eol-last': [ 'error', 'always' ],
eqeqeq: [ 'error', 'always' ],
'prefer-const': [ 'warn' ],
'no-unused-vars': [ 'error', {
argsIgnorePattern: '^_+',
varsIgnorePattern: '^_+'
}],
'max-len': [ 'warn', {
code: 90,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreRegExpLiterals: true
}],
indent: [ 'error', 2, {
SwitchCase: 1,
VariableDeclarator: 'first',
FunctionExpression: {
parameters: 'first',
body: 1
}
}],
'linebreak-style': [ 'warn', 'unix' ],
quotes: [ 'warn', 'single', { avoidEscape: false } ],
semi: [ 'error', 'always' ],
camelcase: [ 'error', { properties: 'always' } ],
curly: [ 'error', 'multi-line', 'consistent' ],
'no-else-return': ['error'],
'default-param-last': ['error'],
},
ignores: [
'jsdoc.*',
'jsdoc.config.*',
'docs/**',
'config/example/**'
]
}
];
2 changes: 2 additions & 0 deletions jsdoc.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
* @author Ryuu Mitsuki (https://github.com/mitsuki31)
*/

/* global module:readonly */

'use strict';

module.exports = {
Expand Down
7 changes: 6 additions & 1 deletion lib/audioconv.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ async function checkFfmpeg(verbose=false) {

verbose && log.error('`ffmpeg` not installed on system');
return false;
} catch (err) {
/* eslint-disable-next-line no-unused-vars
---
Only need to ensure that the `spawn` call is correctly executed
to check FFmpeg; if error occurred, that means the `ffmpeg` command
are not recognized */
} catch (_err) {
verbose && log.error('`ffmpeg` not installed on system');
return false;
}
Expand Down
5 changes: 5 additions & 0 deletions lib/ytmp3.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,11 @@ async function batchDownload(inputFile, downloadOptions) {
errLogFile, progressBar
}, !quiet);
successDownloads.push(outFile);
/* eslint-disable-next-line no-unused-vars
---
In this case, we don't need to do anything with the error,
just continue the downloads and brief the download errors
to user on the download summary afterwards */
} catch (_err) {
failedDownloads.push(outFile);
// * Do not throw, continue download any remaining audios
Expand Down
Loading

0 comments on commit d9dd2d4

Please sign in to comment.