Skip to content

Commit 25a9953

Browse files
committed
Update linting.
1 parent 58cb6a5 commit 25a9953

File tree

7 files changed

+30
-47
lines changed

7 files changed

+30
-47
lines changed

.eslintrc.cjs

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
1-
/*!
2-
* Copyright 2012 - 2024 Digital Bazaar, Inc.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*
16-
* SPDX-License-Identifier: Apache-2.0
17-
*/
18-
191
module.exports = {
202
root: true,
21-
parserOptions: {
22-
// this is required for dynamic import()
23-
ecmaVersion: 2020
24-
},
253
env: {
264
node: true
275
},
28-
extends: ['digitalbazaar', 'digitalbazaar/jsdoc'],
29-
ignorePatterns: ['node_modules/']
6+
extends: [
7+
'digitalbazaar',
8+
'digitalbazaar/jsdoc',
9+
'digitalbazaar/module'
10+
],
11+
ignorePatterns: ['node_modules/'],
12+
rules: {
13+
'unicorn/prefer-node-protocol': 'error'
14+
}
3015
};

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
- **BREAKING**: Use mongodb driver 6.x.
77
- **BREAKING**: Update error names to match bedrock best practice.
88

9+
### Removed
10+
- **BREAKING**: Remove export of previously deprecated `writeOptions`.
11+
912
## 10.2.0 - 2024-02-28
1013

1114
### Changed

lib/authn.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
*/
1818
import * as bedrock from '@bedrock/core';
1919
import * as urls from './urls.js';
20+
import {klona} from 'klona';
2021
import {logger} from './logger.js';
2122
import {MDBE_AUTHZ_FAILED} from './exceptions.js';
2223
import mongo from 'mongodb';
2324
import semver from 'semver';
24-
import {klona} from 'klona';
2525

2626
const {MongoClient} = mongo;
2727
const {util: {BedrockError}} = bedrock;

lib/helpers.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,18 @@
1515
*
1616
* SPDX-License-Identifier: Apache-2.0
1717
*/
18-
import * as bedrock from '@bedrock/core';
19-
import crypto from 'node:crypto';
2018
import {
2119
MDBE_AUTHN_FAILED,
22-
MDBE_ERROR_SET,
2320
MDBE_DUPLICATE,
24-
MDBE_DUPLICATE_ON_UPDATE
21+
MDBE_DUPLICATE_ON_UPDATE,
22+
MDBE_ERROR_SET
2523
} from './exceptions.js';
24+
import crypto from 'node:crypto';
2625
import {MongoError} from 'mongodb';
2726

2827
// load config defaults
2928
import './config.js';
3029

31-
// Note: exporting `writeOptions` is deprecated
32-
// and will be removed in release 9.0
33-
// default database write options
34-
export const writeOptions = bedrock.config.mongodb.writeOptions;
35-
3630
/**
3731
* Creates a hash of a key that can be indexed.
3832
*

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"homepage": "https://github.com/digitalbazaar/bedrock-mongodb",
2828
"dependencies": {
29+
"eslint-plugin-unicorn": "^55.0.0",
2930
"klona": "^2.0.5",
3031
"mongodb": "^6.14.2",
3132
"semver": "^7.3.7"
@@ -37,10 +38,10 @@
3738
"lib": "./lib"
3839
},
3940
"devDependencies": {
40-
"eslint": "^7.13.0",
41-
"eslint-config-digitalbazaar": "^2.8.0",
42-
"eslint-plugin-jsdoc": "^37.9.7",
43-
"jsdoc-to-markdown": "^7.1.1"
41+
"eslint": "^8.57.1",
42+
"eslint-config-digitalbazaar": "^5.2.0",
43+
"eslint-plugin-jsdoc": "^50.6.3",
44+
"jsdoc-to-markdown": "^9.1.1"
4445
},
4546
"engines": {
4647
"node": ">=18"

test/mocha/.eslintrc

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

test/mocha/.eslintrc.cjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
env: {
3+
mocha: true
4+
},
5+
globals: {
6+
assertNoError: true,
7+
should: true
8+
}
9+
};

0 commit comments

Comments
 (0)