Skip to content

Commit 09de7b5

Browse files
committed
Update lint deps.
- Update lint deps. - Add module check. - Fix lint issues.
1 parent 1b4b372 commit 09de7b5

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

.eslintrc.cjs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818

1919
module.exports = {
2020
root: true,
21-
parserOptions: {
22-
// this is required for dynamic import()
23-
ecmaVersion: 2020
24-
},
2521
env: {
2622
node: true
2723
},
28-
extends: ['digitalbazaar', 'digitalbazaar/jsdoc'],
29-
ignorePatterns: ['node_modules/']
24+
extends: [
25+
'digitalbazaar',
26+
'digitalbazaar/jsdoc',
27+
'digitalbazaar/module'
28+
],
29+
ignorePatterns: ['node_modules/'],
30+
rules: {
31+
'unicorn/prefer-node-protocol': 'error'
32+
}
3033
};

lib/authzHttpClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
* SPDX-License-Identifier: Apache-2.0
1717
*/
1818

19+
import {getAccessToken, getNewAccessToken} from './oauth2-client.js';
1920
import {httpClient} from '@digitalbazaar/http-client';
2021
import {httpsAgent} from '@bedrock/https-agent';
2122
import {isInvalidAccessTokenError} from './errorCheck.js';
22-
import {getAccessToken, getNewAccessToken} from './oauth2-client.js';
2323

2424
const proxyMethods = new Set([
2525
'get', 'post', 'push', 'put', 'patch', 'head', 'delete'

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
*/
1818

1919
import * as bedrock from '@bedrock/core';
20-
import './config.js';
2120
import {getAuthzClients} from './oauth2-client.js';
21+
import './config.js';
2222
export * from './errorCheck.js';
2323
export * from './authzHttpClient.js';
2424
export * from './oauth2-client.js';

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@
3838
"lib": "./lib"
3939
},
4040
"devDependencies": {
41-
"eslint": "^7.32.0",
42-
"eslint-config-digitalbazaar": "^2.8.0",
43-
"eslint-plugin-jsdoc": "^37.9.7",
44-
"jsdoc-to-markdown": "^7.1.1"
41+
"eslint": "^8.57.0",
42+
"eslint-config-digitalbazaar": "^5.2.0",
43+
"eslint-plugin-jsdoc": "^48.2.4",
44+
"eslint-plugin-unicorn": "^52.0.0",
45+
"jsdoc-to-markdown": "^8.0.1"
4546
},
4647
"engines": {
4748
"node": ">=18"

test/mocha/10-api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
* SPDX-License-Identifier: Apache-2.0
1717
*/
1818

19-
import {oAuth2Payload} from './mock-data.js';
2019
import {
21-
isInvalidAccessTokenError, isUnrecoverableError, getAccessToken,
22-
createAuthzHttpClient
20+
createAuthzHttpClient, getAccessToken, isInvalidAccessTokenError,
21+
isUnrecoverableError
2322
} from '@bedrock/oauth2-client';
23+
import {oAuth2Payload} from './mock-data.js';
2424

2525
describe('oauth2-client', () => {
2626
it('should return true if an error contains "invalid_token"', async () => {

test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@bedrock/oauth2-client": "file:..",
1818
"@bedrock/server": "^5.0.0",
1919
"@bedrock/test": "^8.0.0",
20-
"c8": "^7.11.0",
20+
"c8": "^9.1.0",
2121
"cross-env": "^7.0.3"
2222
},
2323
"c8": {

0 commit comments

Comments
 (0)