hoist node modules to the top, if they are prefixed with node:

This commit is contained in:
Norbert de Langen 2024-08-08 11:28:28 +02:00
parent e12039c059
commit a5dabc4358
3 changed files with 14 additions and 6 deletions

View File

@ -1,12 +1,13 @@
import { writeFile } from 'node:fs/promises';
import { dirname, join } from 'node:path';
import * as process from 'node:process';
import { globalExternals } from '@fal-works/esbuild-plugin-global-externals';
import chalk from 'chalk';
import { spawn } from 'cross-spawn';
import * as esbuild from 'esbuild';
import { readJson } from 'fs-extra';
import { glob } from 'glob';
import { writeFile } from 'node:fs/promises';
import { dirname, join } from 'node:path';
import * as process from 'node:process';
import limit from 'p-limit';
import * as prettier from 'prettier';
import prettyTime from 'pretty-hrtime';

View File

@ -16,7 +16,13 @@ export default {
],
plugins: ['@trivago/prettier-plugin-sort-imports'],
importOrder: ['^node:', '^storybook/internal', '^@storybook/(.*)$', '^[./]'],
importOrder: [
'^node:',
'^storybook/internal',
'^@storybook/(.*)$',
'<THIRD_PARTY_MODULES>',
'^[./]',
],
importOrderSeparation: true,
importOrderSortSpecifiers: true,

View File

@ -1,7 +1,8 @@
import fsSync from 'node:fs';
import path from 'node:path';
import glob from 'fast-glob';
import JSON5 from 'json5';
import fsSync from 'node:fs';
import path from 'path';
const files = glob.sync('**/*/tsconfig.json', {
absolute: true,