@frabbit/eslint-config 1.5.4 → 1.5.6
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 +25 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +23 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,8 @@ __export(src_exports, {
|
|
|
44
44
|
GLOB_LOCKFILE: () => GLOB_LOCKFILE,
|
|
45
45
|
GLOB_MARKDOWN: () => GLOB_MARKDOWN,
|
|
46
46
|
GLOB_NODE_MODULES: () => GLOB_NODE_MODULES,
|
|
47
|
+
GLOB_NUXT_LAYOUTS: () => GLOB_NUXT_LAYOUTS,
|
|
48
|
+
GLOB_NUXT_PAGE: () => GLOB_NUXT_PAGE,
|
|
47
49
|
GLOB_SCSS: () => GLOB_SCSS,
|
|
48
50
|
GLOB_SRC: () => GLOB_SRC,
|
|
49
51
|
GLOB_SRC_EXT: () => GLOB_SRC_EXT,
|
|
@@ -167,6 +169,8 @@ var GLOB_JSON5 = "**/*.json5";
|
|
|
167
169
|
var GLOB_JSONC = "**/*.jsonc";
|
|
168
170
|
var GLOB_MARKDOWN = "**/*.md";
|
|
169
171
|
var GLOB_VUE = "**/*.vue";
|
|
172
|
+
var GLOB_NUXT_PAGE = "pages/**/*.vue";
|
|
173
|
+
var GLOB_NUXT_LAYOUTS = "layouts/**/*.vue";
|
|
170
174
|
var GLOB_YAML = "**/*.y?(a)ml";
|
|
171
175
|
var GLOB_HTML = "**/*.htm?(l)";
|
|
172
176
|
var GLOB_ALL_SRC = [
|
|
@@ -176,6 +180,8 @@ var GLOB_ALL_SRC = [
|
|
|
176
180
|
GLOB_JSON5,
|
|
177
181
|
GLOB_MARKDOWN,
|
|
178
182
|
GLOB_VUE,
|
|
183
|
+
GLOB_NUXT_PAGE,
|
|
184
|
+
GLOB_NUXT_LAYOUTS,
|
|
179
185
|
GLOB_YAML,
|
|
180
186
|
GLOB_HTML
|
|
181
187
|
];
|
|
@@ -998,8 +1004,8 @@ var unocss = [
|
|
|
998
1004
|
];
|
|
999
1005
|
|
|
1000
1006
|
// src/configs/vue.ts
|
|
1001
|
-
var import_local_pkg2 = require("local-pkg");
|
|
1002
1007
|
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"), 1);
|
|
1008
|
+
var import_local_pkg2 = require("local-pkg");
|
|
1003
1009
|
function getVueVersion() {
|
|
1004
1010
|
const pkg = (0, import_local_pkg2.getPackageInfoSync)("vue", { paths: [process.cwd()] });
|
|
1005
1011
|
if (pkg && typeof pkg.version === "string" && !Number.isNaN(+pkg.version[0])) {
|
|
@@ -1050,7 +1056,7 @@ var vueCustomRules = {
|
|
|
1050
1056
|
}
|
|
1051
1057
|
],
|
|
1052
1058
|
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
|
|
1053
|
-
"vue/component-definition-name-casing": ["error", "
|
|
1059
|
+
"vue/component-definition-name-casing": ["error", "kebab-case"],
|
|
1054
1060
|
"vue/component-name-in-template-casing": [
|
|
1055
1061
|
"error",
|
|
1056
1062
|
"kebab-case",
|
|
@@ -1080,9 +1086,16 @@ var vueCustomRules = {
|
|
|
1080
1086
|
svg: "always"
|
|
1081
1087
|
}
|
|
1082
1088
|
],
|
|
1089
|
+
"vue/match-component-file-name": [
|
|
1090
|
+
"error",
|
|
1091
|
+
{
|
|
1092
|
+
extensions: ["vue"],
|
|
1093
|
+
shouldMatchCase: false
|
|
1094
|
+
}
|
|
1095
|
+
],
|
|
1083
1096
|
"vue/match-component-import-name": "warn",
|
|
1084
1097
|
"vue/max-attributes-per-line": "off",
|
|
1085
|
-
"vue/multi-word-component-names": "
|
|
1098
|
+
"vue/multi-word-component-names": "error",
|
|
1086
1099
|
"vue/no-boolean-default": ["error", "default-false"],
|
|
1087
1100
|
"vue/no-constant-condition": "warn",
|
|
1088
1101
|
"vue/no-duplicate-attr-inheritance": "warn",
|
|
@@ -1240,7 +1253,13 @@ var vue = [
|
|
|
1240
1253
|
...vueCustomRules
|
|
1241
1254
|
}
|
|
1242
1255
|
},
|
|
1243
|
-
...reactivityTransform
|
|
1256
|
+
...reactivityTransform,
|
|
1257
|
+
{
|
|
1258
|
+
files: [GLOB_NUXT_PAGE, GLOB_NUXT_LAYOUTS, "app.vue"],
|
|
1259
|
+
rules: {
|
|
1260
|
+
"vue/multi-word-component-names": "off"
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1244
1263
|
];
|
|
1245
1264
|
|
|
1246
1265
|
// src/configs/yml.ts
|
|
@@ -1325,6 +1344,8 @@ function frabbit(config = [], {
|
|
|
1325
1344
|
GLOB_LOCKFILE,
|
|
1326
1345
|
GLOB_MARKDOWN,
|
|
1327
1346
|
GLOB_NODE_MODULES,
|
|
1347
|
+
GLOB_NUXT_LAYOUTS,
|
|
1348
|
+
GLOB_NUXT_PAGE,
|
|
1328
1349
|
GLOB_SCSS,
|
|
1329
1350
|
GLOB_SRC,
|
|
1330
1351
|
GLOB_SRC_EXT,
|
package/dist/index.d.cts
CHANGED
|
@@ -72,6 +72,8 @@ declare const GLOB_JSON5 = "**/*.json5";
|
|
|
72
72
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
73
73
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
74
74
|
declare const GLOB_VUE = "**/*.vue";
|
|
75
|
+
declare const GLOB_NUXT_PAGE = "pages/**/*.vue";
|
|
76
|
+
declare const GLOB_NUXT_LAYOUTS = "layouts/**/*.vue";
|
|
75
77
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
76
78
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
77
79
|
declare const GLOB_ALL_SRC: string[];
|
|
@@ -102,4 +104,4 @@ declare function frabbit(config?: FlatESLintConfigItem | FlatESLintConfigItem[],
|
|
|
102
104
|
unocss: boolean;
|
|
103
105
|
}>): FlatESLintConfigItem[];
|
|
104
106
|
|
|
105
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, frabbit, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, security, sonarjs, sortPackageJson, sortTsconfig, typescript, unicorn, unocss, vue, yml };
|
|
107
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_NUXT_LAYOUTS, GLOB_NUXT_PAGE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, frabbit, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, security, sonarjs, sortPackageJson, sortTsconfig, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,8 @@ declare const GLOB_JSON5 = "**/*.json5";
|
|
|
72
72
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
73
73
|
declare const GLOB_MARKDOWN = "**/*.md";
|
|
74
74
|
declare const GLOB_VUE = "**/*.vue";
|
|
75
|
+
declare const GLOB_NUXT_PAGE = "pages/**/*.vue";
|
|
76
|
+
declare const GLOB_NUXT_LAYOUTS = "layouts/**/*.vue";
|
|
75
77
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
76
78
|
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
77
79
|
declare const GLOB_ALL_SRC: string[];
|
|
@@ -102,4 +104,4 @@ declare function frabbit(config?: FlatESLintConfigItem | FlatESLintConfigItem[],
|
|
|
102
104
|
unocss: boolean;
|
|
103
105
|
}>): FlatESLintConfigItem[];
|
|
104
106
|
|
|
105
|
-
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, frabbit, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, security, sonarjs, sortPackageJson, sortTsconfig, typescript, unicorn, unocss, vue, yml };
|
|
107
|
+
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_DIST, GLOB_EXCLUDE, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_NUXT_LAYOUTS, GLOB_NUXT_PAGE, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_YAML, all, basic, comments, configPrettier, frabbit, getVueVersion, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, jsonc, markdown, pluginAntfu, pluginComments, pluginMarkdown, pluginPrettier, pluginTypeScript, pluginUnicorn, pluginUnocss, pluginVue, basic as presetBasic, presetJavaScript, presetLangsExtensions, prettier, reactivityTransform, security, sonarjs, sortPackageJson, sortTsconfig, typescript, unicorn, unocss, vue, yml };
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,8 @@ var GLOB_JSON5 = "**/*.json5";
|
|
|
64
64
|
var GLOB_JSONC = "**/*.jsonc";
|
|
65
65
|
var GLOB_MARKDOWN = "**/*.md";
|
|
66
66
|
var GLOB_VUE = "**/*.vue";
|
|
67
|
+
var GLOB_NUXT_PAGE = "pages/**/*.vue";
|
|
68
|
+
var GLOB_NUXT_LAYOUTS = "layouts/**/*.vue";
|
|
67
69
|
var GLOB_YAML = "**/*.y?(a)ml";
|
|
68
70
|
var GLOB_HTML = "**/*.htm?(l)";
|
|
69
71
|
var GLOB_ALL_SRC = [
|
|
@@ -73,6 +75,8 @@ var GLOB_ALL_SRC = [
|
|
|
73
75
|
GLOB_JSON5,
|
|
74
76
|
GLOB_MARKDOWN,
|
|
75
77
|
GLOB_VUE,
|
|
78
|
+
GLOB_NUXT_PAGE,
|
|
79
|
+
GLOB_NUXT_LAYOUTS,
|
|
76
80
|
GLOB_YAML,
|
|
77
81
|
GLOB_HTML
|
|
78
82
|
];
|
|
@@ -895,8 +899,8 @@ var unocss = [
|
|
|
895
899
|
];
|
|
896
900
|
|
|
897
901
|
// src/configs/vue.ts
|
|
898
|
-
import { getPackageInfoSync } from "local-pkg";
|
|
899
902
|
import tsPlugin from "@typescript-eslint/eslint-plugin";
|
|
903
|
+
import { getPackageInfoSync } from "local-pkg";
|
|
900
904
|
function getVueVersion() {
|
|
901
905
|
const pkg = getPackageInfoSync("vue", { paths: [process.cwd()] });
|
|
902
906
|
if (pkg && typeof pkg.version === "string" && !Number.isNaN(+pkg.version[0])) {
|
|
@@ -947,7 +951,7 @@ var vueCustomRules = {
|
|
|
947
951
|
}
|
|
948
952
|
],
|
|
949
953
|
"vue/block-order": ["error", { order: ["script", "template", "style"] }],
|
|
950
|
-
"vue/component-definition-name-casing": ["error", "
|
|
954
|
+
"vue/component-definition-name-casing": ["error", "kebab-case"],
|
|
951
955
|
"vue/component-name-in-template-casing": [
|
|
952
956
|
"error",
|
|
953
957
|
"kebab-case",
|
|
@@ -977,9 +981,16 @@ var vueCustomRules = {
|
|
|
977
981
|
svg: "always"
|
|
978
982
|
}
|
|
979
983
|
],
|
|
984
|
+
"vue/match-component-file-name": [
|
|
985
|
+
"error",
|
|
986
|
+
{
|
|
987
|
+
extensions: ["vue"],
|
|
988
|
+
shouldMatchCase: false
|
|
989
|
+
}
|
|
990
|
+
],
|
|
980
991
|
"vue/match-component-import-name": "warn",
|
|
981
992
|
"vue/max-attributes-per-line": "off",
|
|
982
|
-
"vue/multi-word-component-names": "
|
|
993
|
+
"vue/multi-word-component-names": "error",
|
|
983
994
|
"vue/no-boolean-default": ["error", "default-false"],
|
|
984
995
|
"vue/no-constant-condition": "warn",
|
|
985
996
|
"vue/no-duplicate-attr-inheritance": "warn",
|
|
@@ -1137,7 +1148,13 @@ var vue = [
|
|
|
1137
1148
|
...vueCustomRules
|
|
1138
1149
|
}
|
|
1139
1150
|
},
|
|
1140
|
-
...reactivityTransform
|
|
1151
|
+
...reactivityTransform,
|
|
1152
|
+
{
|
|
1153
|
+
files: [GLOB_NUXT_PAGE, GLOB_NUXT_LAYOUTS, "app.vue"],
|
|
1154
|
+
rules: {
|
|
1155
|
+
"vue/multi-word-component-names": "off"
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1141
1158
|
];
|
|
1142
1159
|
|
|
1143
1160
|
// src/configs/yml.ts
|
|
@@ -1221,6 +1238,8 @@ export {
|
|
|
1221
1238
|
GLOB_LOCKFILE,
|
|
1222
1239
|
GLOB_MARKDOWN,
|
|
1223
1240
|
GLOB_NODE_MODULES,
|
|
1241
|
+
GLOB_NUXT_LAYOUTS,
|
|
1242
|
+
GLOB_NUXT_PAGE,
|
|
1224
1243
|
GLOB_SCSS,
|
|
1225
1244
|
GLOB_SRC,
|
|
1226
1245
|
GLOB_SRC_EXT,
|