@ntnyq/eslint-config 4.0.2 → 4.0.4

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.mjs CHANGED
@@ -11,8 +11,6 @@ import * as parserYaml from 'yaml-eslint-parser';
11
11
  export { parserYaml };
12
12
  import * as parserJsonc from 'jsonc-eslint-parser';
13
13
  export { parserJsonc };
14
- import * as pluginDepend from 'eslint-plugin-depend';
15
- export { pluginDepend };
16
14
  import * as pluginRegexp from 'eslint-plugin-regexp';
17
15
  export { pluginRegexp };
18
16
  import pluginNode from 'eslint-plugin-n';
@@ -39,6 +37,8 @@ import pluginNtnyq from 'eslint-plugin-ntnyq';
39
37
  export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
40
38
  import pluginPinia from 'eslint-plugin-pinia';
41
39
  export { default as pluginPinia } from 'eslint-plugin-pinia';
40
+ import pluginDepend from 'eslint-plugin-depend';
41
+ export { default as pluginDepend } from 'eslint-plugin-depend';
42
42
  import pluginUnoCSS from '@unocss/eslint-plugin';
43
43
  export { default as pluginUnoCSS } from '@unocss/eslint-plugin';
44
44
  import pluginVitest from '@vitest/eslint-plugin';
@@ -135,6 +135,10 @@ const GLOB_JSON = "**/*.json";
135
135
  const GLOB_JSON5 = "**/*.json5";
136
136
  const GLOB_JSONC = "**/*.jsonc";
137
137
  const GLOB_PACKAGE_JSON = "**/package.json";
138
+ const GLOB_JSON_SCHEMA = [
139
+ "**/*.schema.json",
140
+ "**/schemas/*.json"
141
+ ];
138
142
  const GLOB_TSCONFIG_JSON = [
139
143
  "**/tsconfig.json",
140
144
  "**/tsconfig.*.json"
@@ -678,6 +682,7 @@ const configSort = (options = {}) => {
678
682
  additionalJsonFiles = [],
679
683
  additionalYamlFiles = [],
680
684
  i18nLocale: enableSortI18nLocale = true,
685
+ jsonSchema: enableSortJsonSchema = true,
681
686
  packageJson: enableSortPackageJson = true,
682
687
  pnpmWorkspace: enableSortPnpmWorkspace = true,
683
688
  tsconfig: enableSortTsconfig = true
@@ -685,7 +690,7 @@ const configSort = (options = {}) => {
685
690
  if (enableSortTsconfig) {
686
691
  configs.push({
687
692
  name: "ntnyq/sort/tsconfig",
688
- files: ["**/tsconfig.json", "**/tsconfig.*.json"],
693
+ files: [...GLOB_TSCONFIG_JSON],
689
694
  rules: {
690
695
  "jsonc/sort-keys": [
691
696
  "error",
@@ -829,7 +834,7 @@ const configSort = (options = {}) => {
829
834
  if (enableSortPackageJson) {
830
835
  configs.push({
831
836
  name: "ntnyq/sort/package-json",
832
- files: ["**/package.json"],
837
+ files: [GLOB_PACKAGE_JSON],
833
838
  rules: {
834
839
  "jsonc/sort-array-values": [
835
840
  "error",
@@ -1048,10 +1053,55 @@ const configSort = (options = {}) => {
1048
1053
  }
1049
1054
  );
1050
1055
  }
1056
+ if (enableSortJsonSchema) {
1057
+ configs.push({
1058
+ name: "ntnyq/sort/json-schema",
1059
+ files: [...GLOB_JSON_SCHEMA],
1060
+ rules: {
1061
+ "jsonc/sort-array-values": [
1062
+ "error",
1063
+ {
1064
+ order: { type: "asc" },
1065
+ pathPattern: "^(?:required)$"
1066
+ }
1067
+ ],
1068
+ "jsonc/sort-keys": [
1069
+ "error",
1070
+ {
1071
+ pathPattern: "^$",
1072
+ order: [
1073
+ // Meta
1074
+ "$schema",
1075
+ "$comment",
1076
+ "$id",
1077
+ "$ref",
1078
+ "title",
1079
+ "description",
1080
+ "type",
1081
+ "definitions",
1082
+ "properties",
1083
+ "required",
1084
+ "additionalProperties",
1085
+ // Unknown fields
1086
+ {
1087
+ order: {
1088
+ type: "asc"
1089
+ }
1090
+ }
1091
+ ]
1092
+ },
1093
+ {
1094
+ order: { type: "asc" },
1095
+ pathPattern: "^(?:definitions|properties)$"
1096
+ }
1097
+ ]
1098
+ }
1099
+ });
1100
+ }
1051
1101
  if (enableSortPnpmWorkspace) {
1052
1102
  configs.push({
1053
1103
  name: "ntnyq/sort/pnpm-workspace",
1054
- files: ["**/pnpm-workspace.yaml"],
1104
+ files: [GLOB_PNPM_WORKSPACE_YAML],
1055
1105
  rules: {
1056
1106
  "yml/sort-keys": [
1057
1107
  "error",
@@ -2384,6 +2434,7 @@ const configSpecials = (options = {}) => {
2384
2434
  "vue/define-emits-declaration": "off",
2385
2435
  "vue/html-button-has-type": "off",
2386
2436
  "vue/no-duplicate-attr-inheritance": "off",
2437
+ "vue/prefer-use-template-ref": "off",
2387
2438
  // Overrides rules
2388
2439
  ...shadcnOptions.overridesRules
2389
2440
  }
@@ -3439,4 +3490,4 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3439
3490
  return composer;
3440
3491
  }
3441
3492
 
3442
- export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, PERFECTIONIST_COMMON_RULE_OPTIONS, PERFECTIONIST_EXTRA_RULE_OPTIONS, PERFECTIONIST_SORT_CLASSES_GROUPS, PERFECTIONIST_SORT_IMPORTS_GROUPS, PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS, PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS, PERFECTIONIST_SORT_OBJECTS_GROUPS, PRETTIER_DEFAULT_OPTIONS, combineConfigs, configAntfu, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, parserPlain, resolveSubOptions };
3493
+ export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, PERFECTIONIST_COMMON_RULE_OPTIONS, PERFECTIONIST_EXTRA_RULE_OPTIONS, PERFECTIONIST_SORT_CLASSES_GROUPS, PERFECTIONIST_SORT_IMPORTS_GROUPS, PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS, PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS, PERFECTIONIST_SORT_OBJECTS_GROUPS, PRETTIER_DEFAULT_OPTIONS, combineConfigs, configAntfu, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, parserPlain, resolveSubOptions };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "4.0.2",
5
- "packageManager": "pnpm@10.6.3",
4
+ "version": "4.0.4",
5
+ "packageManager": "pnpm@10.8.1",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -74,35 +74,35 @@
74
74
  },
75
75
  "dependencies": {
76
76
  "@antfu/install-pkg": "^1.0.0",
77
- "@clack/prompts": "^0.10.0",
78
- "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
79
- "@eslint/js": "^9.22.0",
77
+ "@clack/prompts": "^0.10.1",
78
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
79
+ "@eslint/js": "^9.24.0",
80
80
  "@eslint/markdown": "^6.3.0",
81
- "@unocss/eslint-plugin": "^66.1.0-beta.5",
82
- "@vitest/eslint-plugin": "^1.1.37",
81
+ "@unocss/eslint-plugin": "^66.1.0-beta.11",
82
+ "@vitest/eslint-plugin": "^1.1.42",
83
83
  "eslint-config-flat-gitignore": "^2.1.0",
84
84
  "eslint-flat-config-utils": "^2.0.1",
85
- "eslint-import-resolver-typescript": "^3.9.0",
85
+ "eslint-import-resolver-typescript": "^4.3.2",
86
86
  "eslint-merge-processors": "^2.0.0",
87
87
  "eslint-plugin-antfu": "^3.1.1",
88
- "eslint-plugin-command": "^3.1.0",
88
+ "eslint-plugin-command": "^3.2.0",
89
89
  "eslint-plugin-de-morgan": "^1.2.1",
90
- "eslint-plugin-depend": "^0.12.0",
90
+ "eslint-plugin-depend": "^1.0.0",
91
91
  "eslint-plugin-github-action": "^0.0.15",
92
- "eslint-plugin-import-x": "^4.7.0",
93
- "eslint-plugin-jsdoc": "^50.6.6",
94
- "eslint-plugin-jsonc": "^2.19.1",
95
- "eslint-plugin-n": "^17.16.2",
92
+ "eslint-plugin-import-x": "^4.10.3",
93
+ "eslint-plugin-jsdoc": "^50.6.9",
94
+ "eslint-plugin-jsonc": "^2.20.0",
95
+ "eslint-plugin-n": "^17.17.0",
96
96
  "eslint-plugin-no-only-tests": "^3.3.0",
97
97
  "eslint-plugin-ntnyq": "^0.11.0",
98
- "eslint-plugin-perfectionist": "^4.10.1",
98
+ "eslint-plugin-perfectionist": "^4.11.0",
99
99
  "eslint-plugin-pinia": "^0.4.1",
100
100
  "eslint-plugin-pnpm": "^0.3.1",
101
- "eslint-plugin-prettier": "^5.2.3",
101
+ "eslint-plugin-prettier": "^5.2.6",
102
102
  "eslint-plugin-regexp": "^2.7.0",
103
- "eslint-plugin-svgo": "^0.7.0",
103
+ "eslint-plugin-svgo": "^0.7.1",
104
104
  "eslint-plugin-toml": "^0.12.0",
105
- "eslint-plugin-unicorn": "^57.0.0",
105
+ "eslint-plugin-unicorn": "^58.0.0",
106
106
  "eslint-plugin-vue": "^10.0.0",
107
107
  "eslint-plugin-yml": "^1.17.0",
108
108
  "eslint-processor-vue-blocks": "^2.0.0",
@@ -111,15 +111,15 @@
111
111
  "local-pkg": "^1.1.1",
112
112
  "prettier": "^3.5.3",
113
113
  "toml-eslint-parser": "^0.10.0",
114
- "typescript-eslint": "^8.26.1",
115
- "vue-eslint-parser": "^10.1.1",
114
+ "typescript-eslint": "^8.30.1",
115
+ "vue-eslint-parser": "^10.1.3",
116
116
  "yaml-eslint-parser": "^1.3.0"
117
117
  },
118
118
  "devDependencies": {
119
119
  "@ntnyq/prettier-config": "^2.0.0",
120
- "@types/node": "^22.13.10",
120
+ "@types/node": "^22.14.1",
121
121
  "bumpp": "^10.1.0",
122
- "eslint": "^9.22.0",
122
+ "eslint": "^9.24.0",
123
123
  "eslint-parser-plain": "^0.1.1",
124
124
  "eslint-plugin-eslint-plugin": "^6.4.0",
125
125
  "eslint-typegen": "^2.1.0",
@@ -129,10 +129,10 @@
129
129
  "npm-run-all2": "^7.0.2",
130
130
  "tinyglobby": "^0.2.12",
131
131
  "tsx": "^4.19.3",
132
- "typescript": "^5.8.2",
132
+ "typescript": "^5.8.3",
133
133
  "unbuild": "^3.5.0",
134
134
  "uncase": "^0.0.4",
135
- "vitest": "^3.0.8"
135
+ "vitest": "^3.1.1"
136
136
  },
137
137
  "engines": {
138
138
  "node": ">=18.18.0"