@hexadrop/eslint-config 0.1.7 → 0.1.8
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 +8 -2
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -906,6 +906,7 @@ async function imports(options) {
|
|
|
906
906
|
const unusedImportsPrefix = plugin_rename_default["unused-imports"];
|
|
907
907
|
const importSortPrefix = plugin_rename_default["simple-import-sort"];
|
|
908
908
|
const configs = [];
|
|
909
|
+
const javaScriptExtensions = [".js", ".jsx"];
|
|
909
910
|
configs.push({
|
|
910
911
|
name: IMPORTS_CONFIG_NAME_SETUP,
|
|
911
912
|
plugins: {
|
|
@@ -916,6 +917,10 @@ async function imports(options) {
|
|
|
916
917
|
}
|
|
917
918
|
},
|
|
918
919
|
settings: {
|
|
920
|
+
[`${importXPlugin}/parsers`]: {
|
|
921
|
+
"@typescript-eslint/parser": [...javaScriptExtensions],
|
|
922
|
+
"astro-eslint-parser": [".astro"]
|
|
923
|
+
},
|
|
919
924
|
[`${importXPlugin}/resolver`]: {
|
|
920
925
|
node: true
|
|
921
926
|
}
|
|
@@ -923,7 +928,7 @@ async function imports(options) {
|
|
|
923
928
|
});
|
|
924
929
|
if (typescript2) {
|
|
925
930
|
const typeScriptExtensions = [".ts", ".tsx"];
|
|
926
|
-
const allExtensions = [...typeScriptExtensions,
|
|
931
|
+
const allExtensions = [...typeScriptExtensions, ...javaScriptExtensions];
|
|
927
932
|
configs.push({
|
|
928
933
|
files: TYPESCRIPT_GLOBS,
|
|
929
934
|
name: IMPORTS_CONFIG_NAME_SETUP_TYPESCRIPT,
|
|
@@ -931,7 +936,8 @@ async function imports(options) {
|
|
|
931
936
|
[`${importXPlugin}/extensions`]: typeScriptExtensions,
|
|
932
937
|
[`${importXPlugin}/external-module-folders`]: ["node_modules", "node_modules/@types"],
|
|
933
938
|
[`${importXPlugin}/parsers`]: {
|
|
934
|
-
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"]
|
|
939
|
+
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"],
|
|
940
|
+
"astro-eslint-parser": [".astro"]
|
|
935
941
|
},
|
|
936
942
|
[`${importXPlugin}/resolver`]: {
|
|
937
943
|
node: {
|
package/dist/index.js
CHANGED
|
@@ -869,6 +869,7 @@ async function imports(options) {
|
|
|
869
869
|
const unusedImportsPrefix = plugin_rename_default["unused-imports"];
|
|
870
870
|
const importSortPrefix = plugin_rename_default["simple-import-sort"];
|
|
871
871
|
const configs = [];
|
|
872
|
+
const javaScriptExtensions = [".js", ".jsx"];
|
|
872
873
|
configs.push({
|
|
873
874
|
name: IMPORTS_CONFIG_NAME_SETUP,
|
|
874
875
|
plugins: {
|
|
@@ -879,6 +880,10 @@ async function imports(options) {
|
|
|
879
880
|
}
|
|
880
881
|
},
|
|
881
882
|
settings: {
|
|
883
|
+
[`${importXPlugin}/parsers`]: {
|
|
884
|
+
"@typescript-eslint/parser": [...javaScriptExtensions],
|
|
885
|
+
"astro-eslint-parser": [".astro"]
|
|
886
|
+
},
|
|
882
887
|
[`${importXPlugin}/resolver`]: {
|
|
883
888
|
node: true
|
|
884
889
|
}
|
|
@@ -886,7 +891,7 @@ async function imports(options) {
|
|
|
886
891
|
});
|
|
887
892
|
if (typescript2) {
|
|
888
893
|
const typeScriptExtensions = [".ts", ".tsx"];
|
|
889
|
-
const allExtensions = [...typeScriptExtensions,
|
|
894
|
+
const allExtensions = [...typeScriptExtensions, ...javaScriptExtensions];
|
|
890
895
|
configs.push({
|
|
891
896
|
files: TYPESCRIPT_GLOBS,
|
|
892
897
|
name: IMPORTS_CONFIG_NAME_SETUP_TYPESCRIPT,
|
|
@@ -894,7 +899,8 @@ async function imports(options) {
|
|
|
894
899
|
[`${importXPlugin}/extensions`]: typeScriptExtensions,
|
|
895
900
|
[`${importXPlugin}/external-module-folders`]: ["node_modules", "node_modules/@types"],
|
|
896
901
|
[`${importXPlugin}/parsers`]: {
|
|
897
|
-
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"]
|
|
902
|
+
"@typescript-eslint/parser": [...typeScriptExtensions, ".cts", ".mts"],
|
|
903
|
+
"astro-eslint-parser": [".astro"]
|
|
898
904
|
},
|
|
899
905
|
[`${importXPlugin}/resolver`]: {
|
|
900
906
|
node: {
|