mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +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
(cherry picked from commit af71c152c1
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
a8b1e52e2f
commit
26c522176b
@@ -12,8 +12,8 @@ import {
|
||||
readFileSync,
|
||||
rmSync,
|
||||
writeFileSync,
|
||||
} from 'fs';
|
||||
import { join } from 'path';
|
||||
} from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
import { default as htmlPlugin } from './src/rules/html';
|
||||
import { default as tsPlugin } from './src/rules/ts';
|
||||
|
@@ -6,10 +6,11 @@
|
||||
* http://www.dspace.org/license/
|
||||
*/
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { basename } from 'node:path';
|
||||
|
||||
import { TSESTree } from '@typescript-eslint/utils';
|
||||
import { RuleContext } from '@typescript-eslint/utils/ts-eslint';
|
||||
import { readFileSync } from 'fs';
|
||||
import { basename } from 'path';
|
||||
import ts, { Identifier } from 'typescript';
|
||||
|
||||
import {
|
||||
|
Reference in New Issue
Block a user