@ntnyq/eslint-config 3.0.0-beta.16 → 3.0.0-beta.18
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/README.md +3 -3
- package/dist/index.cjs +25 -1
- package/dist/index.d.cts +111 -50
- package/dist/index.d.ts +111 -50
- package/dist/index.js +64 -43
- package/package.json +14 -13
package/dist/index.js
CHANGED
|
@@ -105,18 +105,19 @@ import { default as default2 } from "eslint-plugin-n";
|
|
|
105
105
|
import { default as default3 } from "eslint-plugin-vue";
|
|
106
106
|
import { default as default4 } from "eslint-plugin-yml";
|
|
107
107
|
import { default as default5 } from "eslint-plugin-toml";
|
|
108
|
-
import { default as default6 } from "
|
|
109
|
-
import { default as default7 } from "eslint
|
|
110
|
-
import { default as default8 } from "eslint-plugin-
|
|
111
|
-
import { default as default9 } from "eslint-plugin-
|
|
112
|
-
import { default as default10 } from "
|
|
113
|
-
import { default as default11 } from "@
|
|
114
|
-
import { default as default12 } from "eslint-plugin
|
|
115
|
-
import { default as default13 } from "eslint-plugin-
|
|
116
|
-
import { default as default14 } from "eslint-plugin-
|
|
117
|
-
import { default as default15 } from "eslint-plugin-
|
|
118
|
-
import { default as default16 } from "eslint-plugin-
|
|
119
|
-
import { default as default17 } from "
|
|
108
|
+
import { default as default6 } from "eslint-plugin-ntnyq";
|
|
109
|
+
import { default as default7 } from "@eslint/markdown";
|
|
110
|
+
import { default as default8 } from "eslint-plugin-antfu";
|
|
111
|
+
import { default as default9 } from "eslint-plugin-jsdoc";
|
|
112
|
+
import { default as default10 } from "eslint-plugin-jsonc";
|
|
113
|
+
import { default as default11 } from "@unocss/eslint-plugin";
|
|
114
|
+
import { default as default12 } from "@vitest/eslint-plugin";
|
|
115
|
+
import { default as default13 } from "eslint-plugin-import-x";
|
|
116
|
+
import { default as default14 } from "eslint-plugin-unicorn";
|
|
117
|
+
import { default as default15 } from "eslint-plugin-prettier";
|
|
118
|
+
import { default as default16 } from "eslint-plugin-perfectionist";
|
|
119
|
+
import { default as default17 } from "eslint-plugin-unused-imports";
|
|
120
|
+
import { default as default18 } from "@eslint-community/eslint-plugin-eslint-comments";
|
|
120
121
|
|
|
121
122
|
// src/configs/typescript.ts
|
|
122
123
|
import process from "node:process";
|
|
@@ -848,11 +849,11 @@ var vitest = (options = {}) => [
|
|
|
848
849
|
{
|
|
849
850
|
name: "ntnyq/vitest",
|
|
850
851
|
plugins: {
|
|
851
|
-
vitest:
|
|
852
|
+
vitest: default12
|
|
852
853
|
},
|
|
853
854
|
files: [...GLOB_TEST],
|
|
854
855
|
rules: {
|
|
855
|
-
...
|
|
856
|
+
...default12.configs.recommended.rules,
|
|
856
857
|
// Overrides rules
|
|
857
858
|
...options.overridesVitestRules
|
|
858
859
|
}
|
|
@@ -864,13 +865,14 @@ var antfu = (options = {}) => [
|
|
|
864
865
|
{
|
|
865
866
|
name: "ntnyq/antfu",
|
|
866
867
|
plugins: {
|
|
867
|
-
antfu:
|
|
868
|
+
antfu: default8
|
|
868
869
|
},
|
|
869
870
|
rules: {
|
|
870
871
|
// required `object-curly-newline` to be disabled
|
|
871
872
|
// 'antfu/consistent-list-newline': 'error',
|
|
872
873
|
"antfu/import-dedupe": "error",
|
|
873
874
|
"antfu/top-level-function": "error",
|
|
875
|
+
// Overrides rules
|
|
874
876
|
...options.overrides
|
|
875
877
|
}
|
|
876
878
|
}
|
|
@@ -881,7 +883,7 @@ var jsdoc = (options = {}) => [
|
|
|
881
883
|
{
|
|
882
884
|
name: "ntnyq/jsdoc",
|
|
883
885
|
plugins: {
|
|
884
|
-
jsdoc:
|
|
886
|
+
jsdoc: default9
|
|
885
887
|
},
|
|
886
888
|
rules: {
|
|
887
889
|
"jsdoc/check-access": "warn",
|
|
@@ -913,13 +915,13 @@ var jsonc = (options = {}) => [
|
|
|
913
915
|
name: "ntnyq/jsonc",
|
|
914
916
|
files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
|
|
915
917
|
plugins: {
|
|
916
|
-
jsonc:
|
|
918
|
+
jsonc: default10
|
|
917
919
|
},
|
|
918
920
|
languageOptions: {
|
|
919
921
|
parser: parserJsonc
|
|
920
922
|
},
|
|
921
923
|
rules: {
|
|
922
|
-
...
|
|
924
|
+
...default10.configs["recommended-with-jsonc"].rules,
|
|
923
925
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
924
926
|
"jsonc/comma-dangle": ["error", "never"],
|
|
925
927
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -952,6 +954,21 @@ var jsonc = (options = {}) => [
|
|
|
952
954
|
}
|
|
953
955
|
];
|
|
954
956
|
|
|
957
|
+
// src/configs/ntnyq.ts
|
|
958
|
+
var createConfigNtnyq = (options = {}) => [
|
|
959
|
+
{
|
|
960
|
+
name: "ntnyq/ntnyq",
|
|
961
|
+
plugins: {
|
|
962
|
+
ntnyq: default6
|
|
963
|
+
},
|
|
964
|
+
rules: {
|
|
965
|
+
"ntnyq/no-member-accessibility": "error",
|
|
966
|
+
// Overrides rules
|
|
967
|
+
...options.overrides
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
];
|
|
971
|
+
|
|
955
972
|
// src/configs/regexp.ts
|
|
956
973
|
var regexp = (options = {}) => [
|
|
957
974
|
/**
|
|
@@ -970,7 +987,7 @@ var unocss = (options = {}) => [
|
|
|
970
987
|
{
|
|
971
988
|
name: "ntnyq/unocss",
|
|
972
989
|
plugins: {
|
|
973
|
-
unocss:
|
|
990
|
+
unocss: default11
|
|
974
991
|
},
|
|
975
992
|
rules: {
|
|
976
993
|
"unocss/order": "error",
|
|
@@ -1008,7 +1025,7 @@ var imports = (options = {}) => [
|
|
|
1008
1025
|
{
|
|
1009
1026
|
name: "ntnyq/imports",
|
|
1010
1027
|
plugins: {
|
|
1011
|
-
import:
|
|
1028
|
+
import: default13
|
|
1012
1029
|
},
|
|
1013
1030
|
settings: {
|
|
1014
1031
|
"import/resolver": {
|
|
@@ -1039,7 +1056,7 @@ var unicorn = (options = {}) => [
|
|
|
1039
1056
|
{
|
|
1040
1057
|
name: "ntnyq/unicorn",
|
|
1041
1058
|
plugins: {
|
|
1042
|
-
unicorn:
|
|
1059
|
+
unicorn: default14
|
|
1043
1060
|
},
|
|
1044
1061
|
rules: {
|
|
1045
1062
|
// Disabled for now
|
|
@@ -1155,10 +1172,10 @@ var comments = (options = {}) => [
|
|
|
1155
1172
|
{
|
|
1156
1173
|
name: "ntnyq/eslint-comments",
|
|
1157
1174
|
plugins: {
|
|
1158
|
-
"@eslint-community/eslint-comments":
|
|
1175
|
+
"@eslint-community/eslint-comments": default18
|
|
1159
1176
|
},
|
|
1160
1177
|
rules: {
|
|
1161
|
-
...
|
|
1178
|
+
...default18.configs.recommended.rules,
|
|
1162
1179
|
"@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
|
|
1163
1180
|
// Overrides rules
|
|
1164
1181
|
...options.overrides
|
|
@@ -1168,9 +1185,9 @@ var comments = (options = {}) => [
|
|
|
1168
1185
|
|
|
1169
1186
|
// src/configs/markdown.ts
|
|
1170
1187
|
var markdown = (options = {}) => {
|
|
1171
|
-
if (!Array.isArray(
|
|
1188
|
+
if (!Array.isArray(default7.configs?.processor)) return [];
|
|
1172
1189
|
return [
|
|
1173
|
-
...
|
|
1190
|
+
...default7.configs.processor.map((config) => ({
|
|
1174
1191
|
...config,
|
|
1175
1192
|
name: `ntnyq/${config.name}`
|
|
1176
1193
|
})),
|
|
@@ -1210,7 +1227,7 @@ var prettier = (options = {}) => [
|
|
|
1210
1227
|
{
|
|
1211
1228
|
name: "ntnyq/prettier",
|
|
1212
1229
|
plugins: {
|
|
1213
|
-
prettier:
|
|
1230
|
+
prettier: default15
|
|
1214
1231
|
},
|
|
1215
1232
|
rules: {
|
|
1216
1233
|
"vue/array-bracket-newline": "off",
|
|
@@ -1250,7 +1267,7 @@ var prettier = (options = {}) => [
|
|
|
1250
1267
|
"vue/space-infix-ops": "off",
|
|
1251
1268
|
"vue/space-unary-ops": "off",
|
|
1252
1269
|
"vue/template-curly-spacing": "off",
|
|
1253
|
-
...
|
|
1270
|
+
...default15.configs.recommended.rules,
|
|
1254
1271
|
"prettier/prettier": options.level || "warn",
|
|
1255
1272
|
// Overrides rules
|
|
1256
1273
|
...options.overrides
|
|
@@ -1263,7 +1280,7 @@ var prettier = (options = {}) => [
|
|
|
1263
1280
|
name: "ntnyq/prettier/disabled",
|
|
1264
1281
|
files: [GLOB_TOML],
|
|
1265
1282
|
plugins: {
|
|
1266
|
-
prettier:
|
|
1283
|
+
prettier: default15
|
|
1267
1284
|
},
|
|
1268
1285
|
rules: {
|
|
1269
1286
|
"prettier/prettier": "off"
|
|
@@ -1518,7 +1535,7 @@ var perfectionist = (options = {}) => [
|
|
|
1518
1535
|
{
|
|
1519
1536
|
name: "ntnyq/perfectionist",
|
|
1520
1537
|
plugins: {
|
|
1521
|
-
perfectionist:
|
|
1538
|
+
perfectionist: default16
|
|
1522
1539
|
},
|
|
1523
1540
|
rules: {
|
|
1524
1541
|
"perfectionist/sort-imports": [
|
|
@@ -1604,7 +1621,7 @@ var unusedImports = (options = {}) => [
|
|
|
1604
1621
|
{
|
|
1605
1622
|
name: "ntnyq/unused-imports",
|
|
1606
1623
|
plugins: {
|
|
1607
|
-
"unused-imports":
|
|
1624
|
+
"unused-imports": default17
|
|
1608
1625
|
},
|
|
1609
1626
|
rules: {
|
|
1610
1627
|
"@typescript-eslint/no-unused-vars": "off",
|
|
@@ -1672,7 +1689,7 @@ function getOverrides(options, key) {
|
|
|
1672
1689
|
}
|
|
1673
1690
|
|
|
1674
1691
|
// src/core.ts
|
|
1675
|
-
function
|
|
1692
|
+
function defineESLintConfig(options = {}, userConfigs = []) {
|
|
1676
1693
|
const configs = [];
|
|
1677
1694
|
if (options.gitignore ?? true) {
|
|
1678
1695
|
configs.push(
|
|
@@ -1822,6 +1839,7 @@ function ntnyq(options = {}, userConfigs = []) {
|
|
|
1822
1839
|
);
|
|
1823
1840
|
return composer;
|
|
1824
1841
|
}
|
|
1842
|
+
var ntnyq = defineESLintConfig;
|
|
1825
1843
|
export {
|
|
1826
1844
|
GLOB_ALL_SRC,
|
|
1827
1845
|
GLOB_CSS,
|
|
@@ -1853,6 +1871,8 @@ export {
|
|
|
1853
1871
|
antfu,
|
|
1854
1872
|
command,
|
|
1855
1873
|
comments,
|
|
1874
|
+
createConfigNtnyq,
|
|
1875
|
+
defineESLintConfig,
|
|
1856
1876
|
getOverrides,
|
|
1857
1877
|
gitignore,
|
|
1858
1878
|
hasTypeScript,
|
|
@@ -1875,21 +1895,22 @@ export {
|
|
|
1875
1895
|
parserVue,
|
|
1876
1896
|
parserYaml,
|
|
1877
1897
|
perfectionist,
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1898
|
+
default8 as pluginAntfu,
|
|
1899
|
+
default18 as pluginComments,
|
|
1900
|
+
default13 as pluginImport,
|
|
1901
|
+
default9 as pluginJsdoc,
|
|
1902
|
+
default10 as pluginJsonc,
|
|
1903
|
+
default7 as pluginMarkdown,
|
|
1884
1904
|
default2 as pluginNode,
|
|
1885
|
-
|
|
1886
|
-
|
|
1905
|
+
default6 as pluginNtnyq,
|
|
1906
|
+
default16 as pluginPerfectionist,
|
|
1907
|
+
default15 as pluginPrettier,
|
|
1887
1908
|
pluginRegexp,
|
|
1888
1909
|
default5 as pluginToml,
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1910
|
+
default14 as pluginUnicorn,
|
|
1911
|
+
default11 as pluginUnoCSS,
|
|
1912
|
+
default17 as pluginUnusedImports,
|
|
1913
|
+
default12 as pluginVitest,
|
|
1893
1914
|
default3 as pluginVue,
|
|
1894
1915
|
default4 as pluginYaml,
|
|
1895
1916
|
prettier,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.18",
|
|
5
5
|
"packageManager": "pnpm@9.11.0",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -56,21 +56,22 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
59
|
-
"@eslint/js": "^9.11.
|
|
60
|
-
"@eslint/markdown": "^6.1.
|
|
59
|
+
"@eslint/js": "^9.11.1",
|
|
60
|
+
"@eslint/markdown": "^6.1.1",
|
|
61
61
|
"@types/eslint__js": "^8.42.3",
|
|
62
|
-
"@unocss/eslint-plugin": "^0.
|
|
62
|
+
"@unocss/eslint-plugin": "^0.63.1",
|
|
63
63
|
"@vitest/eslint-plugin": "^1.1.4",
|
|
64
64
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
65
65
|
"eslint-flat-config-utils": "^0.4.0",
|
|
66
66
|
"eslint-merge-processors": "^0.1.0",
|
|
67
67
|
"eslint-plugin-antfu": "^2.7.0",
|
|
68
|
-
"eslint-plugin-command": "^0.2.
|
|
69
|
-
"eslint-plugin-import-x": "^4.
|
|
70
|
-
"eslint-plugin-jsdoc": "^50.
|
|
68
|
+
"eslint-plugin-command": "^0.2.6",
|
|
69
|
+
"eslint-plugin-import-x": "^4.3.1",
|
|
70
|
+
"eslint-plugin-jsdoc": "^50.3.0",
|
|
71
71
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
72
72
|
"eslint-plugin-n": "^17.10.3",
|
|
73
|
-
"eslint-plugin-
|
|
73
|
+
"eslint-plugin-ntnyq": "^0.5.0",
|
|
74
|
+
"eslint-plugin-perfectionist": "^3.8.0",
|
|
74
75
|
"eslint-plugin-prettier": "^5.2.1",
|
|
75
76
|
"eslint-plugin-regexp": "^2.6.0",
|
|
76
77
|
"eslint-plugin-toml": "^0.11.1",
|
|
@@ -83,18 +84,18 @@
|
|
|
83
84
|
"local-pkg": "^0.5.0",
|
|
84
85
|
"prettier": "^3.3.3",
|
|
85
86
|
"toml-eslint-parser": "^0.10.0",
|
|
86
|
-
"typescript-eslint": "^8.
|
|
87
|
+
"typescript-eslint": "^8.8.0",
|
|
87
88
|
"vue-eslint-parser": "^9.4.3",
|
|
88
89
|
"yaml-eslint-parser": "^1.2.3"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
92
|
"@ntnyq/prettier-config": "^1.21.3",
|
|
92
|
-
"@types/node": "^22.
|
|
93
|
-
"bumpp": "^9.
|
|
94
|
-
"eslint": "^9.11.
|
|
93
|
+
"@types/node": "^22.7.4",
|
|
94
|
+
"bumpp": "^9.6.1",
|
|
95
|
+
"eslint": "^9.11.1",
|
|
95
96
|
"eslint-typegen": "^0.3.2",
|
|
96
97
|
"husky": "^9.1.6",
|
|
97
|
-
"jiti": "^
|
|
98
|
+
"jiti": "^2.0.0",
|
|
98
99
|
"nano-staged": "^0.8.0",
|
|
99
100
|
"npm-run-all2": "^6.2.3",
|
|
100
101
|
"rimraf": "^6.0.1",
|