|
1 | 1 | import type { TSESLint } from '@typescript-eslint/utils'
|
2 | 2 |
|
3 |
| -import type { PluginConfig } from './types' |
4 |
| - |
5 | 3 | // rules
|
6 |
| -import noUnresolved from './rules/no-unresolved' |
7 |
| -import named from './rules/named' |
| 4 | +import electron from './config/electron' |
| 5 | +import errors from './config/errors' |
| 6 | +import react from './config/react' |
| 7 | +import reactNative from './config/react-native' |
| 8 | +import recommended from './config/recommended' |
| 9 | +import stage0 from './config/stage-0' |
| 10 | +import typescript from './config/typescript' |
| 11 | +import warnings from './config/warnings' |
| 12 | +import consistentTypeSpecifierStyle from './rules/consistent-type-specifier-style' |
8 | 13 | import default_ from './rules/default'
|
9 |
| -import namespace from './rules/namespace' |
10 |
| -import noNamespace from './rules/no-namespace' |
| 14 | +import dynamicImportChunkname from './rules/dynamic-import-chunkname' |
11 | 15 | import export_ from './rules/export'
|
12 |
| -import noMutableExports from './rules/no-mutable-exports' |
| 16 | +import exportsLast from './rules/exports-last' |
13 | 17 | import extensions from './rules/extensions'
|
14 |
| -import noRestrictedPaths from './rules/no-restricted-paths' |
15 |
| -import noInternalModules from './rules/no-internal-modules' |
| 18 | +import first from './rules/first' |
16 | 19 | import groupExports from './rules/group-exports'
|
17 |
| -import noRelativePackages from './rules/no-relative-packages' |
18 |
| -import noRelativeParentImports from './rules/no-relative-parent-imports' |
19 |
| -import consistentTypeSpecifierStyle from './rules/consistent-type-specifier-style' |
20 |
| -import noSelfImport from './rules/no-self-import' |
21 |
| -import noCycle from './rules/no-cycle' |
22 |
| -import noNamedDefault from './rules/no-named-default' |
23 |
| -import noNamedAsDefault from './rules/no-named-as-default' |
24 |
| -import noNamedAsDefaultMember from './rules/no-named-as-default-member' |
| 20 | +import importsFirst from './rules/imports-first' |
| 21 | +import maxDependencies from './rules/max-dependencies' |
| 22 | +import named from './rules/named' |
| 23 | +import namespace from './rules/namespace' |
| 24 | +import newlineAfterImport from './rules/newline-after-import' |
| 25 | +import noAbsolutePath from './rules/no-absolute-path' |
| 26 | +import noAmd from './rules/no-amd' |
25 | 27 | import noAnonymousDefaultExport from './rules/no-anonymous-default-export'
|
26 |
| -import noUnusedModules from './rules/no-unused-modules' |
27 | 28 | import noCommonjs from './rules/no-commonjs'
|
28 |
| -import noAmd from './rules/no-amd' |
| 29 | +import noCycle from './rules/no-cycle' |
| 30 | +import noDefaultExport from './rules/no-default-export' |
| 31 | +import noDeprecated from './rules/no-deprecated' |
29 | 32 | import noDuplicates from './rules/no-duplicates'
|
30 |
| -import first from './rules/first' |
31 |
| -import maxDependencies from './rules/max-dependencies' |
| 33 | +import noDynamicRequire from './rules/no-dynamic-require' |
| 34 | +import noEmptyNamedBlocks from './rules/no-empty-named-blocks' |
32 | 35 | import noExtraneousDependencies from './rules/no-extraneous-dependencies'
|
33 |
| -import noAbsolutePath from './rules/no-absolute-path' |
| 36 | +import noImportModuleExports from './rules/no-import-module-exports' |
| 37 | +import noInternalModules from './rules/no-internal-modules' |
| 38 | +import noMutableExports from './rules/no-mutable-exports' |
| 39 | +import noNamedAsDefault from './rules/no-named-as-default' |
| 40 | +import noNamedAsDefaultMember from './rules/no-named-as-default-member' |
| 41 | +import noNamedDefault from './rules/no-named-default' |
| 42 | +import noNamedExport from './rules/no-named-export' |
| 43 | +import noNamespace from './rules/no-namespace' |
34 | 44 | import noNodejsModules from './rules/no-nodejs-modules'
|
| 45 | +import noRelativePackages from './rules/no-relative-packages' |
| 46 | +import noRelativeParentImports from './rules/no-relative-parent-imports' |
| 47 | +import noRestrictedPaths from './rules/no-restricted-paths' |
| 48 | +import noSelfImport from './rules/no-self-import' |
| 49 | +import noUnassignedImport from './rules/no-unassigned-import' |
| 50 | +import noUnresolved from './rules/no-unresolved' |
| 51 | +import noUnusedModules from './rules/no-unused-modules' |
| 52 | +import noUselessPathSegments from './rules/no-useless-path-segments' |
35 | 53 | import noWebpackLoaderSyntax from './rules/no-webpack-loader-syntax'
|
36 | 54 | import order from './rules/order'
|
37 |
| -import newlineAfterImport from './rules/newline-after-import' |
38 | 55 | import preferDefaultExport from './rules/prefer-default-export'
|
39 |
| -import noDefaultExport from './rules/no-default-export' |
40 |
| -import noNamedExport from './rules/no-named-export' |
41 |
| -import noDynamicRequire from './rules/no-dynamic-require' |
42 | 56 | import unambiguous from './rules/unambiguous'
|
43 |
| -import noUnassignedImport from './rules/no-unassigned-import' |
44 |
| -import noUselessPathSegments from './rules/no-useless-path-segments' |
45 |
| -import dynamicImportChunkname from './rules/dynamic-import-chunkname' |
46 |
| -import noImportModuleExports from './rules/no-import-module-exports' |
47 |
| -import noEmptyNamedBlocks from './rules/no-empty-named-blocks' |
48 |
| -import exportsLast from './rules/exports-last' |
49 |
| -import noDeprecated from './rules/no-deprecated' |
50 |
| -import importsFirst from './rules/imports-first' |
51 |
| - |
52 | 57 | // configs
|
53 |
| -import recommended from './config/recommended' |
54 |
| -import errors from './config/errors' |
55 |
| -import warnings from './config/warnings' |
56 |
| -import stage0 from './config/stage-0' |
57 |
| -import react from './config/react' |
58 |
| -import reactNative from './config/react-native' |
59 |
| -import electron from './config/electron' |
60 |
| -import typescript from './config/typescript' |
| 58 | +import type { PluginConfig } from './types' |
| 59 | + |
| 60 | +const configs = { |
| 61 | + recommended, |
| 62 | + |
| 63 | + errors, |
| 64 | + warnings, |
| 65 | + |
| 66 | + // shhhh... work in progress "secret" rules |
| 67 | + 'stage-0': stage0, |
| 68 | + |
| 69 | + // useful stuff for folks using various environments |
| 70 | + react, |
| 71 | + 'react-native': reactNative, |
| 72 | + electron, |
| 73 | + typescript, |
| 74 | +} satisfies Record<string, PluginConfig> |
61 | 75 |
|
62 |
| -export const rules = { |
| 76 | +const rules = { |
63 | 77 | 'no-unresolved': noUnresolved,
|
64 | 78 | named,
|
65 | 79 | default: default_,
|
@@ -115,18 +129,7 @@ export const rules = {
|
115 | 129 | 'imports-first': importsFirst,
|
116 | 130 | } satisfies Record<string, TSESLint.RuleModule<string, readonly unknown[]>>
|
117 | 131 |
|
118 |
| -export const configs = { |
119 |
| - recommended, |
120 |
| - |
121 |
| - errors, |
122 |
| - warnings, |
123 |
| - |
124 |
| - // shhhh... work in progress "secret" rules |
125 |
| - 'stage-0': stage0, |
126 |
| - |
127 |
| - // useful stuff for folks using various environments |
128 |
| - react, |
129 |
| - 'react-native': reactNative, |
130 |
| - electron, |
131 |
| - typescript, |
132 |
| -} satisfies Record<string, PluginConfig> |
| 132 | +export = { |
| 133 | + configs, |
| 134 | + rules, |
| 135 | +} |
0 commit comments