@ntnyq/eslint-config 3.0.0-beta.4 → 3.0.0-beta.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 +43 -8
- package/dist/index.d.cts +129 -60
- package/dist/index.d.ts +129 -60
- package/dist/index.js +42 -8
- package/package.json +9 -8
package/dist/index.cjs
CHANGED
|
@@ -60,6 +60,7 @@ __export(src_exports, {
|
|
|
60
60
|
command: () => command,
|
|
61
61
|
comments: () => comments,
|
|
62
62
|
getOverrides: () => getOverrides,
|
|
63
|
+
gitignore: () => gitignore,
|
|
63
64
|
hasTypeScript: () => hasTypeScript,
|
|
64
65
|
hasUnoCSS: () => hasUnoCSS,
|
|
65
66
|
hasVitest: () => hasVitest,
|
|
@@ -997,11 +998,20 @@ var unocss = (options = {}) => [
|
|
|
997
998
|
}
|
|
998
999
|
];
|
|
999
1000
|
|
|
1001
|
+
// src/configs/gitignore.ts
|
|
1002
|
+
var import_eslint_config_flat_gitignore = __toESM(require("eslint-config-flat-gitignore"), 1);
|
|
1003
|
+
var gitignore = (options = {}) => [
|
|
1004
|
+
{
|
|
1005
|
+
...(0, import_eslint_config_flat_gitignore.default)(options),
|
|
1006
|
+
name: "ntnyq/gitignore"
|
|
1007
|
+
}
|
|
1008
|
+
];
|
|
1009
|
+
|
|
1000
1010
|
// src/configs/command.ts
|
|
1001
1011
|
var import_config = __toESM(require("eslint-plugin-command/config"), 1);
|
|
1002
|
-
var command = () => [
|
|
1012
|
+
var command = (options = {}) => [
|
|
1003
1013
|
{
|
|
1004
|
-
...(0, import_config.default)(),
|
|
1014
|
+
...(0, import_config.default)(options),
|
|
1005
1015
|
name: "ntnyq/command"
|
|
1006
1016
|
}
|
|
1007
1017
|
];
|
|
@@ -1069,6 +1079,7 @@ var vue = (options = {}) => {
|
|
|
1069
1079
|
"vue/require-prop-types": "off",
|
|
1070
1080
|
"vue/require-default-prop": "off",
|
|
1071
1081
|
"vue/multi-word-component-names": "off",
|
|
1082
|
+
"vue/no-v-text-v-html-on-component": "off",
|
|
1072
1083
|
"vue/no-setup-props-reactivity-loss": "off",
|
|
1073
1084
|
"vue/html-self-closing": [
|
|
1074
1085
|
"error",
|
|
@@ -1113,7 +1124,20 @@ var vue = (options = {}) => {
|
|
|
1113
1124
|
exceptions: ["-"]
|
|
1114
1125
|
}
|
|
1115
1126
|
],
|
|
1127
|
+
"vue/no-restricted-v-bind": ["error", "/^v-/"],
|
|
1128
|
+
"vue/no-useless-v-bind": "error",
|
|
1129
|
+
"vue/padding-line-between-blocks": "error",
|
|
1130
|
+
"vue/next-tick-style": ["error", "promise"],
|
|
1116
1131
|
"vue/array-bracket-spacing": ["error", "never"],
|
|
1132
|
+
"vue/prefer-separate-static-class": "error",
|
|
1133
|
+
"vue/no-constant-condition": "error",
|
|
1134
|
+
"vue/prefer-true-attribute-shorthand": ["error", "always"],
|
|
1135
|
+
"vue/prefer-define-options": "error",
|
|
1136
|
+
"vue/valid-define-options": "error",
|
|
1137
|
+
// TypeScript enhancements
|
|
1138
|
+
"vue/define-emits-declaration": ["error", "type-literal"],
|
|
1139
|
+
"vue/no-unused-emit-declarations": "error",
|
|
1140
|
+
"vue/this-in-template": ["error", "never"],
|
|
1117
1141
|
"vue/arrow-spacing": ["error", { before: true, after: true }],
|
|
1118
1142
|
"vue/block-spacing": ["error", "always"],
|
|
1119
1143
|
"vue/brace-style": ["error", "stroustrup", { allowSingleLine: true }],
|
|
@@ -1560,6 +1584,7 @@ var sortTsConfig = () => [
|
|
|
1560
1584
|
];
|
|
1561
1585
|
var sortI18nLocale = () => [
|
|
1562
1586
|
{
|
|
1587
|
+
name: "ntnyq/sort/i18n-locale",
|
|
1563
1588
|
files: ["**/{locales,i18n}/*.json", "**/{locales,i18n}/*.y?(a)ml"],
|
|
1564
1589
|
rules: {
|
|
1565
1590
|
"jsonc/sort-keys": [
|
|
@@ -1650,10 +1675,15 @@ var markdown = (options = {}) => [
|
|
|
1650
1675
|
|
|
1651
1676
|
// src/core.ts
|
|
1652
1677
|
function ntnyq(options = {}, customConfig = []) {
|
|
1653
|
-
const configs = [
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1678
|
+
const configs = [];
|
|
1679
|
+
if (options.gitignore ?? true) {
|
|
1680
|
+
configs.push(
|
|
1681
|
+
...gitignore({
|
|
1682
|
+
...resolveSubOptions(options, "gitignore")
|
|
1683
|
+
})
|
|
1684
|
+
);
|
|
1685
|
+
}
|
|
1686
|
+
configs.push(
|
|
1657
1687
|
...ignores(options.ignores),
|
|
1658
1688
|
...jsx(),
|
|
1659
1689
|
...node({
|
|
@@ -1666,7 +1696,7 @@ function ntnyq(options = {}, customConfig = []) {
|
|
|
1666
1696
|
...resolveSubOptions(options, "javascript"),
|
|
1667
1697
|
overrides: getOverrides(options, "javascript")
|
|
1668
1698
|
})
|
|
1669
|
-
|
|
1699
|
+
);
|
|
1670
1700
|
if (options.unicorn ?? true) {
|
|
1671
1701
|
configs.push(
|
|
1672
1702
|
...unicorn({
|
|
@@ -1763,7 +1793,11 @@ function ntnyq(options = {}, customConfig = []) {
|
|
|
1763
1793
|
);
|
|
1764
1794
|
}
|
|
1765
1795
|
if (options.command ?? true) {
|
|
1766
|
-
configs.push(
|
|
1796
|
+
configs.push(
|
|
1797
|
+
...command({
|
|
1798
|
+
...resolveSubOptions(options, "command")
|
|
1799
|
+
})
|
|
1800
|
+
);
|
|
1767
1801
|
}
|
|
1768
1802
|
configs.push(...toArray(customConfig));
|
|
1769
1803
|
if (options.prettier ?? true) {
|
|
@@ -1808,6 +1842,7 @@ function ntnyq(options = {}, customConfig = []) {
|
|
|
1808
1842
|
command,
|
|
1809
1843
|
comments,
|
|
1810
1844
|
getOverrides,
|
|
1845
|
+
gitignore,
|
|
1811
1846
|
hasTypeScript,
|
|
1812
1847
|
hasUnoCSS,
|
|
1813
1848
|
hasVitest,
|