@eienjs/eslint-config 0.3.0 → 0.4.1
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/cli/index.js +8 -2
- package/dist/configs/index.d.ts +5 -2
- package/dist/configs/index.js +2 -2
- package/dist/{configs-BA3UU5JJ.js → configs-DWV1I5t-.js} +314 -172
- package/dist/index.d.ts +3 -2
- package/dist/index.js +8 -3
- package/dist/{types-B-BVuwa4.d.ts → types-Dox_r0zd.d.ts} +86 -2
- package/package.json +8 -3
package/dist/cli/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import parse from "parse-gitignore";
|
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "0.
|
|
12
|
+
var version = "0.4.1";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/cli/constants.ts
|
|
@@ -60,6 +60,10 @@ const frameworkOptions = [
|
|
|
60
60
|
{
|
|
61
61
|
label: c.blueBright("AdonisJS"),
|
|
62
62
|
value: "adonisjs"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: c.greenBright("Nuxt"),
|
|
66
|
+
value: "nuxt"
|
|
63
67
|
}
|
|
64
68
|
];
|
|
65
69
|
const frameworks = frameworkOptions.map(({ value }) => value);
|
|
@@ -74,7 +78,8 @@ const dependenciesMap = {
|
|
|
74
78
|
formatter: ["eslint-plugin-format"],
|
|
75
79
|
formatterAstro: ["prettier-plugin-astro"],
|
|
76
80
|
vue: [],
|
|
77
|
-
adonisjs: ["@adonisjs/eslint-plugin"]
|
|
81
|
+
adonisjs: ["@adonisjs/eslint-plugin"],
|
|
82
|
+
nuxt: ["@nuxt/eslint-plugin"]
|
|
78
83
|
};
|
|
79
84
|
|
|
80
85
|
//#endregion
|
|
@@ -134,6 +139,7 @@ async function updateEslintFiles(result) {
|
|
|
134
139
|
//#region src/cli/constants_generated.ts
|
|
135
140
|
const versionsMap = {
|
|
136
141
|
"@adonisjs/eslint-plugin": "^2.0.0",
|
|
142
|
+
"@nuxt/eslint-plugin": "^1.7.1",
|
|
137
143
|
"astro-eslint-parser": "^1.2.2",
|
|
138
144
|
"eslint": "^9.32.0",
|
|
139
145
|
"eslint-plugin-astro": "^1.3.1",
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-
|
|
1
|
+
import { OptionsAdonisJS, OptionsComponentExts, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsVue, StylisticConfig, TypedFlatConfigItem } from "../types-Dox_r0zd.js";
|
|
2
2
|
|
|
3
3
|
//#region src/configs/adonisjs.d.ts
|
|
4
4
|
declare function adonisjs(options?: OptionsAdonisJS): Promise<TypedFlatConfigItem[]>;
|
|
@@ -39,6 +39,9 @@ declare function markdown(options?: OptionsFiles & OptionsComponentExts & Option
|
|
|
39
39
|
//#region src/configs/node.d.ts
|
|
40
40
|
declare function node(): Promise<TypedFlatConfigItem[]>;
|
|
41
41
|
//#endregion
|
|
42
|
+
//#region src/configs/nuxt.d.ts
|
|
43
|
+
declare function nuxt(options?: OptionsNuxt & OptionsStylistic): Promise<TypedFlatConfigItem[]>;
|
|
44
|
+
//#endregion
|
|
42
45
|
//#region src/configs/perfectionist.d.ts
|
|
43
46
|
/**
|
|
44
47
|
* Perfectionist plugin for props and items sorting.
|
|
@@ -90,4 +93,4 @@ declare function vue(options?: OptionsVue & OptionsHasTypeScript & OptionsOverri
|
|
|
90
93
|
//#region src/configs/yaml.d.ts
|
|
91
94
|
declare function yaml(options?: OptionsOverrides & OptionsStylistic & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
92
95
|
//#endregion
|
|
93
|
-
export { StylisticConfigDefaults, StylisticOptions, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
|
|
96
|
+
export { StylisticConfigDefaults, StylisticOptions, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
|
package/dist/configs/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml } from "../configs-
|
|
1
|
+
import { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml } from "../configs-DWV1I5t-.js";
|
|
2
2
|
|
|
3
|
-
export { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
|
|
3
|
+
export { StylisticConfigDefaults, adonisjs, astro, command, comments, disables, formatters, ignores, imports, javascript, jsdoc, jsonc, markdown, node, nuxt, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toml, typescript, unicorn, vue, yaml };
|
|
@@ -39,6 +39,7 @@ const GLOB_SVG = "**/*.svg";
|
|
|
39
39
|
const GLOB_HTML = "**/*.htm?(l)";
|
|
40
40
|
const GLOB_ASTRO = "**/*.astro";
|
|
41
41
|
const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
42
|
+
const GLOB_EXTS = "{js,ts,jsx,tsx,vue}";
|
|
42
43
|
const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
|
|
43
44
|
const GLOB_TESTS = [
|
|
44
45
|
`**/__tests__/**/*.${GLOB_SRC_EXT}`,
|
|
@@ -1073,7 +1074,6 @@ async function markdown(options = {}) {
|
|
|
1073
1074
|
"@typescript-eslint/no-use-before-define": "off",
|
|
1074
1075
|
"unused-imports/no-unused-imports": "off",
|
|
1075
1076
|
"unused-imports/no-unused-vars": "off",
|
|
1076
|
-
"unicorn/filename-case": "off",
|
|
1077
1077
|
...overrides
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
@@ -1099,6 +1099,138 @@ async function node() {
|
|
|
1099
1099
|
}];
|
|
1100
1100
|
}
|
|
1101
1101
|
|
|
1102
|
+
//#endregion
|
|
1103
|
+
//#region src/configs/nuxt.ts
|
|
1104
|
+
async function nuxt(options = {}) {
|
|
1105
|
+
const { overrides = {}, dirs = {}, version = 4, stylistic: stylistic$1 = true } = options;
|
|
1106
|
+
const { sortConfigKeys = Boolean(stylistic$1) } = options;
|
|
1107
|
+
await ensurePackages(["@nuxt/eslint-plugin"]);
|
|
1108
|
+
const pluginNuxt = await interopDefault(import("@nuxt/eslint-plugin"));
|
|
1109
|
+
dirs.root = dirs.root ?? [version === 4 ? "./app" : "."];
|
|
1110
|
+
dirs.src = dirs.src ?? dirs.root;
|
|
1111
|
+
dirs.pages = dirs.pages ?? dirs.src.map((src) => `${src}/pages`);
|
|
1112
|
+
dirs.layouts = dirs.layouts ?? dirs.src.map((src) => `${src}/layouts`);
|
|
1113
|
+
dirs.components = dirs.components ?? dirs.src.map((src) => `${src}/components`);
|
|
1114
|
+
dirs.composables = dirs.composables ?? dirs.src.map((src) => `${src}/composables`);
|
|
1115
|
+
dirs.plugins = dirs.plugins ?? dirs.src.map((src) => `${src}/plugins`);
|
|
1116
|
+
dirs.modules = dirs.modules ?? dirs.src.map((src) => `${src}/modules`);
|
|
1117
|
+
dirs.middleware = dirs.middleware ?? dirs.src.map((src) => `${src}/middleware`);
|
|
1118
|
+
dirs.servers = dirs.servers ?? dirs.src.map((src) => `${src}/servers`);
|
|
1119
|
+
dirs.utils = dirs.utils ?? dirs.src.map((src) => `${src}/utils`);
|
|
1120
|
+
dirs.componentsPrefixed = dirs.componentsPrefixed ?? [];
|
|
1121
|
+
const fileSingleRoot = [
|
|
1122
|
+
...dirs.layouts?.map((layoutsDir) => join(layoutsDir, `**/*.${GLOB_EXTS}`)) || [],
|
|
1123
|
+
...dirs.pages?.map((pagesDir) => join(pagesDir, `**/*.${GLOB_EXTS}`)) || [],
|
|
1124
|
+
...dirs.components?.map((componentsDir) => join(componentsDir, `**/*.server.${GLOB_EXTS}`)) || []
|
|
1125
|
+
].sort();
|
|
1126
|
+
const INLINE_ELEMENTS = [
|
|
1127
|
+
"a",
|
|
1128
|
+
"abbr",
|
|
1129
|
+
"audio",
|
|
1130
|
+
"b",
|
|
1131
|
+
"bdi",
|
|
1132
|
+
"bdo",
|
|
1133
|
+
"canvas",
|
|
1134
|
+
"cite",
|
|
1135
|
+
"code",
|
|
1136
|
+
"data",
|
|
1137
|
+
"del",
|
|
1138
|
+
"dfn",
|
|
1139
|
+
"em",
|
|
1140
|
+
"i",
|
|
1141
|
+
"iframe",
|
|
1142
|
+
"ins",
|
|
1143
|
+
"kbd",
|
|
1144
|
+
"label",
|
|
1145
|
+
"map",
|
|
1146
|
+
"mark",
|
|
1147
|
+
"noscript",
|
|
1148
|
+
"object",
|
|
1149
|
+
"output",
|
|
1150
|
+
"picture",
|
|
1151
|
+
"q",
|
|
1152
|
+
"ruby",
|
|
1153
|
+
"s",
|
|
1154
|
+
"samp",
|
|
1155
|
+
"small",
|
|
1156
|
+
"span",
|
|
1157
|
+
"strong",
|
|
1158
|
+
"sub",
|
|
1159
|
+
"sup",
|
|
1160
|
+
"svg",
|
|
1161
|
+
"time",
|
|
1162
|
+
"u",
|
|
1163
|
+
"var",
|
|
1164
|
+
"video"
|
|
1165
|
+
];
|
|
1166
|
+
return [
|
|
1167
|
+
{
|
|
1168
|
+
name: "eienjs/nuxt/setup",
|
|
1169
|
+
plugins: { nuxt: pluginNuxt },
|
|
1170
|
+
languageOptions: { globals: { $fetch: "readonly" } }
|
|
1171
|
+
},
|
|
1172
|
+
...fileSingleRoot.length > 0 ? [{
|
|
1173
|
+
files: fileSingleRoot,
|
|
1174
|
+
name: "eienjs/nuxt/vue/single-root",
|
|
1175
|
+
rules: { "vue/no-multiple-template-root": "error" }
|
|
1176
|
+
}] : [],
|
|
1177
|
+
{
|
|
1178
|
+
name: "eienjs/nuxt/rules",
|
|
1179
|
+
rules: {
|
|
1180
|
+
"nuxt/prefer-import-meta": "error",
|
|
1181
|
+
...overrides
|
|
1182
|
+
}
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
files: dirs.utils.map((utilsDir) => join(utilsDir, GLOB_SRC)),
|
|
1186
|
+
name: "eienjs/nuxt/utils-disables",
|
|
1187
|
+
rules: { "@typescript-eslint/explicit-module-boundary-types": "off" }
|
|
1188
|
+
},
|
|
1189
|
+
...sortConfigKeys ? [{
|
|
1190
|
+
files: ["**/nuxt.config.?([cm])[jt]s?(x)"],
|
|
1191
|
+
name: "eienjs/nuxt/sort-config",
|
|
1192
|
+
rules: { "nuxt/nuxt-config-keys-order": "error" }
|
|
1193
|
+
}] : [],
|
|
1194
|
+
...stylistic$1 ? [{
|
|
1195
|
+
files: [GLOB_VUE],
|
|
1196
|
+
name: "eienjs/nuxt/vue/rules",
|
|
1197
|
+
rules: {
|
|
1198
|
+
"vue/multiline-html-element-content-newline": ["error", {
|
|
1199
|
+
ignoreWhenEmpty: true,
|
|
1200
|
+
ignores: [
|
|
1201
|
+
"pre",
|
|
1202
|
+
"textarea",
|
|
1203
|
+
"router-link",
|
|
1204
|
+
"RouterLink",
|
|
1205
|
+
"nuxt-link",
|
|
1206
|
+
"NuxtLink",
|
|
1207
|
+
"u-link",
|
|
1208
|
+
"ULink",
|
|
1209
|
+
...INLINE_ELEMENTS
|
|
1210
|
+
],
|
|
1211
|
+
allowEmptyLines: false
|
|
1212
|
+
}],
|
|
1213
|
+
"vue/singleline-html-element-content-newline": ["error", {
|
|
1214
|
+
ignoreWhenNoAttributes: true,
|
|
1215
|
+
ignoreWhenEmpty: true,
|
|
1216
|
+
ignores: [
|
|
1217
|
+
"pre",
|
|
1218
|
+
"textarea",
|
|
1219
|
+
"router-link",
|
|
1220
|
+
"RouterLink",
|
|
1221
|
+
"nuxt-link",
|
|
1222
|
+
"NuxtLink",
|
|
1223
|
+
"u-link",
|
|
1224
|
+
"ULink",
|
|
1225
|
+
...INLINE_ELEMENTS
|
|
1226
|
+
],
|
|
1227
|
+
externalIgnores: []
|
|
1228
|
+
}]
|
|
1229
|
+
}
|
|
1230
|
+
}] : []
|
|
1231
|
+
];
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1102
1234
|
//#endregion
|
|
1103
1235
|
//#region src/configs/perfectionist.ts
|
|
1104
1236
|
/**
|
|
@@ -1706,7 +1838,6 @@ async function unicorn(options = {}) {
|
|
|
1706
1838
|
"unicorn/no-this-assignment": "off",
|
|
1707
1839
|
"unicorn/consistent-destructuring": "error",
|
|
1708
1840
|
"unicorn/consistent-function-scoping": ["error", { checkArrowFunctions: false }],
|
|
1709
|
-
"unicorn/filename-case": ["error", { case: "snakeCase" }],
|
|
1710
1841
|
"unicorn/no-null": "off",
|
|
1711
1842
|
"unicorn/no-static-only-class": "off",
|
|
1712
1843
|
"unicorn/numeric-separators-style": "off",
|
|
@@ -1723,8 +1854,13 @@ async function unicorn(options = {}) {
|
|
|
1723
1854
|
"unicorn/no-array-reduce": "off",
|
|
1724
1855
|
"unicorn/prefer-export-from": "off",
|
|
1725
1856
|
"unicorn/prefer-top-level-await": "off",
|
|
1857
|
+
"unicorn/filename-case": "off",
|
|
1726
1858
|
...overrides
|
|
1727
1859
|
}
|
|
1860
|
+
}, {
|
|
1861
|
+
files: [GLOB_SRC],
|
|
1862
|
+
name: "eienjs/unicorn/special-rules",
|
|
1863
|
+
rules: { "unicorn/filename-case": ["error", { case: "snakeCase" }] }
|
|
1728
1864
|
}];
|
|
1729
1865
|
}
|
|
1730
1866
|
|
|
@@ -1739,183 +1875,190 @@ async function vue(options = {}) {
|
|
|
1739
1875
|
interopDefault(import("vue-eslint-parser")),
|
|
1740
1876
|
interopDefault(import("eslint-processor-vue-blocks"))
|
|
1741
1877
|
]);
|
|
1742
|
-
return [
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
files,
|
|
1763
|
-
languageOptions: {
|
|
1764
|
-
parser: parserVue,
|
|
1765
|
-
parserOptions: {
|
|
1766
|
-
ecmaFeatures: { jsx: true },
|
|
1767
|
-
extraFileExtensions: [".vue"],
|
|
1768
|
-
parser: typescript$1 ? await interopDefault(import("@typescript-eslint/parser")) : null,
|
|
1769
|
-
sourceType: "module"
|
|
1770
|
-
}
|
|
1878
|
+
return [
|
|
1879
|
+
{
|
|
1880
|
+
languageOptions: { globals: {
|
|
1881
|
+
computed: "readonly",
|
|
1882
|
+
defineEmits: "readonly",
|
|
1883
|
+
defineExpose: "readonly",
|
|
1884
|
+
defineProps: "readonly",
|
|
1885
|
+
onMounted: "readonly",
|
|
1886
|
+
onUnmounted: "readonly",
|
|
1887
|
+
reactive: "readonly",
|
|
1888
|
+
ref: "readonly",
|
|
1889
|
+
shallowReactive: "readonly",
|
|
1890
|
+
shallowRef: "readonly",
|
|
1891
|
+
toRef: "readonly",
|
|
1892
|
+
toRefs: "readonly",
|
|
1893
|
+
watch: "readonly",
|
|
1894
|
+
watchEffect: "readonly"
|
|
1895
|
+
} },
|
|
1896
|
+
name: "eienjs/vue/setup",
|
|
1897
|
+
plugins: { vue: pluginVue }
|
|
1771
1898
|
},
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
...pluginVue.configs.base.rules,
|
|
1782
|
-
...pluginVue.configs["flat/essential"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1783
|
-
...acc,
|
|
1784
|
-
...c
|
|
1785
|
-
}), {}),
|
|
1786
|
-
...pluginVue.configs["flat/strongly-recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1787
|
-
...acc,
|
|
1788
|
-
...c
|
|
1789
|
-
}), {}),
|
|
1790
|
-
...pluginVue.configs["flat/recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1791
|
-
...acc,
|
|
1792
|
-
...c
|
|
1793
|
-
}), {}),
|
|
1794
|
-
"vue/block-lang": ["error", { script: { lang: "ts" } }],
|
|
1795
|
-
"vue/block-order": ["error", { order: [
|
|
1796
|
-
"script",
|
|
1797
|
-
"template",
|
|
1798
|
-
"style"
|
|
1799
|
-
] }],
|
|
1800
|
-
"vue/component-api-style": ["error", ["script-setup"]],
|
|
1801
|
-
"vue/component-name-in-template-casing": [
|
|
1802
|
-
"error",
|
|
1803
|
-
"PascalCase",
|
|
1804
|
-
{ registeredComponentsOnly: true }
|
|
1805
|
-
],
|
|
1806
|
-
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
1807
|
-
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
1808
|
-
"vue/define-macros-order": ["error", { order: [
|
|
1809
|
-
"defineOptions",
|
|
1810
|
-
"defineProps",
|
|
1811
|
-
"defineEmits",
|
|
1812
|
-
"defineSlots"
|
|
1813
|
-
] }],
|
|
1814
|
-
"vue/define-props-declaration": ["error", "runtime"],
|
|
1815
|
-
"vue/dot-location": ["error", "property"],
|
|
1816
|
-
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
1817
|
-
"vue/eqeqeq": ["error", "smart"],
|
|
1818
|
-
"vue/html-indent": ["error", indent],
|
|
1819
|
-
"vue/html-quotes": ["error", "double"],
|
|
1820
|
-
"vue/max-attributes-per-line": "off",
|
|
1821
|
-
"vue/multi-word-component-names": "off",
|
|
1822
|
-
"vue/no-dupe-keys": "off",
|
|
1823
|
-
"vue/no-empty-component-block": "error",
|
|
1824
|
-
"vue/no-empty-pattern": "error",
|
|
1825
|
-
"vue/no-irregular-whitespace": "error",
|
|
1826
|
-
"vue/no-loss-of-precision": "error",
|
|
1827
|
-
"vue/no-multiple-objects-in-class": "error",
|
|
1828
|
-
"vue/no-ref-object-reactivity-loss": "error",
|
|
1829
|
-
"vue/no-required-prop-with-default": "error",
|
|
1830
|
-
"vue/no-restricted-syntax": [
|
|
1831
|
-
"error",
|
|
1832
|
-
"DebuggerStatement",
|
|
1833
|
-
"LabeledStatement",
|
|
1834
|
-
"WithStatement"
|
|
1835
|
-
],
|
|
1836
|
-
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
1837
|
-
"vue/no-root-v-if": "error",
|
|
1838
|
-
"vue/no-setup-props-reactivity-loss": "off",
|
|
1839
|
-
"vue/no-sparse-arrays": "error",
|
|
1840
|
-
"vue/no-template-target-blank": "error",
|
|
1841
|
-
"vue/no-unused-properties": "error",
|
|
1842
|
-
"vue/no-unused-refs": "error",
|
|
1843
|
-
"vue/no-use-v-else-with-v-for": "error",
|
|
1844
|
-
"vue/no-useless-mustaches": "error",
|
|
1845
|
-
"vue/no-useless-v-bind": "error",
|
|
1846
|
-
"vue/no-v-html": "off",
|
|
1847
|
-
"vue/object-shorthand": [
|
|
1848
|
-
"error",
|
|
1849
|
-
"always",
|
|
1850
|
-
{
|
|
1851
|
-
avoidQuotes: true,
|
|
1852
|
-
ignoreConstructors: false
|
|
1899
|
+
{
|
|
1900
|
+
files,
|
|
1901
|
+
languageOptions: {
|
|
1902
|
+
parser: parserVue,
|
|
1903
|
+
parserOptions: {
|
|
1904
|
+
ecmaFeatures: { jsx: true },
|
|
1905
|
+
extraFileExtensions: [".vue"],
|
|
1906
|
+
parser: typescript$1 ? await interopDefault(import("@typescript-eslint/parser")) : null,
|
|
1907
|
+
sourceType: "module"
|
|
1853
1908
|
}
|
|
1854
|
-
|
|
1855
|
-
"vue/
|
|
1856
|
-
"vue
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
"
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
}
|
|
1877
|
-
"vue/
|
|
1909
|
+
},
|
|
1910
|
+
name: "eienjs/vue/rules",
|
|
1911
|
+
processor: sfcBlocks === false ? pluginVue.processors[".vue"] : mergeProcessors([pluginVue.processors[".vue"], processorVueBlocks({
|
|
1912
|
+
...sfcBlocks,
|
|
1913
|
+
blocks: {
|
|
1914
|
+
styles: true,
|
|
1915
|
+
...sfcBlocks.blocks
|
|
1916
|
+
}
|
|
1917
|
+
})]),
|
|
1918
|
+
rules: {
|
|
1919
|
+
...pluginVue.configs.base.rules,
|
|
1920
|
+
...pluginVue.configs["flat/essential"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1921
|
+
...acc,
|
|
1922
|
+
...c
|
|
1923
|
+
}), {}),
|
|
1924
|
+
...pluginVue.configs["flat/strongly-recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1925
|
+
...acc,
|
|
1926
|
+
...c
|
|
1927
|
+
}), {}),
|
|
1928
|
+
...pluginVue.configs["flat/recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
1929
|
+
...acc,
|
|
1930
|
+
...c
|
|
1931
|
+
}), {}),
|
|
1932
|
+
"vue/block-lang": ["error", { script: { lang: "ts" } }],
|
|
1933
|
+
"vue/block-order": ["error", { order: [
|
|
1934
|
+
"script",
|
|
1935
|
+
"template",
|
|
1936
|
+
"style"
|
|
1937
|
+
] }],
|
|
1938
|
+
"vue/component-api-style": ["error", ["script-setup"]],
|
|
1939
|
+
"vue/component-name-in-template-casing": [
|
|
1878
1940
|
"error",
|
|
1879
|
-
"
|
|
1880
|
-
{
|
|
1941
|
+
"PascalCase",
|
|
1942
|
+
{ registeredComponentsOnly: true }
|
|
1881
1943
|
],
|
|
1882
|
-
"vue/
|
|
1883
|
-
"vue/
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1944
|
+
"vue/component-options-name-casing": ["error", "PascalCase"],
|
|
1945
|
+
"vue/custom-event-name-casing": ["error", "camelCase"],
|
|
1946
|
+
"vue/define-macros-order": ["error", { order: [
|
|
1947
|
+
"defineOptions",
|
|
1948
|
+
"defineProps",
|
|
1949
|
+
"defineEmits",
|
|
1950
|
+
"defineSlots"
|
|
1951
|
+
] }],
|
|
1952
|
+
"vue/define-props-declaration": ["error", "runtime"],
|
|
1953
|
+
"vue/dot-location": ["error", "property"],
|
|
1954
|
+
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
1955
|
+
"vue/eqeqeq": ["error", "smart"],
|
|
1956
|
+
"vue/html-indent": ["error", indent],
|
|
1957
|
+
"vue/html-quotes": ["error", "double"],
|
|
1958
|
+
"vue/max-attributes-per-line": "off",
|
|
1959
|
+
"vue/multi-word-component-names": "off",
|
|
1960
|
+
"vue/no-dupe-keys": "off",
|
|
1961
|
+
"vue/no-empty-component-block": "error",
|
|
1962
|
+
"vue/no-empty-pattern": "error",
|
|
1963
|
+
"vue/no-irregular-whitespace": "error",
|
|
1964
|
+
"vue/no-loss-of-precision": "error",
|
|
1965
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
1966
|
+
"vue/no-ref-object-reactivity-loss": "error",
|
|
1967
|
+
"vue/no-required-prop-with-default": "error",
|
|
1968
|
+
"vue/no-restricted-syntax": [
|
|
1969
|
+
"error",
|
|
1970
|
+
"DebuggerStatement",
|
|
1971
|
+
"LabeledStatement",
|
|
1972
|
+
"WithStatement"
|
|
1973
|
+
],
|
|
1974
|
+
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
1975
|
+
"vue/no-root-v-if": "error",
|
|
1976
|
+
"vue/no-setup-props-reactivity-loss": "off",
|
|
1977
|
+
"vue/no-sparse-arrays": "error",
|
|
1978
|
+
"vue/no-template-target-blank": "error",
|
|
1979
|
+
"vue/no-unused-properties": "error",
|
|
1980
|
+
"vue/no-unused-refs": "error",
|
|
1981
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
1982
|
+
"vue/no-useless-mustaches": "error",
|
|
1983
|
+
"vue/no-useless-v-bind": "error",
|
|
1984
|
+
"vue/no-v-html": "off",
|
|
1985
|
+
"vue/object-shorthand": [
|
|
1889
1986
|
"error",
|
|
1890
1987
|
"always",
|
|
1891
|
-
{
|
|
1988
|
+
{
|
|
1989
|
+
avoidQuotes: true,
|
|
1990
|
+
ignoreConstructors: false
|
|
1991
|
+
}
|
|
1892
1992
|
],
|
|
1893
|
-
"vue/
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
"vue/
|
|
1898
|
-
|
|
1899
|
-
|
|
1993
|
+
"vue/prefer-separate-static-class": "error",
|
|
1994
|
+
"vue/prefer-template": "error",
|
|
1995
|
+
"vue/prefer-true-attribute-shorthand": "error",
|
|
1996
|
+
"vue/prop-name-casing": ["error", "camelCase"],
|
|
1997
|
+
"vue/require-typed-ref": "error",
|
|
1998
|
+
"vue/space-infix-ops": "error",
|
|
1999
|
+
"vue/space-unary-ops": ["error", {
|
|
2000
|
+
nonwords: false,
|
|
2001
|
+
words: true
|
|
1900
2002
|
}],
|
|
1901
|
-
"vue/
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
2003
|
+
"vue/static-class-names-order": "off",
|
|
2004
|
+
...stylistic$1 ? {
|
|
2005
|
+
"vue/array-bracket-spacing": ["error", "never"],
|
|
2006
|
+
"vue/arrow-spacing": ["error", {
|
|
2007
|
+
after: true,
|
|
2008
|
+
before: true
|
|
2009
|
+
}],
|
|
2010
|
+
"vue/block-spacing": ["error", "always"],
|
|
2011
|
+
"vue/block-tag-newline": ["error", {
|
|
2012
|
+
multiline: "always",
|
|
2013
|
+
singleline: "always"
|
|
2014
|
+
}],
|
|
2015
|
+
"vue/brace-style": [
|
|
2016
|
+
"error",
|
|
2017
|
+
"1tbs",
|
|
2018
|
+
{ allowSingleLine: true }
|
|
2019
|
+
],
|
|
2020
|
+
"vue/comma-dangle": ["error", "always-multiline"],
|
|
2021
|
+
"vue/comma-spacing": ["error", {
|
|
2022
|
+
after: true,
|
|
2023
|
+
before: false
|
|
2024
|
+
}],
|
|
2025
|
+
"vue/comma-style": ["error", "last"],
|
|
2026
|
+
"vue/html-comment-content-spacing": [
|
|
2027
|
+
"error",
|
|
2028
|
+
"always",
|
|
2029
|
+
{ exceptions: ["-"] }
|
|
2030
|
+
],
|
|
2031
|
+
"vue/key-spacing": ["error", {
|
|
2032
|
+
afterColon: true,
|
|
2033
|
+
beforeColon: false
|
|
2034
|
+
}],
|
|
2035
|
+
"vue/keyword-spacing": ["error", {
|
|
2036
|
+
after: true,
|
|
2037
|
+
before: true
|
|
2038
|
+
}],
|
|
2039
|
+
"vue/object-curly-newline": "off",
|
|
2040
|
+
"vue/object-curly-spacing": ["error", "always"],
|
|
2041
|
+
"vue/object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
|
|
2042
|
+
"vue/operator-linebreak": ["error", "before"],
|
|
2043
|
+
"vue/padding-line-between-blocks": ["error", "always"],
|
|
2044
|
+
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
2045
|
+
"vue/space-in-parens": ["error", "never"],
|
|
2046
|
+
"vue/template-curly-spacing": "error"
|
|
2047
|
+
} : {},
|
|
2048
|
+
"antfu/no-top-level-await": "off",
|
|
2049
|
+
"n/prefer-global/process": "off",
|
|
2050
|
+
"@typescript-eslint/explicit-function-return-type": "off",
|
|
2051
|
+
"@typescript-eslint/naming-convention": "off",
|
|
2052
|
+
"@stylistic/max-len": "off",
|
|
2053
|
+
...overrides
|
|
2054
|
+
}
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
files: [`**/composables/${GLOB_SRC}`],
|
|
2058
|
+
name: "eienjs/vue/composables-disables",
|
|
2059
|
+
rules: { "@typescript-eslint/explicit-module-boundary-types": "off" }
|
|
1917
2060
|
}
|
|
1918
|
-
|
|
2061
|
+
];
|
|
1919
2062
|
}
|
|
1920
2063
|
|
|
1921
2064
|
//#endregion
|
|
@@ -1935,7 +2078,6 @@ async function yaml(options = {}) {
|
|
|
1935
2078
|
name: "eienjs/yaml/rules",
|
|
1936
2079
|
rules: {
|
|
1937
2080
|
"@stylistic/spaced-comment": "off",
|
|
1938
|
-
"unicorn/filename-case": "off",
|
|
1939
2081
|
"yaml/block-mapping": "error",
|
|
1940
2082
|
"yaml/block-sequence": "error",
|
|
1941
2083
|
"yaml/no-empty-key": "error",
|
|
@@ -1999,4 +2141,4 @@ async function yaml(options = {}) {
|
|
|
1999
2141
|
}
|
|
2000
2142
|
|
|
2001
2143
|
//#endregion
|
|
2002
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml };
|
|
2144
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, StylisticConfigDefaults, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, nuxt, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Awaitable, ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem } from "./types-
|
|
1
|
+
import { Awaitable, ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem } from "./types-Dox_r0zd.js";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import { Linter } from "eslint";
|
|
4
4
|
|
|
@@ -38,6 +38,7 @@ declare const GLOB_SVG = "**/*.svg";
|
|
|
38
38
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
39
39
|
declare const GLOB_ASTRO = "**/*.astro";
|
|
40
40
|
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
41
|
+
declare const GLOB_EXTS = "{js,ts,jsx,tsx,vue}";
|
|
41
42
|
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
42
43
|
declare const GLOB_TESTS: string[];
|
|
43
44
|
declare const GLOB_ALL_SRC: string[];
|
|
@@ -82,4 +83,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
82
83
|
declare function isInEditorEnv(): boolean;
|
|
83
84
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
84
85
|
//#endregion
|
|
85
|
-
export { Awaitable, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, ResolvedOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
|
|
86
|
+
export { Awaitable, ConfigNames, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, ResolvedOptions, Rules, StylisticConfig, TypedFlatConfigItem, combine, eienjs as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml } from "./configs-
|
|
1
|
+
import { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, adonisjs, astro, combine, command, comments, disables, ensurePackages, formatters, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, markdown, node, nuxt, parserPlain, perfectionist, pnpm, regexp, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, vue, yaml } from "./configs-DWV1I5t-.js";
|
|
2
2
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
3
3
|
import { isPackageExists } from "local-pkg";
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ const defaultPluginRenaming = {
|
|
|
24
24
|
"yml": "yaml"
|
|
25
25
|
};
|
|
26
26
|
function eienjs(options = {}) {
|
|
27
|
-
const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false } = options;
|
|
27
|
+
const { astro: enableAstro = false, componentExts = [], gitignore: enableGitignore = true, imports: enableImports = true, pnpm: enableCatalogs = false, regexp: enableRegexp = true, typescript: enableTypeScript = isPackageExists("typescript"), unicorn: enableUnicorn = true, vue: enableVue = VuePackages.some((i) => isPackageExists(i)), adonisjs: enableAdonisjs = false, nuxt: enableNuxt = false } = options;
|
|
28
28
|
let { isInEditor } = options;
|
|
29
29
|
if (isInEditor == null) {
|
|
30
30
|
isInEditor = isInEditorEnv();
|
|
@@ -79,6 +79,11 @@ function eienjs(options = {}) {
|
|
|
79
79
|
...resolveSubOptions(options, "adonisjs"),
|
|
80
80
|
overrides: getOverrides(options, "adonisjs")
|
|
81
81
|
}));
|
|
82
|
+
if (enableNuxt) configs.push(nuxt({
|
|
83
|
+
...resolveSubOptions(options, "nuxt"),
|
|
84
|
+
overrides: getOverrides(options, "nuxt"),
|
|
85
|
+
stylistic: stylisticOptions
|
|
86
|
+
}));
|
|
82
87
|
if (options.jsonc ?? true) configs.push(jsonc({
|
|
83
88
|
overrides: getOverrides(options, "jsonc"),
|
|
84
89
|
stylistic: stylisticOptions
|
|
@@ -130,4 +135,4 @@ function getOverrides(options, key) {
|
|
|
130
135
|
var src_default = eienjs;
|
|
131
136
|
|
|
132
137
|
//#endregion
|
|
133
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, combine, src_default as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
|
|
138
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_EXTS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, combine, src_default as default, defaultPluginRenaming, eienjs, ensurePackages, getOverrides, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, parserPlain, resolveSubOptions, toArray };
|
|
@@ -3601,6 +3601,16 @@ interface RuleOptions {
|
|
|
3601
3601
|
* @deprecated
|
|
3602
3602
|
*/
|
|
3603
3603
|
'nonblock-statement-body-position'?: Linter.RuleEntry<NonblockStatementBodyPosition>;
|
|
3604
|
+
/**
|
|
3605
|
+
* Prefer recommended order of Nuxt config properties
|
|
3606
|
+
* @see https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order
|
|
3607
|
+
*/
|
|
3608
|
+
'nuxt/nuxt-config-keys-order'?: Linter.RuleEntry<[]>;
|
|
3609
|
+
/**
|
|
3610
|
+
* Prefer using `import.meta.*` over `process.*`
|
|
3611
|
+
* @see https://eslint.nuxt.com/packages/plugin#nuxtprefer-import-meta
|
|
3612
|
+
*/
|
|
3613
|
+
'nuxt/prefer-import-meta'?: Linter.RuleEntry<[]>;
|
|
3604
3614
|
/**
|
|
3605
3615
|
* Enforce consistent line breaks after opening and before closing braces
|
|
3606
3616
|
* @see https://eslint.org/docs/latest/rules/object-curly-newline
|
|
@@ -15364,7 +15374,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
15364
15374
|
onlyEquality?: boolean;
|
|
15365
15375
|
}];
|
|
15366
15376
|
// Names of all the configs
|
|
15367
|
-
type ConfigNames = 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/formatter/setup' | 'eienjs/imports/rules' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/jsdoc/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/node/rules' | 'eienjs/perfectionist/setup' | 'eienjs/sort/package-json' | 'eienjs/stylistic/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/regexp/rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/rules' | 'eienjs/unicorn/rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/yaml/pnpm-workspace';
|
|
15377
|
+
type ConfigNames = 'eienjs/adonisjs/rules' | 'eienjs/adonisjs/disables' | 'eienjs/adonisjs/database-disables' | 'eienjs/adonisjs/bin-disables' | 'eienjs/adonisjs/commands-disables' | 'eienjs/adonisjs/middleware-disables' | 'eienjs/adonisjs/exceptions-disables' | 'eienjs/adonisjs/controllers-disables' | 'eienjs/adonisjs/config-disables' | 'eienjs/adonisjs/providers-disables' | 'eienjs/adonisjs/tests-disables' | 'eienjs/astro/setup' | 'eienjs/astro/rules' | 'eienjs/eslint-comments/rules' | 'eienjs/formatter/setup' | 'eienjs/imports/rules' | 'eienjs/javascript/setup' | 'eienjs/javascript/rules' | 'eienjs/jsdoc/rules' | 'eienjs/jsonc/setup' | 'eienjs/jsonc/rules' | 'eienjs/markdown/setup' | 'eienjs/markdown/processor' | 'eienjs/markdown/parser' | 'eienjs/markdown/disables' | 'eienjs/node/rules' | 'eienjs/nuxt/setup' | 'eienjs/nuxt/vue/single-root' | 'eienjs/nuxt/rules' | 'eienjs/nuxt/utils-disables' | 'eienjs/nuxt/sort-config' | 'eienjs/nuxt/vue/rules' | 'eienjs/perfectionist/setup' | 'eienjs/sort/package-json' | 'eienjs/stylistic/rules' | 'eienjs/test/setup' | 'eienjs/test/rules' | 'eienjs/toml/setup' | 'eienjs/toml/rules' | 'eienjs/regexp/rules' | 'eienjs/typescript/setup' | 'eienjs/typescript/parser' | 'eienjs/typescript/rules' | 'eienjs/unicorn/rules' | 'eienjs/unicorn/special-rules' | 'eienjs/vue/setup' | 'eienjs/vue/rules' | 'eienjs/vue/composables-disables' | 'eienjs/yaml/setup' | 'eienjs/yaml/rules' | 'eienjs/yaml/pnpm-workspace';
|
|
15368
15378
|
//#endregion
|
|
15369
15379
|
//#region src/vendored/prettier_types.d.ts
|
|
15370
15380
|
/**
|
|
@@ -15508,6 +15518,71 @@ type TypedFlatConfigItem = Omit<Linter.Config, 'plugins' | 'rules'> & {
|
|
|
15508
15518
|
*/
|
|
15509
15519
|
rules?: Rules;
|
|
15510
15520
|
};
|
|
15521
|
+
interface OptionsNuxt extends OptionsOverrides {
|
|
15522
|
+
/**
|
|
15523
|
+
* Version of Nuxt
|
|
15524
|
+
*
|
|
15525
|
+
* @default 4
|
|
15526
|
+
*/
|
|
15527
|
+
version?: 3 | 4;
|
|
15528
|
+
/**
|
|
15529
|
+
* Sort keys in nuxt.config to maintain a consistent order
|
|
15530
|
+
*
|
|
15531
|
+
* @default true when `stylistic` is enabled
|
|
15532
|
+
*/
|
|
15533
|
+
sortConfigKeys?: boolean;
|
|
15534
|
+
dirs?: {
|
|
15535
|
+
/**
|
|
15536
|
+
* Nuxt source directory
|
|
15537
|
+
*/
|
|
15538
|
+
src?: string[];
|
|
15539
|
+
/**
|
|
15540
|
+
* Root directory for nuxt project
|
|
15541
|
+
*/
|
|
15542
|
+
root?: string[];
|
|
15543
|
+
/**
|
|
15544
|
+
* Directory for pages
|
|
15545
|
+
*/
|
|
15546
|
+
pages?: string[];
|
|
15547
|
+
/**
|
|
15548
|
+
* Directory for layouts
|
|
15549
|
+
*/
|
|
15550
|
+
layouts?: string[];
|
|
15551
|
+
/**
|
|
15552
|
+
* Directory for components
|
|
15553
|
+
*/
|
|
15554
|
+
components?: string[];
|
|
15555
|
+
/**
|
|
15556
|
+
* Directory for components with prefix
|
|
15557
|
+
* Ignore `vue/multi-word-component-names`
|
|
15558
|
+
*/
|
|
15559
|
+
componentsPrefixed?: string[];
|
|
15560
|
+
/**
|
|
15561
|
+
* Directory for composobles
|
|
15562
|
+
*/
|
|
15563
|
+
composables?: string[];
|
|
15564
|
+
/**
|
|
15565
|
+
* Directory for plugins
|
|
15566
|
+
*/
|
|
15567
|
+
plugins?: string[];
|
|
15568
|
+
/**
|
|
15569
|
+
* Directory for modules
|
|
15570
|
+
*/
|
|
15571
|
+
modules?: string[];
|
|
15572
|
+
/**
|
|
15573
|
+
* Directory for middleware
|
|
15574
|
+
*/
|
|
15575
|
+
middleware?: string[];
|
|
15576
|
+
/**
|
|
15577
|
+
* Directory for server
|
|
15578
|
+
*/
|
|
15579
|
+
servers?: string[];
|
|
15580
|
+
/**
|
|
15581
|
+
* Directory for utils
|
|
15582
|
+
*/
|
|
15583
|
+
utils?: string[];
|
|
15584
|
+
};
|
|
15585
|
+
}
|
|
15511
15586
|
interface OptionsAdonisJS extends OptionsOverrides {
|
|
15512
15587
|
/**
|
|
15513
15588
|
* Override the `dirs` option to provide custom directories of adonisjs app.
|
|
@@ -15787,6 +15862,15 @@ interface OptionsConfig extends OptionsComponentExts {
|
|
|
15787
15862
|
* @default false
|
|
15788
15863
|
*/
|
|
15789
15864
|
adonisjs?: boolean | OptionsAdonisJS;
|
|
15865
|
+
/**
|
|
15866
|
+
* Enable Nuxt support.
|
|
15867
|
+
*
|
|
15868
|
+
* Requires installing:
|
|
15869
|
+
* - `@nuxt/eslint-plugin`
|
|
15870
|
+
*
|
|
15871
|
+
* @default false
|
|
15872
|
+
*/
|
|
15873
|
+
nuxt?: boolean | OptionsNuxt;
|
|
15790
15874
|
}
|
|
15791
15875
|
//#endregion
|
|
15792
|
-
export { Awaitable, type ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem };
|
|
15876
|
+
export { Awaitable, type ConfigNames, OptionsAdonisJS, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIsInEditor, OptionsNuxt, OptionsOverrides, OptionsRegExp, OptionsStylistic, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, RuleOptions, Rules, StylisticConfig, TypedFlatConfigItem };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eienjs/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"description": "EienJS ESLint Config",
|
|
6
6
|
"author": "Fernando Isidro <luffynando@gmail.com> (https://github.com/luffynando/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@adonisjs/eslint-plugin": "^2.0.0",
|
|
37
|
+
"@nuxt/eslint-plugin": " ^1.7.1",
|
|
37
38
|
"@prettier/plugin-xml": "^3.4.2",
|
|
38
39
|
"astro-eslint-parser": "^1.2.2",
|
|
39
40
|
"eslint": "^9.32.0",
|
|
@@ -45,6 +46,9 @@
|
|
|
45
46
|
"@adonisjs/eslint-plugin": {
|
|
46
47
|
"optional": true
|
|
47
48
|
},
|
|
49
|
+
"@nuxt/eslint-plugin": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
48
52
|
"@prettier/plugin-xml": {
|
|
49
53
|
"optional": true
|
|
50
54
|
},
|
|
@@ -84,7 +88,7 @@
|
|
|
84
88
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
85
89
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
86
90
|
"eslint-plugin-pnpm": "^1.1.0",
|
|
87
|
-
"eslint-plugin-regexp": "^2.9.
|
|
91
|
+
"eslint-plugin-regexp": "^2.9.1",
|
|
88
92
|
"eslint-plugin-toml": "^0.12.0",
|
|
89
93
|
"eslint-plugin-unicorn": "^60.0.0",
|
|
90
94
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
@@ -105,6 +109,7 @@
|
|
|
105
109
|
"@commitlint/cli": "^19.8.1",
|
|
106
110
|
"@commitlint/config-conventional": "^19.8.1",
|
|
107
111
|
"@eslint/config-inspector": "^1.1.0",
|
|
112
|
+
"@nuxt/eslint-plugin": "^1.7.1",
|
|
108
113
|
"@prettier/plugin-xml": "^3.4.2",
|
|
109
114
|
"@types/node": "^22.17.0",
|
|
110
115
|
"astro-eslint-parser": "^1.2.2",
|
|
@@ -116,7 +121,7 @@
|
|
|
116
121
|
"husky": "^9.1.7",
|
|
117
122
|
"np": "^10.2.0",
|
|
118
123
|
"prettier-plugin-astro": "^0.14.1",
|
|
119
|
-
"tsdown": "^0.13.
|
|
124
|
+
"tsdown": "^0.13.2",
|
|
120
125
|
"tsx": "^4.20.3",
|
|
121
126
|
"typescript": ">=4.8.4 <5.9.0"
|
|
122
127
|
},
|