Skip to content

Commit 8aa719c

Browse files
committed
refactor: use node protocol identifier
1 parent 7a45e99 commit 8aa719c

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

src/bin/generateDocs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
/**
2+
* This script is used to inline assertions into the README.md documents.
3+
*/
14
import plugin from '../index.js';
25
import decamelize from 'decamelize';
3-
import fs from 'fs';
46
import Gitdown from 'gitdown';
57
import {
68
glob,
79
} from 'glob';
8-
/**
9-
* This script is used to inline assertions into the README.md documents.
10-
*/
11-
import path from 'path';
10+
import fs from 'node:fs';
11+
import path from 'node:path';
1212

1313
const dirname = import.meta.dirname;
1414

src/bin/generateOptions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import {
1010
readdir,
1111
readFile,
1212
writeFile,
13-
} from 'fs/promises';
13+
} from 'node:fs/promises';
1414
import {
1515
join,
16-
} from 'path';
16+
} from 'node:path';
1717

1818
const rulesDir = './src/rules';
1919

src/bin/generateRule.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/* eslint-disable no-console -- CLI */
2-
3-
import camelCase from 'camelcase';
4-
import {
5-
existsSync,
6-
} from 'fs';
7-
import fs from 'fs/promises';
82
/**
93
* @example
104
* ```shell
115
* pnpm run create-rule my-new-rule -- --recommended
126
* ```
137
*/
14-
import open from 'open-editor';
8+
9+
import camelCase from 'camelcase';
10+
import {
11+
existsSync,
12+
} from 'node:fs';
13+
import fs from 'node:fs/promises';
1514
import {
1615
resolve,
17-
} from 'path';
16+
} from 'node:path';
17+
import open from 'open-editor';
1818

1919
// Todo: Would ideally have prompts, e.g., to ask for whether
2020
// type was problem/layout, etc.

src/rules/importsAsDependencies.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {
66
} from '@es-joy/jsdoccomment';
77
import {
88
readFileSync,
9-
} from 'fs';
9+
} from 'node:fs';
1010
import {
1111
isBuiltin as isBuiltinModule,
1212
} from 'node:module';
1313
import {
1414
join,
15-
} from 'path';
15+
} from 'node:path';
1616

1717
/**
1818
* @type {Set<string>|null}

test/rules/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import {
66
} from 'eslint';
77
import {
88
readFileSync,
9-
} from 'fs';
9+
} from 'node:fs';
10+
import {
11+
join,
12+
} from 'node:path';
1013
import {
1114
parseArgs,
1215
} from 'node:util';
1316
import {
1417
merge,
1518
} from 'object-deep-merge';
16-
import {
17-
join,
18-
} from 'path';
1919
import semver from 'semver';
2020

2121
/**

0 commit comments

Comments
 (0)