@ntnyq/eslint-config 4.0.0-beta.8 → 4.0.0-beta.9

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 CHANGED
@@ -20,7 +20,7 @@
20
20
  ## Install
21
21
 
22
22
  ```shell
23
- pnpm add eslint prettier typescript @ntnyq/eslint-config @ntnyq/prettier-config -D
23
+ pnpm add eslint typescript @ntnyq/eslint-config -D
24
24
  ```
25
25
 
26
26
  ## Usage
@@ -53,7 +53,14 @@ Add scripts `lint` in `package.json`:
53
53
 
54
54
  ## Prettier config
55
55
 
56
+ Install `prettier` and setup your prettier config:
57
+
58
+ ```shell
59
+ pnpm add prettier @ntnyq/prettier-config -D
60
+ ```
61
+
56
62
  ```js
63
+ // prettier.config.mjs
57
64
  // @ts-check
58
65
 
59
66
  import { config, defineConfig } from '@ntnyq/prettier-config'
package/dist/index.d.ts CHANGED
@@ -512,6 +512,10 @@ interface ConfigSpecialsOptions {
512
512
  * Overrides cli rules
513
513
  */
514
514
  overridesCliRules?: TypedConfigItem['rules'];
515
+ /**
516
+ * Overrides bin rules
517
+ */
518
+ overridesBinRules?: TypedConfigItem['rules'];
515
519
  /**
516
520
  * Overrides config files rules
517
521
  */
@@ -7477,6 +7481,8 @@ type TypescriptEslintExplicitModuleBoundaryTypes = []|[{
7477
7481
 
7478
7482
  allowHigherOrderFunctions?: boolean
7479
7483
 
7484
+ allowOverloadFunctions?: boolean
7485
+
7480
7486
  allowTypedFunctionExpressions?: boolean
7481
7487
  }]
7482
7488
  // ----- @typescript-eslint/init-declarations -----
@@ -8508,6 +8514,8 @@ type TypescriptEslintUnboundMethod = []|[{
8508
8514
  type TypescriptEslintUnifiedSignatures = []|[{
8509
8515
 
8510
8516
  ignoreDifferentlyNamedParameters?: boolean
8517
+
8518
+ ignoreOverloadsWithDifferentJSDoc?: boolean
8511
8519
  }]
8512
8520
  // ----- accessor-pairs -----
8513
8521
  type AccessorPairs = []|[{
@@ -10910,7 +10918,18 @@ type NodeNoRestrictedRequire = []|[(string | {
10910
10918
  // ----- node/no-sync -----
10911
10919
  type NodeNoSync = []|[{
10912
10920
  allowAtRootLevel?: boolean
10913
- ignores?: string[]
10921
+ ignores?: (string | {
10922
+ from?: "file"
10923
+ path?: string
10924
+ name?: string[]
10925
+ } | {
10926
+ from?: "lib"
10927
+ name?: string[]
10928
+ } | {
10929
+ from?: "package"
10930
+ package?: string
10931
+ name?: string[]
10932
+ })[]
10914
10933
  }]
10915
10934
  // ----- node/no-unpublished-bin -----
10916
10935
  type NodeNoUnpublishedBin = []|[{
@@ -15506,7 +15525,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
15506
15525
  onlyEquality?: boolean
15507
15526
  }]
15508
15527
  // Names of all the configs
15509
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/de-morgan' | 'ntnyq/eslint-comments' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/eslint-plugin' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/import-x' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/pinia' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/svgo' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yml'
15528
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/de-morgan' | 'ntnyq/eslint-comments' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/eslint-plugin' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/ignores' | 'ntnyq/import-x' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/pinia' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/svgo' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yml'
15510
15529
 
15511
15530
  /**
15512
15531
  * ESLint config
package/dist/index.js CHANGED
@@ -2198,6 +2198,17 @@ var configSpecials = (options = {}) => {
2198
2198
  ...options.overridesCliRules
2199
2199
  }
2200
2200
  },
2201
+ {
2202
+ name: "ntnyq/specials/bin",
2203
+ files: [`**/bin/${GLOB_SRC}`, `**/bin.${GLOB_SRC_EXT}`],
2204
+ rules: {
2205
+ "@typescript-eslint/explicit-function-return-type": "off",
2206
+ "antfu/no-import-dist": "off",
2207
+ "no-console": "off",
2208
+ // Overrides rules
2209
+ ...options.overridesBinRules
2210
+ }
2211
+ },
2201
2212
  {
2202
2213
  name: "ntnyq/specials/userscript",
2203
2214
  files: [`**/*.user.${GLOB_SRC_EXT}`],
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.8",
5
- "packageManager": "pnpm@10.4.1",
4
+ "version": "4.0.0-beta.9",
5
+ "packageManager": "pnpm@10.5.2",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -66,61 +66,63 @@
66
66
  "@antfu/install-pkg": "^1.0.0",
67
67
  "@clack/prompts": "^0.10.0",
68
68
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
69
- "@eslint/js": "^9.20.0",
69
+ "@eslint/js": "^9.21.0",
70
70
  "@eslint/markdown": "^6.2.2",
71
71
  "@unocss/eslint-plugin": "^66.0.0",
72
- "@vitest/eslint-plugin": "^1.1.31",
72
+ "@vitest/eslint-plugin": "^1.1.36",
73
73
  "eslint-config-flat-gitignore": "^2.1.0",
74
74
  "eslint-flat-config-utils": "^2.0.1",
75
- "eslint-import-resolver-typescript": "^3.8.2",
75
+ "eslint-import-resolver-typescript": "^3.8.3",
76
76
  "eslint-merge-processors": "^2.0.0",
77
77
  "eslint-plugin-antfu": "^3.1.0",
78
78
  "eslint-plugin-command": "^3.1.0",
79
- "eslint-plugin-de-morgan": "^1.0.1",
79
+ "eslint-plugin-de-morgan": "^1.2.0",
80
80
  "eslint-plugin-depend": "^0.12.0",
81
81
  "eslint-plugin-format": "^1.0.1",
82
82
  "eslint-plugin-github-action": "^0.0.14",
83
83
  "eslint-plugin-import-x": "^4.6.1",
84
84
  "eslint-plugin-jsdoc": "^50.6.3",
85
85
  "eslint-plugin-jsonc": "^2.19.1",
86
- "eslint-plugin-n": "^17.15.1",
86
+ "eslint-plugin-n": "^17.16.1",
87
87
  "eslint-plugin-no-only-tests": "^3.3.0",
88
88
  "eslint-plugin-ntnyq": "^0.9.2",
89
89
  "eslint-plugin-perfectionist": "^4.9.0",
90
90
  "eslint-plugin-pinia": "^0.4.1",
91
91
  "eslint-plugin-prettier": "^5.2.3",
92
92
  "eslint-plugin-regexp": "^2.7.0",
93
- "eslint-plugin-svgo": "^0.5.2",
93
+ "eslint-plugin-svgo": "^0.6.0",
94
94
  "eslint-plugin-toml": "^0.12.0",
95
95
  "eslint-plugin-unicorn": "^57.0.0",
96
96
  "eslint-plugin-unused-imports": "^4.1.4",
97
97
  "eslint-plugin-vue": "^9.32.0",
98
98
  "eslint-plugin-yml": "^1.17.0",
99
99
  "eslint-processor-vue-blocks": "^2.0.0",
100
- "globals": "^15.15.0",
100
+ "globals": "^16.0.0",
101
101
  "jsonc-eslint-parser": "^2.4.0",
102
- "local-pkg": "^1.0.0",
103
- "prettier": "^3.5.1",
102
+ "local-pkg": "^1.1.1",
103
+ "prettier": "^3.5.3",
104
104
  "toml-eslint-parser": "^0.10.0",
105
- "typescript-eslint": "^8.24.1",
105
+ "typescript-eslint": "^8.26.0",
106
106
  "vue-eslint-parser": "^9.4.3",
107
- "yaml-eslint-parser": "^1.2.3"
107
+ "yaml-eslint-parser": "^1.3.0"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@ntnyq/prettier-config": "^2.0.0",
111
- "@types/node": "^22.13.4",
111
+ "@types/node": "^22.13.9",
112
112
  "bumpp": "^10.0.3",
113
- "eslint": "^9.20.1",
113
+ "eslint": "^9.21.0",
114
114
  "eslint-plugin-eslint-plugin": "^6.4.0",
115
115
  "eslint-typegen": "^2.0.0",
116
116
  "husky": "^9.1.7",
117
117
  "jiti": "^2.4.2",
118
118
  "nano-staged": "^0.8.0",
119
119
  "npm-run-all2": "^7.0.2",
120
- "tsup": "^8.3.6",
121
- "tsx": "^4.19.2",
122
- "typescript": "^5.7.3",
123
- "vitest": "^3.0.6"
120
+ "tinyglobby": "^0.2.12",
121
+ "tsup": "^8.4.0",
122
+ "tsx": "^4.19.3",
123
+ "typescript": "^5.8.2",
124
+ "uncase": "^0.0.4",
125
+ "vitest": "^3.0.7"
124
126
  },
125
127
  "engines": {
126
128
  "node": ">=18.18.0"
@@ -131,13 +133,13 @@
131
133
  ]
132
134
  },
133
135
  "resolutions": {
134
- "@shikijs/core": "^3.0.0",
135
- "@shikijs/markdown-it": "^3.0.0",
136
- "@shikijs/rehype": "^3.0.0",
137
- "@shikijs/transformers": "^3.0.0",
138
- "@shikijs/types": "^3.0.0",
136
+ "@shikijs/core": "^3.1.0",
137
+ "@shikijs/markdown-it": "^3.1.0",
138
+ "@shikijs/rehype": "^3.1.0",
139
+ "@shikijs/transformers": "^3.1.0",
140
+ "@shikijs/types": "^3.1.0",
139
141
  "esbuild": "^0.25.0",
140
- "shiki": "^3.0.0"
142
+ "shiki": "^3.1.0"
141
143
  },
142
144
  "nano-staged": {
143
145
  "*.{js,ts,mjs,cjs,md,vue,svg,yml,yaml,json}": "eslint --fix",