|
1 | | -import * as babelGenerator from '@babel/generator' |
2 | | -import * as babelParser from '@babel/parser' |
3 | | -import * as babelTraverse from '@babel/traverse' |
4 | | -import * as babelTypes from '@babel/types' |
5 | | -import * as cheerio from 'cheerio' |
6 | | -import * as child_process from 'child_process' |
7 | | -import dedent from 'dedent' |
8 | | -import esquery from 'esquery' |
| 1 | +export * as babelGenerator from '@babel/generator' |
| 2 | +export * as babelParser from '@babel/parser' |
| 3 | +export * as babelTraverse from '@babel/traverse' |
| 4 | +export * as babelTypes from '@babel/types' |
| 5 | +export * as cheerio from 'cheerio' |
| 6 | +export * as child_process from 'child_process' |
| 7 | +export {default as dedent} from 'dedent' |
| 8 | +export {default as esquery} from 'esquery' |
9 | 9 | // eslint-disable-next-line no-restricted-imports |
10 | | -import * as fs from 'fs' |
11 | | -import * as glob from 'glob' |
12 | | -import * as isomorphicGit from 'isomorphic-git' |
13 | | -import * as jsYaml from 'js-yaml' |
14 | | -import lodash from 'lodash' |
15 | | -import * as memfs from 'memfs' |
| 10 | +export * as fs from 'fs' |
| 11 | +export * as glob from 'glob' |
| 12 | +export * as isomorphicGit from 'isomorphic-git' |
| 13 | +export * as jsYaml from 'js-yaml' |
| 14 | +export {default as lodash} from 'lodash' |
| 15 | + |
| 16 | +export * as memfs from 'memfs' |
16 | 17 | import * as path from 'path' |
17 | | -import * as readPkgUp from 'read-pkg-up' |
18 | | -import * as recast from 'recast' |
19 | | -import * as unionfs from 'unionfs' |
20 | | -import * as zx from 'zx' |
21 | | -import * as esmModules from './esm-modules' |
22 | | -import {fetchSync} from './fetch-sync' |
23 | | -import {makeSynchronous} from './make-synchronous' |
24 | | -import * as simplify from './simplify' |
25 | 18 |
|
26 | | -/*eslint sort-keys: "error"*/ |
| 19 | +export {default as readPkgUp} from 'read-pkg-up' |
| 20 | +export * as recast from 'recast' |
| 21 | +export * as unionfs from 'unionfs' |
| 22 | +export * as zx from 'zx' |
| 23 | +export {arktype} from './esm-modules' |
| 24 | +export {fetchSync} from './fetch-sync' |
| 25 | +export {makeSynchronous} from './make-synchronous' |
27 | 26 |
|
28 | | -export interface PresetDependencies { |
29 | | - arktype: typeof esmModules.arktype |
30 | | - babelGenerator: typeof import('./types/babel-generator') |
31 | | - babelParser: typeof import('@babel/parser') |
32 | | - babelTraverse: typeof import('@babel/traverse') |
33 | | - babelTypes: typeof import('@babel/types') |
34 | | - cheerio: typeof import('cheerio') |
35 | | - child_process: typeof import('child_process') |
36 | | - dedent: typeof import('dedent').default |
37 | | - esquery: typeof import('esquery') |
38 | | - fetchSync: typeof import('./fetch-sync').fetchSync |
39 | | - fs: typeof import('fs') |
40 | | - glob: Pick<typeof import('glob'), 'globSync'> |
41 | | - isomorphicGit: typeof import('isomorphic-git') |
42 | | - jsYaml: typeof import('js-yaml') |
43 | | - lodash: typeof import('lodash') |
44 | | - makeSynchronous: typeof import('./make-synchronous').makeSynchronous |
45 | | - memfs: typeof import('memfs') |
46 | | - path: typeof import('path') |
47 | | - readPkgUp: Pick<typeof import('read-pkg-up'), 'sync'> |
48 | | - recast: typeof import('recast') |
49 | | - /** require an arbitrary module *from eslint-plugin-codegen* - this means you can require dependencies of the plugin even when they're not your dependencies */ |
50 | | - require: <T = unknown>(path: string) => T |
51 | | - simplify: typeof import('./simplify') |
52 | | - unionfs: typeof import('unionfs') |
53 | | - zx: typeof import('zx') |
54 | | -} |
| 27 | +export * as simplify from './simplify' |
55 | 28 |
|
56 | | -export const dependencies: PresetDependencies = { |
57 | | - ...esmModules, |
58 | | - babelGenerator: babelGenerator as never, |
59 | | - babelParser, |
60 | | - babelTraverse, |
61 | | - babelTypes, |
62 | | - cheerio, |
63 | | - child_process, |
64 | | - dedent: Object.assign(dedent, {default: dedent}), // backcompat: accidentally used `import * as dedent from 'dedent'` previously |
65 | | - esquery, |
66 | | - fetchSync, |
67 | | - fs, |
68 | | - glob, |
69 | | - isomorphicGit, |
70 | | - jsYaml, |
71 | | - lodash, |
72 | | - makeSynchronous, |
73 | | - memfs, |
74 | | - path, |
75 | | - readPkgUp, |
76 | | - recast, |
77 | | - // eslint-disable-next-line @typescript-eslint/no-require-imports |
78 | | - require: <T>(modulePath: string) => require(modulePath) as T, |
79 | | - simplify, |
80 | | - unionfs, |
81 | | - zx, |
82 | | -} |
| 29 | +// eslint-disable-next-line unicorn/prefer-export-from |
| 30 | +export {path} |
0 commit comments