mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
Use node: for Node.js builtin modules
Use the the `node:` protocol when importing Node.js builtin modules and enable rule in eslint to enforce. The `node:` protocol for Node.js builtin modules has been available since Node.js v14. See: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/enforce-node-protocol-usage.md
This commit is contained in:
@@ -8,7 +8,7 @@ import ITEMS from './data/items.json';
|
||||
import { fakeDataBase } from './db';
|
||||
|
||||
const { Router } = require('express');
|
||||
const util = require('util');
|
||||
const util = require('node:util');
|
||||
|
||||
// you would use cookies/token etc
|
||||
const USER_ID = 'f9d98cf1-1b96-464e-8755-bcc2a5c09077'; // hardcoded as an example
|
||||
|
Reference in New Issue
Block a user