Skip to content

Commit

Permalink
Update linting tools and fix linting errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlongley committed Feb 27, 2024
1 parent 22c1643 commit 275888b
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 25 deletions.
17 changes: 10 additions & 7 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = {
root: true,
parserOptions: {
// this is required for dynamic import()
ecmaVersion: 2020
},
env: {
node: true
},
extends: ['digitalbazaar', 'digitalbazaar/jsdoc'],
ignorePatterns: ['node_modules/']
extends: [
'digitalbazaar',
'digitalbazaar/jsdoc',
'digitalbazaar/module'
],
ignorePatterns: ['node_modules/'],
rules: {
'unicorn/prefer-node-protocol': 'error'
}
};

1 change: 0 additions & 1 deletion lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import {fileURLToPath} from 'node:url';
import path from 'node:path';

Expand Down
3 changes: 1 addition & 2 deletions lib/configUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import {config as brConfig} from './config.js';
import {getByPath, setByPath, toPath} from './helpers.js';
import {config as brConfig} from './config.js';

const VAR_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;

Expand Down
1 change: 0 additions & 1 deletion lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import {EventEmitter} from '@digitalbazaar/async-node-events';

const emitter = new EventEmitter();
Expand Down
5 changes: 2 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,18 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import * as brUtil from './util.js';
import {boolify, getByPath} from './helpers.js';
import {deserializeError, serializeError} from 'serialize-error';
import cluster from 'node:cluster';
import {config} from './config.js';
import {container as loggers} from './loggers/index.js';
import {cpus} from 'node:os';
import {emitter as events} from './events.js';
import {fileURLToPath} from 'node:url';
import fs from 'node:fs';
import {container as loggers} from './loggers/index.js';
import path from 'node:path';
import {program} from 'commander';
import {serializeError, deserializeError} from 'serialize-error';

// add primary aliases as needed
if(cluster.isPrimary === undefined) {
Expand Down
1 change: 0 additions & 1 deletion lib/loggers/WorkerTransport.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import cycle from 'cycle';
import Transport from 'winston-transport';

Expand Down
3 changes: 1 addition & 2 deletions lib/loggers/fileLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import * as brUtil from '../util.js';
import * as formatters from './formatters.js';
import {config} from '../config.js';
import path from 'node:path';
import {promises as fs} from 'node:fs';
import path from 'node:path';
import {promisify} from 'node:util';
import uidNumber from 'uid-number';
import winston from 'winston';
Expand Down
1 change: 0 additions & 1 deletion lib/loggers/formatters.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import jsonStringify from 'fast-safe-stringify';
import {MESSAGE} from 'triple-beam';
import winston from 'winston';
Expand Down
1 change: 0 additions & 1 deletion lib/loggers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import * as fileLogger from './fileLogger.js';
import * as formatters from './formatters.js';
import cluster from 'node:cluster';
Expand Down
1 change: 0 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*
* SPDX-License-Identifier: Apache-2.0
*/

import {config} from './config.js';
import {serializeError} from 'serialize-error';
import util from 'node:util';
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@digitalbazaar/async-node-events": "^3.0.0",
"commander": "^9.2.0",
"cycle": "^1.0.3",
"eslint-plugin-unicorn": "^51.0.1",
"fast-safe-stringify": "^2.1.1",
"serialize-error": "^10.0.0",
"triple-beam": "^1.3.0",
Expand All @@ -36,11 +37,11 @@
"winston-transport": "^4.5.0"
},
"devDependencies": {
"eslint": "^7.32.0",
"eslint-config-digitalbazaar": "^2.8.0",
"eslint-plugin-jsdoc": "^37.9.7",
"jsdoc": "^3.6.10",
"jsdoc-to-markdown": "^7.1.1"
"eslint": "^8.57.0",
"eslint-config-digitalbazaar": "^5.0.1",
"eslint-plugin-jsdoc": "^48.2.0",
"jsdoc": "^4.0.2",
"jsdoc-to-markdown": "^8.0.1"
},
"engines": {
"node": ">=18"
Expand Down

0 comments on commit 275888b

Please sign in to comment.