require the use of node prefix on native imports
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const manypkg = require('@manypkg/get-packages');
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
// @ts-check
|
||||
|
||||
const { builtinModules } = require('module');
|
||||
const { builtinModules } = require('node:module');
|
||||
const getPackages = require('./getPackages');
|
||||
|
||||
/**
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const visitImports = require('../lib/visitImports');
|
||||
const getPackageMap = require('../lib/getPackages');
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
const path = require('node:path');
|
||||
const getPackageMap = require('../lib/getPackages');
|
||||
const visitImports = require('../lib/visitImports');
|
||||
const minimatch = require('minimatch');
|
||||
const { execFileSync } = require('child_process');
|
||||
const { execFileSync } = require('node:child_process');
|
||||
|
||||
const depFields = /** @type {const} */ ({
|
||||
dep: 'dependencies',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { RuleTester } from 'eslint';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
import rule from '../rules/no-forbidden-package-imports';
|
||||
|
||||
const RULE = 'no-forbidden-package-imports';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { RuleTester } from 'eslint';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
import rule from '../rules/no-mixed-plugin-imports';
|
||||
|
||||
const RULE = 'no-mixed-plugin-imports';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { RuleTester } from 'eslint';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
import rule from '../rules/no-relative-monorepo-imports';
|
||||
|
||||
const RULE = 'no-relative-monorepo-imports';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { RuleTester } from 'eslint';
|
||||
import path from 'path';
|
||||
import path from 'node:path';
|
||||
import rule from '../rules/no-ui-css-imports-in-non-frontend';
|
||||
|
||||
const RULE = 'no-ui-css-imports-in-non-frontend';
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { RuleTester } from 'eslint';
|
||||
import { join as joinPath } from 'path';
|
||||
import { join as joinPath } from 'node:path';
|
||||
import rule from '../rules/no-undeclared-imports';
|
||||
|
||||
jest.mock('child_process', () => ({
|
||||
|
||||
Reference in New Issue
Block a user