@hexadrop/eslint-config 0.0.1-beta.1 → 0.0.1-beta.10
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 +36 -4
- package/dist/index.d.cts +271 -302
- package/dist/index.d.ts +271 -302
- package/dist/index.js +36 -4
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -844,7 +844,9 @@ var IMPORTS_CONFIG_NAME_RULES_TYPESCRIPT = `${IMPORTS_CONFIG_NAME_RULES}/typescr
|
|
|
844
844
|
var IMPORTS_CONFIG_NAME_RULES_STATIC = `${IMPORTS_CONFIG_NAME_RULES}/static`;
|
|
845
845
|
var IMPORTS_CONFIG_NAME_RULES_STATIC_MARKDOWN_SOURCE = `${IMPORTS_CONFIG_NAME_RULES_STATIC}/markdown/source`;
|
|
846
846
|
var IMPORTS_CONFIG_NAME_RULES_STYLISTIC = `${IMPORTS_CONFIG_NAME_RULES}/stylistic`;
|
|
847
|
-
var
|
|
847
|
+
var IMPORTS_CONFIG_NAME_RULES_STYLISTIC_ASTRO = `${IMPORTS_CONFIG_NAME_RULES_STYLISTIC}/astro`;
|
|
848
|
+
var IMPORTS_CONFIG_NAME_RULES_STYLISTIC_TYPESCRIPT_DTS = `${IMPORTS_CONFIG_NAME_RULES_STYLISTIC}/typescript/dts`;
|
|
849
|
+
var IMPORTS_CONFIG_NAME_RULES_STYLISTIC_MARKDOWN_SOURCE = `${IMPORTS_CONFIG_NAME_RULES_STYLISTIC}/markdown/source`;
|
|
848
850
|
|
|
849
851
|
// src/config/imports/imports.config.ts
|
|
850
852
|
async function imports(options) {
|
|
@@ -1020,6 +1022,15 @@ async function imports(options) {
|
|
|
1020
1022
|
]
|
|
1021
1023
|
}
|
|
1022
1024
|
});
|
|
1025
|
+
if (typescript2) {
|
|
1026
|
+
configs.push({
|
|
1027
|
+
files: DTS_GLOBS,
|
|
1028
|
+
name: IMPORTS_CONFIG_NAME_RULES_STYLISTIC_TYPESCRIPT_DTS,
|
|
1029
|
+
rules: {
|
|
1030
|
+
[`${importXPluginRename}/prefer-default-export`]: "off"
|
|
1031
|
+
}
|
|
1032
|
+
});
|
|
1033
|
+
}
|
|
1023
1034
|
if (markdown2) {
|
|
1024
1035
|
configs.push({
|
|
1025
1036
|
files: GLOB_MARKDOWN_SOURCE,
|
|
@@ -1029,6 +1040,16 @@ async function imports(options) {
|
|
|
1029
1040
|
}
|
|
1030
1041
|
});
|
|
1031
1042
|
}
|
|
1043
|
+
if (astro2) {
|
|
1044
|
+
configs.push({
|
|
1045
|
+
files: GLOB_ASTRO,
|
|
1046
|
+
name: IMPORTS_CONFIG_NAME_RULES_STYLISTIC_ASTRO,
|
|
1047
|
+
rules: {
|
|
1048
|
+
[`${importXPluginRename}/exports-last`]: ["off"],
|
|
1049
|
+
[`${importXPluginRename}/prefer-default-export`]: ["off"]
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1032
1053
|
}
|
|
1033
1054
|
return configs;
|
|
1034
1055
|
}
|
|
@@ -1264,6 +1285,7 @@ async function stylistic(options) {
|
|
|
1264
1285
|
[`${stylisticPluginRename}/line-comment-position`]: ["error", { position: "above" }],
|
|
1265
1286
|
[`${stylisticPluginRename}/max-len`]: "off",
|
|
1266
1287
|
[`${stylisticPluginRename}/multiline-comment-style`]: ["error", "starred-block"],
|
|
1288
|
+
[`${stylisticPluginRename}/multiline-ternary`]: "off",
|
|
1267
1289
|
[`${stylisticPluginRename}/no-extra-semi`]: "error",
|
|
1268
1290
|
[`${stylisticPluginRename}/padding-line-between-statements`]: [
|
|
1269
1291
|
"error",
|
|
@@ -1845,13 +1867,19 @@ function defaultOptions(options = {}) {
|
|
|
1845
1867
|
} else if (installedTypescript) {
|
|
1846
1868
|
if (options.typescript === void 0) {
|
|
1847
1869
|
typescript2 = getCwdTsconfigPath() ?? true;
|
|
1848
|
-
} else if (options.typescript === "string"
|
|
1870
|
+
} else if (options.typescript === "string") {
|
|
1849
1871
|
typescript2 = options.typescript.length > 0 ? options.typescript : true;
|
|
1872
|
+
} else if (Array.isArray(options.typescript)) {
|
|
1873
|
+
typescript2 = options.typescript.length > 0 ? options.typescript.filter(Boolean) : true;
|
|
1850
1874
|
}
|
|
1851
1875
|
}
|
|
1852
1876
|
return {
|
|
1853
1877
|
astro: options.astro ?? installedAstro,
|
|
1854
|
-
ignore: options.ignore
|
|
1878
|
+
ignore: typeof options.ignore === "object" ? {
|
|
1879
|
+
...options.ignore,
|
|
1880
|
+
files: typeof options.ignore.files === "string" ? options.ignore.files : options.ignore.files?.filter(Boolean) ?? [],
|
|
1881
|
+
globs: options.ignore.globs?.filter(Boolean) ?? []
|
|
1882
|
+
} : options.ignore ?? true,
|
|
1855
1883
|
imports: options.imports ?? true,
|
|
1856
1884
|
json: options.json ?? true,
|
|
1857
1885
|
markdown: options.markdown ?? true,
|
|
@@ -1861,7 +1889,11 @@ function defaultOptions(options = {}) {
|
|
|
1861
1889
|
node: true,
|
|
1862
1890
|
webpack: false,
|
|
1863
1891
|
...options.module,
|
|
1864
|
-
ignore: [
|
|
1892
|
+
ignore: [
|
|
1893
|
+
String.raw`bun\:.*`,
|
|
1894
|
+
String.raw`astro\:.*`,
|
|
1895
|
+
...options.module?.ignore?.filter(Boolean) ?? []
|
|
1896
|
+
]
|
|
1865
1897
|
},
|
|
1866
1898
|
node: options.node ?? true,
|
|
1867
1899
|
react: options.react ?? installedReact,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hexadrop/eslint-config",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.10",
|
|
4
4
|
"description": "Opinionated ESLint ruleset designed for large teams and projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@eslint/compat": "1.0.1",
|
|
46
46
|
"@stylistic/eslint-plugin": "2.1.0",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
48
|
-
"@typescript-eslint/parser": "7.
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "7.11.0",
|
|
48
|
+
"@typescript-eslint/parser": "7.11.0",
|
|
49
49
|
"astro-eslint-parser": "1.0.2",
|
|
50
50
|
"eslint-config-flat-gitignore": "0.1.5",
|
|
51
51
|
"eslint-flat-config-utils": "0.2.5",
|
|
@@ -54,30 +54,30 @@
|
|
|
54
54
|
"eslint-parser-plain": "0.1.0",
|
|
55
55
|
"eslint-plugin-astro": "1.2.0",
|
|
56
56
|
"eslint-plugin-format": "0.1.1",
|
|
57
|
-
"eslint-plugin-import-x": "0.5.
|
|
58
|
-
"eslint-plugin-jsonc": "2.
|
|
57
|
+
"eslint-plugin-import-x": "0.5.1",
|
|
58
|
+
"eslint-plugin-jsonc": "2.16.0",
|
|
59
59
|
"eslint-plugin-markdown": "5.0.0",
|
|
60
60
|
"eslint-plugin-n": "17.7.0",
|
|
61
61
|
"eslint-plugin-perfectionist": "2.10.0",
|
|
62
|
-
"eslint-plugin-react": "7.34.
|
|
62
|
+
"eslint-plugin-react": "7.34.2",
|
|
63
63
|
"eslint-plugin-react-hooks": "4.6.2",
|
|
64
64
|
"eslint-plugin-react-refresh": "0.4.7",
|
|
65
65
|
"eslint-plugin-simple-import-sort": "12.1.0",
|
|
66
66
|
"eslint-plugin-unicorn": "53.0.0",
|
|
67
|
-
"eslint-plugin-unused-imports": "
|
|
67
|
+
"eslint-plugin-unused-imports": "4.0.0",
|
|
68
68
|
"globals": "15.3.0",
|
|
69
69
|
"jsonc-eslint-parser": "2.4.0",
|
|
70
70
|
"local-pkg": "0.5.0",
|
|
71
|
-
"prettier-plugin-astro": "0.
|
|
71
|
+
"prettier-plugin-astro": "0.14.0",
|
|
72
72
|
"tslib": "2.6.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@changesets/cli": "2.27.
|
|
75
|
+
"@changesets/cli": "2.27.5",
|
|
76
76
|
"@eslint/config-inspector": "0.4.8",
|
|
77
|
-
"@hexadrop/tsconfig": "0.0.
|
|
77
|
+
"@hexadrop/tsconfig": "0.0.4",
|
|
78
78
|
"@types/bun": "1.1.3",
|
|
79
79
|
"@types/eslint": "8.56.10",
|
|
80
|
-
"astro": "4.
|
|
80
|
+
"astro": "4.9.2",
|
|
81
81
|
"eslint": "9.3.0",
|
|
82
82
|
"eslint-typegen": "0.2.4",
|
|
83
83
|
"esno": "4.7.0",
|