@hexadrop/eslint-config 0.1.13 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -12
- package/dist/index.js +6 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -906,42 +906,36 @@ async function imports(options) {
|
|
|
906
906
|
const importXPluginRename = plugin_rename_default[importXPlugin];
|
|
907
907
|
const unusedImportsPrefix = plugin_rename_default["unused-imports"];
|
|
908
908
|
const importSortPrefix = plugin_rename_default["simple-import-sort"];
|
|
909
|
+
const { createNodeResolver, importX } = await import("eslint-plugin-import-x");
|
|
910
|
+
const { createTypeScriptImportResolver } = await import("eslint-import-resolver-typescript");
|
|
909
911
|
const configs = [
|
|
910
912
|
{
|
|
911
913
|
name: IMPORTS_CONFIG_NAME_SETUP,
|
|
912
914
|
plugins: {
|
|
913
|
-
|
|
915
|
+
// @ts-expect-error TS2352: Conversion error
|
|
916
|
+
[importXPluginRename]: importX,
|
|
914
917
|
...stylistic2 && {
|
|
915
918
|
[importSortPrefix]: await interopDefault(import("eslint-plugin-simple-import-sort")),
|
|
916
919
|
[unusedImportsPrefix]: await interopDefault(import("eslint-plugin-unused-imports"))
|
|
917
920
|
}
|
|
918
921
|
},
|
|
919
922
|
settings: {
|
|
920
|
-
[`${importXPlugin}/resolver`]: {
|
|
921
|
-
node: true
|
|
922
|
-
}
|
|
923
|
+
[`${importXPlugin}/resolver-next`]: [createNodeResolver({})]
|
|
923
924
|
}
|
|
924
925
|
}
|
|
925
926
|
];
|
|
926
927
|
if (typescript2) {
|
|
927
928
|
const typeScriptExtensions = [".ts", ".tsx"];
|
|
928
|
-
const allExtensions = [...typeScriptExtensions, ".js", ".jsx"];
|
|
929
929
|
configs.push({
|
|
930
930
|
files: TYPESCRIPT_GLOBS,
|
|
931
931
|
name: IMPORTS_CONFIG_NAME_SETUP_TYPESCRIPT,
|
|
932
932
|
settings: {
|
|
933
933
|
[`${importXPlugin}/extensions`]: typeScriptExtensions,
|
|
934
934
|
[`${importXPlugin}/external-module-folders`]: ["node_modules", "node_modules/@types"],
|
|
935
|
-
[`${importXPlugin}/ignore`]: [/\.astro$/],
|
|
936
935
|
[`${importXPlugin}/parsers`]: {
|
|
937
936
|
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"]
|
|
938
937
|
},
|
|
939
|
-
[`${importXPlugin}/resolver`]:
|
|
940
|
-
node: {
|
|
941
|
-
extensions: allExtensions
|
|
942
|
-
},
|
|
943
|
-
typescript: true
|
|
944
|
-
}
|
|
938
|
+
[`${importXPlugin}/resolver-next`]: [createNodeResolver(), createTypeScriptImportResolver()]
|
|
945
939
|
}
|
|
946
940
|
});
|
|
947
941
|
}
|
package/dist/index.js
CHANGED
|
@@ -869,42 +869,36 @@ async function imports(options) {
|
|
|
869
869
|
const importXPluginRename = plugin_rename_default[importXPlugin];
|
|
870
870
|
const unusedImportsPrefix = plugin_rename_default["unused-imports"];
|
|
871
871
|
const importSortPrefix = plugin_rename_default["simple-import-sort"];
|
|
872
|
+
const { createNodeResolver, importX } = await import("eslint-plugin-import-x");
|
|
873
|
+
const { createTypeScriptImportResolver } = await import("eslint-import-resolver-typescript");
|
|
872
874
|
const configs = [
|
|
873
875
|
{
|
|
874
876
|
name: IMPORTS_CONFIG_NAME_SETUP,
|
|
875
877
|
plugins: {
|
|
876
|
-
|
|
878
|
+
// @ts-expect-error TS2352: Conversion error
|
|
879
|
+
[importXPluginRename]: importX,
|
|
877
880
|
...stylistic2 && {
|
|
878
881
|
[importSortPrefix]: await interopDefault(import("eslint-plugin-simple-import-sort")),
|
|
879
882
|
[unusedImportsPrefix]: await interopDefault(import("eslint-plugin-unused-imports"))
|
|
880
883
|
}
|
|
881
884
|
},
|
|
882
885
|
settings: {
|
|
883
|
-
[`${importXPlugin}/resolver`]: {
|
|
884
|
-
node: true
|
|
885
|
-
}
|
|
886
|
+
[`${importXPlugin}/resolver-next`]: [createNodeResolver({})]
|
|
886
887
|
}
|
|
887
888
|
}
|
|
888
889
|
];
|
|
889
890
|
if (typescript2) {
|
|
890
891
|
const typeScriptExtensions = [".ts", ".tsx"];
|
|
891
|
-
const allExtensions = [...typeScriptExtensions, ".js", ".jsx"];
|
|
892
892
|
configs.push({
|
|
893
893
|
files: TYPESCRIPT_GLOBS,
|
|
894
894
|
name: IMPORTS_CONFIG_NAME_SETUP_TYPESCRIPT,
|
|
895
895
|
settings: {
|
|
896
896
|
[`${importXPlugin}/extensions`]: typeScriptExtensions,
|
|
897
897
|
[`${importXPlugin}/external-module-folders`]: ["node_modules", "node_modules/@types"],
|
|
898
|
-
[`${importXPlugin}/ignore`]: [/\.astro$/],
|
|
899
898
|
[`${importXPlugin}/parsers`]: {
|
|
900
899
|
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"]
|
|
901
900
|
},
|
|
902
|
-
[`${importXPlugin}/resolver`]:
|
|
903
|
-
node: {
|
|
904
|
-
extensions: allExtensions
|
|
905
|
-
},
|
|
906
|
-
typescript: true
|
|
907
|
-
}
|
|
901
|
+
[`${importXPlugin}/resolver-next`]: [createNodeResolver(), createTypeScriptImportResolver()]
|
|
908
902
|
}
|
|
909
903
|
});
|
|
910
904
|
}
|