@ntnyq/eslint-config 4.0.0 → 4.0.2

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.d.mts CHANGED
@@ -7,8 +7,14 @@ export { configs as configsTypeScript, parser as parserTypeScript, plugin as plu
7
7
  import { Options as Options$1, BuiltInParserName } from 'prettier';
8
8
  import { ESLintPluginCommandOptions } from 'eslint-plugin-command/types';
9
9
  import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
10
- import { CreateConfigOptions } from 'eslint-plugin-github-action';
11
- export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
10
+ import * as vueEslintParser from 'vue-eslint-parser';
11
+ export { vueEslintParser as parserVue };
12
+ import * as tomlEslintParser from 'toml-eslint-parser';
13
+ export { tomlEslintParser as parserToml };
14
+ import * as yamlEslintParser from 'yaml-eslint-parser';
15
+ export { yamlEslintParser as parserYaml };
16
+ import * as jsoncEslintParser from 'jsonc-eslint-parser';
17
+ export { jsoncEslintParser as parserJsonc };
12
18
  import * as eslintPluginDepend from 'eslint-plugin-depend';
13
19
  export { eslintPluginDepend as pluginDepend };
14
20
  import * as eslintPluginRegexp from 'eslint-plugin-regexp';
@@ -32,17 +38,10 @@ export { default as pluginImportX } from 'eslint-plugin-import-x';
32
38
  export { default as pluginPrettier } from 'eslint-plugin-prettier';
33
39
  export { default as pluginDeMorgan } from 'eslint-plugin-de-morgan';
34
40
  export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
41
+ export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
35
42
  export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
36
43
  export { default as pluginComments } from '@eslint-community/eslint-plugin-eslint-comments';
37
44
  export { mergeProcessors, processorPassThrough } from 'eslint-merge-processors';
38
- import * as vueEslintParser from 'vue-eslint-parser';
39
- export { vueEslintParser as parserVue };
40
- import * as tomlEslintParser from 'toml-eslint-parser';
41
- export { tomlEslintParser as parserToml };
42
- import * as yamlEslintParser from 'yaml-eslint-parser';
43
- export { yamlEslintParser as parserYaml };
44
- import * as jsoncEslintParser from 'jsonc-eslint-parser';
45
- export { jsoncEslintParser as parserJsonc };
46
45
 
47
46
  /**
48
47
  * @file Type Utils
@@ -120,9 +119,14 @@ declare const configNode: (options?: ConfigNodeOptions) => TypedConfigItem[];
120
119
  /**
121
120
  * Options type of {@link configPnpm}
122
121
  */
123
- type ConfigPnpmOptions = OptionsFiles & OptionsOverrides;
122
+ type ConfigPnpmOptions = {
123
+ filesJson?: TypedConfigItem['files'];
124
+ filesYaml?: TypedConfigItem['files'];
125
+ overridesJsonRules?: TypedConfigItem['rules'];
126
+ overridesYamlRules?: TypedConfigItem['rules'];
127
+ };
124
128
  /**
125
- * Config for optimize logic
129
+ * Config for pnpm package manager
126
130
  *
127
131
  * @see {@link https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm}
128
132
  *
@@ -660,7 +664,7 @@ declare const configESLintPlugin: (options?: ConfigESLintPluginOptions) => Promi
660
664
  /**
661
665
  * Options type of {@link configGitHubAction}
662
666
  */
663
- type ConfigGitHubActionOptions = CreateConfigOptions & OptionsOverrides;
667
+ type ConfigGitHubActionOptions = OptionsFiles & OptionsOverrides;
664
668
  /**
665
669
  * Config for github action files
666
670
  *
@@ -2046,233 +2050,233 @@ interface RuleOptions {
2046
2050
  'implicit-arrow-linebreak'?: Linter.RuleEntry<ImplicitArrowLinebreak>
2047
2051
  /**
2048
2052
  * Enforce or ban the use of inline type-only markers for named imports.
2049
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/consistent-type-specifier-style.md
2053
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/consistent-type-specifier-style.md
2050
2054
  */
2051
2055
  'import-x/consistent-type-specifier-style'?: Linter.RuleEntry<ImportXConsistentTypeSpecifierStyle>
2052
2056
  /**
2053
2057
  * Ensure a default export is present, given a default import.
2054
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/default.md
2058
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/default.md
2055
2059
  */
2056
2060
  'import-x/default'?: Linter.RuleEntry<[]>
2057
2061
  /**
2058
2062
  * Enforce a leading comment with the webpackChunkName for dynamic imports.
2059
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/dynamic-import-chunkname.md
2063
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/dynamic-import-chunkname.md
2060
2064
  */
2061
2065
  'import-x/dynamic-import-chunkname'?: Linter.RuleEntry<ImportXDynamicImportChunkname>
2062
2066
  /**
2063
2067
  * Forbid any invalid exports, i.e. re-export of the same name.
2064
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/export.md
2068
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/export.md
2065
2069
  */
2066
2070
  'import-x/export'?: Linter.RuleEntry<[]>
2067
2071
  /**
2068
2072
  * Ensure all exports appear after other statements.
2069
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/exports-last.md
2073
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/exports-last.md
2070
2074
  */
2071
2075
  'import-x/exports-last'?: Linter.RuleEntry<[]>
2072
2076
  /**
2073
2077
  * Ensure consistent use of file extension within the import path.
2074
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/extensions.md
2078
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/extensions.md
2075
2079
  */
2076
2080
  'import-x/extensions'?: Linter.RuleEntry<ImportXExtensions>
2077
2081
  /**
2078
2082
  * Ensure all imports appear before other statements.
2079
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/first.md
2083
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/first.md
2080
2084
  */
2081
2085
  'import-x/first'?: Linter.RuleEntry<ImportXFirst>
2082
2086
  /**
2083
2087
  * Prefer named exports to be grouped together in a single export declaration.
2084
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/group-exports.md
2088
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/group-exports.md
2085
2089
  */
2086
2090
  'import-x/group-exports'?: Linter.RuleEntry<[]>
2087
2091
  /**
2088
2092
  * Replaced by `import-x/first`.
2089
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/imports-first.md
2093
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/imports-first.md
2090
2094
  * @deprecated
2091
2095
  */
2092
2096
  'import-x/imports-first'?: Linter.RuleEntry<ImportXImportsFirst>
2093
2097
  /**
2094
2098
  * Enforce the maximum number of dependencies a module can have.
2095
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/max-dependencies.md
2099
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/max-dependencies.md
2096
2100
  */
2097
2101
  'import-x/max-dependencies'?: Linter.RuleEntry<ImportXMaxDependencies>
2098
2102
  /**
2099
2103
  * Ensure named imports correspond to a named export in the remote file.
2100
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/named.md
2104
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/named.md
2101
2105
  */
2102
2106
  'import-x/named'?: Linter.RuleEntry<ImportXNamed>
2103
2107
  /**
2104
2108
  * Ensure imported namespaces contain dereferenced properties as they are dereferenced.
2105
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/namespace.md
2109
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/namespace.md
2106
2110
  */
2107
2111
  'import-x/namespace'?: Linter.RuleEntry<ImportXNamespace>
2108
2112
  /**
2109
2113
  * Enforce a newline after import statements.
2110
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/newline-after-import.md
2114
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/newline-after-import.md
2111
2115
  */
2112
2116
  'import-x/newline-after-import'?: Linter.RuleEntry<ImportXNewlineAfterImport>
2113
2117
  /**
2114
2118
  * Forbid import of modules using absolute paths.
2115
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-absolute-path.md
2119
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-absolute-path.md
2116
2120
  */
2117
2121
  'import-x/no-absolute-path'?: Linter.RuleEntry<ImportXNoAbsolutePath>
2118
2122
  /**
2119
2123
  * Forbid AMD `require` and `define` calls.
2120
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-amd.md
2124
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-amd.md
2121
2125
  */
2122
2126
  'import-x/no-amd'?: Linter.RuleEntry<[]>
2123
2127
  /**
2124
2128
  * Forbid anonymous values as default exports.
2125
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-anonymous-default-export.md
2129
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-anonymous-default-export.md
2126
2130
  */
2127
2131
  'import-x/no-anonymous-default-export'?: Linter.RuleEntry<ImportXNoAnonymousDefaultExport>
2128
2132
  /**
2129
2133
  * Forbid CommonJS `require` calls and `module.exports` or `exports.*`.
2130
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-commonjs.md
2134
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-commonjs.md
2131
2135
  */
2132
2136
  'import-x/no-commonjs'?: Linter.RuleEntry<ImportXNoCommonjs>
2133
2137
  /**
2134
2138
  * Forbid a module from importing a module with a dependency path back to itself.
2135
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-cycle.md
2139
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-cycle.md
2136
2140
  */
2137
2141
  'import-x/no-cycle'?: Linter.RuleEntry<ImportXNoCycle>
2138
2142
  /**
2139
2143
  * Forbid default exports.
2140
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-default-export.md
2144
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-default-export.md
2141
2145
  */
2142
2146
  'import-x/no-default-export'?: Linter.RuleEntry<[]>
2143
2147
  /**
2144
2148
  * Forbid imported names marked with `@deprecated` documentation tag.
2145
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-deprecated.md
2149
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-deprecated.md
2146
2150
  */
2147
2151
  'import-x/no-deprecated'?: Linter.RuleEntry<[]>
2148
2152
  /**
2149
2153
  * Forbid repeated import of the same module in multiple places.
2150
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-duplicates.md
2154
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-duplicates.md
2151
2155
  */
2152
2156
  'import-x/no-duplicates'?: Linter.RuleEntry<ImportXNoDuplicates>
2153
2157
  /**
2154
2158
  * Forbid `require()` calls with expressions.
2155
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-dynamic-require.md
2159
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-dynamic-require.md
2156
2160
  */
2157
2161
  'import-x/no-dynamic-require'?: Linter.RuleEntry<ImportXNoDynamicRequire>
2158
2162
  /**
2159
2163
  * Forbid empty named import blocks.
2160
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-empty-named-blocks.md
2164
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-empty-named-blocks.md
2161
2165
  */
2162
2166
  'import-x/no-empty-named-blocks'?: Linter.RuleEntry<[]>
2163
2167
  /**
2164
2168
  * Forbid the use of extraneous packages.
2165
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-extraneous-dependencies.md
2169
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-extraneous-dependencies.md
2166
2170
  */
2167
2171
  'import-x/no-extraneous-dependencies'?: Linter.RuleEntry<ImportXNoExtraneousDependencies>
2168
2172
  /**
2169
2173
  * Forbid import statements with CommonJS module.exports.
2170
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-import-module-exports.md
2174
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-import-module-exports.md
2171
2175
  */
2172
2176
  'import-x/no-import-module-exports'?: Linter.RuleEntry<ImportXNoImportModuleExports>
2173
2177
  /**
2174
2178
  * Forbid importing the submodules of other modules.
2175
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-internal-modules.md
2179
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-internal-modules.md
2176
2180
  */
2177
2181
  'import-x/no-internal-modules'?: Linter.RuleEntry<ImportXNoInternalModules>
2178
2182
  /**
2179
2183
  * Forbid the use of mutable exports with `var` or `let`.
2180
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-mutable-exports.md
2184
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-mutable-exports.md
2181
2185
  */
2182
2186
  'import-x/no-mutable-exports'?: Linter.RuleEntry<[]>
2183
2187
  /**
2184
2188
  * Forbid use of exported name as identifier of default export.
2185
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-as-default.md
2189
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-named-as-default.md
2186
2190
  */
2187
2191
  'import-x/no-named-as-default'?: Linter.RuleEntry<[]>
2188
2192
  /**
2189
2193
  * Forbid use of exported name as property of default export.
2190
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-as-default-member.md
2194
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-named-as-default-member.md
2191
2195
  */
2192
2196
  'import-x/no-named-as-default-member'?: Linter.RuleEntry<[]>
2193
2197
  /**
2194
2198
  * Forbid named default exports.
2195
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-default.md
2199
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-named-default.md
2196
2200
  */
2197
2201
  'import-x/no-named-default'?: Linter.RuleEntry<[]>
2198
2202
  /**
2199
2203
  * Forbid named exports.
2200
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-named-export.md
2204
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-named-export.md
2201
2205
  */
2202
2206
  'import-x/no-named-export'?: Linter.RuleEntry<[]>
2203
2207
  /**
2204
2208
  * Forbid namespace (a.k.a. "wildcard" `*`) imports.
2205
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-namespace.md
2209
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-namespace.md
2206
2210
  */
2207
2211
  'import-x/no-namespace'?: Linter.RuleEntry<ImportXNoNamespace>
2208
2212
  /**
2209
2213
  * Forbid Node.js builtin modules.
2210
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-nodejs-modules.md
2214
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-nodejs-modules.md
2211
2215
  */
2212
2216
  'import-x/no-nodejs-modules'?: Linter.RuleEntry<ImportXNoNodejsModules>
2213
2217
  /**
2214
2218
  * Forbid importing packages through relative paths.
2215
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-relative-packages.md
2219
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-relative-packages.md
2216
2220
  */
2217
2221
  'import-x/no-relative-packages'?: Linter.RuleEntry<ImportXNoRelativePackages>
2218
2222
  /**
2219
2223
  * Forbid importing modules from parent directories.
2220
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-relative-parent-imports.md
2224
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-relative-parent-imports.md
2221
2225
  */
2222
2226
  'import-x/no-relative-parent-imports'?: Linter.RuleEntry<ImportXNoRelativeParentImports>
2223
2227
  /**
2224
2228
  * Forbid importing a default export by a different name.
2225
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-rename-default.md
2229
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-rename-default.md
2226
2230
  */
2227
2231
  'import-x/no-rename-default'?: Linter.RuleEntry<ImportXNoRenameDefault>
2228
2232
  /**
2229
2233
  * Enforce which files can be imported in a given folder.
2230
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-restricted-paths.md
2234
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-restricted-paths.md
2231
2235
  */
2232
2236
  'import-x/no-restricted-paths'?: Linter.RuleEntry<ImportXNoRestrictedPaths>
2233
2237
  /**
2234
2238
  * Forbid a module from importing itself.
2235
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-self-import.md
2239
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-self-import.md
2236
2240
  */
2237
2241
  'import-x/no-self-import'?: Linter.RuleEntry<[]>
2238
2242
  /**
2239
2243
  * Forbid unassigned imports.
2240
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unassigned-import.md
2244
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-unassigned-import.md
2241
2245
  */
2242
2246
  'import-x/no-unassigned-import'?: Linter.RuleEntry<ImportXNoUnassignedImport>
2243
2247
  /**
2244
2248
  * Ensure imports point to a file/module that can be resolved.
2245
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unresolved.md
2249
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-unresolved.md
2246
2250
  */
2247
2251
  'import-x/no-unresolved'?: Linter.RuleEntry<ImportXNoUnresolved>
2248
2252
  /**
2249
2253
  * Forbid modules without exports, or exports without matching import in another module.
2250
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-unused-modules.md
2254
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-unused-modules.md
2251
2255
  */
2252
2256
  'import-x/no-unused-modules'?: Linter.RuleEntry<ImportXNoUnusedModules>
2253
2257
  /**
2254
2258
  * Forbid unnecessary path segments in import and require statements.
2255
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-useless-path-segments.md
2259
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-useless-path-segments.md
2256
2260
  */
2257
2261
  'import-x/no-useless-path-segments'?: Linter.RuleEntry<ImportXNoUselessPathSegments>
2258
2262
  /**
2259
2263
  * Forbid webpack loader syntax in imports.
2260
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/no-webpack-loader-syntax.md
2264
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/no-webpack-loader-syntax.md
2261
2265
  */
2262
2266
  'import-x/no-webpack-loader-syntax'?: Linter.RuleEntry<[]>
2263
2267
  /**
2264
2268
  * Enforce a convention in module import order.
2265
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/order.md
2269
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/order.md
2266
2270
  */
2267
2271
  'import-x/order'?: Linter.RuleEntry<ImportXOrder>
2268
2272
  /**
2269
2273
  * Prefer a default export if module exports a single name or multiple names.
2270
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/prefer-default-export.md
2274
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/prefer-default-export.md
2271
2275
  */
2272
2276
  'import-x/prefer-default-export'?: Linter.RuleEntry<ImportXPreferDefaultExport>
2273
2277
  /**
2274
2278
  * Forbid potentially ambiguous parse goal (`script` vs. `module`).
2275
- * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.6.1/docs/rules/unambiguous.md
2279
+ * @see https://github.com/un-ts/eslint-plugin-import-x/blob/v4.7.0/docs/rules/unambiguous.md
2276
2280
  */
2277
2281
  'import-x/unambiguous'?: Linter.RuleEntry<[]>
2278
2282
  /**
@@ -4189,19 +4193,29 @@ interface RuleOptions {
4189
4193
  'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>
4190
4194
  /**
4191
4195
  * Enforce using "catalog:" in `package.json`
4192
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/enforce-catalog.test.ts
4196
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-enforce-catalog.test.ts
4193
4197
  */
4194
- 'pnpm/enforce-catalog'?: Linter.RuleEntry<PnpmEnforceCatalog>
4198
+ 'pnpm/json-enforce-catalog'?: Linter.RuleEntry<PnpmJsonEnforceCatalog>
4195
4199
  /**
4196
4200
  * Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This would requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
4197
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/prefer-workspace-settings.test.ts
4201
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-prefer-workspace-settings.test.ts
4198
4202
  */
4199
- 'pnpm/prefer-workspace-settings'?: Linter.RuleEntry<PnpmPreferWorkspaceSettings>
4203
+ 'pnpm/json-prefer-workspace-settings'?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>
4200
4204
  /**
4201
4205
  * Enforce using valid catalog in `package.json`
4202
- * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/valid-catalog.test.ts
4206
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/json-valid-catalog.test.ts
4203
4207
  */
4204
- 'pnpm/valid-catalog'?: Linter.RuleEntry<PnpmValidCatalog>
4208
+ 'pnpm/json-valid-catalog'?: Linter.RuleEntry<PnpmJsonValidCatalog>
4209
+ /**
4210
+ * Disallow unused catalogs in `pnpm-workspace.yaml`
4211
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-duplicate-catalog-item.test.ts
4212
+ */
4213
+ 'pnpm/yaml-no-duplicate-catalog-item'?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>
4214
+ /**
4215
+ * Disallow unused catalogs in `pnpm-workspace.yaml`
4216
+ * @see https://github.com/antfu/eslint-plugin-pnpm/blob/main/src/rules/yaml-no-unused-catalog-item.test.ts
4217
+ */
4218
+ 'pnpm/yaml-no-unused-catalog-item'?: Linter.RuleEntry<[]>
4205
4219
  /**
4206
4220
  * Require using arrow functions for callbacks
4207
4221
  * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
@@ -8864,7 +8878,7 @@ type IdMatch = []|[string]|[string, {
8864
8878
  // ----- implicit-arrow-linebreak -----
8865
8879
  type ImplicitArrowLinebreak = []|[("beside" | "below")]
8866
8880
  // ----- import-x/consistent-type-specifier-style -----
8867
- type ImportXConsistentTypeSpecifierStyle = []|[("prefer-inline" | "prefer-top-level")]
8881
+ type ImportXConsistentTypeSpecifierStyle = []|[("prefer-top-level" | "prefer-inline")]
8868
8882
  // ----- import-x/dynamic-import-chunkname -----
8869
8883
  type ImportXDynamicImportChunkname = []|[{
8870
8884
  importFunctions?: string[]
@@ -13048,8 +13062,8 @@ type PiniaPreferUseStoreNamingConvention = []|[{
13048
13062
  storeSuffix?: string
13049
13063
  [k: string]: unknown | undefined
13050
13064
  }]
13051
- // ----- pnpm/enforce-catalog -----
13052
- type PnpmEnforceCatalog = []|[{
13065
+ // ----- pnpm/json-enforce-catalog -----
13066
+ type PnpmJsonEnforceCatalog = []|[{
13053
13067
 
13054
13068
  allowedProtocols?: string[]
13055
13069
 
@@ -13058,19 +13072,32 @@ type PnpmEnforceCatalog = []|[{
13058
13072
  defaultCatalog?: string
13059
13073
 
13060
13074
  reuseExistingCatalog?: boolean
13075
+
13076
+ conflicts?: ("new-catalog" | "overrides" | "error")
13077
+
13078
+ fields?: string[]
13061
13079
  }]
13062
- // ----- pnpm/prefer-workspace-settings -----
13063
- type PnpmPreferWorkspaceSettings = []|[{
13080
+ // ----- pnpm/json-prefer-workspace-settings -----
13081
+ type PnpmJsonPreferWorkspaceSettings = []|[{
13082
+
13064
13083
  autofix?: boolean
13065
13084
  }]
13066
- // ----- pnpm/valid-catalog -----
13067
- type PnpmValidCatalog = []|[{
13085
+ // ----- pnpm/json-valid-catalog -----
13086
+ type PnpmJsonValidCatalog = []|[{
13068
13087
 
13069
13088
  autoInsert?: boolean
13070
13089
 
13071
13090
  autoInsertDefaultSpecifier?: string
13072
13091
 
13073
13092
  autofix?: boolean
13093
+
13094
+ enforceNoConflict?: boolean
13095
+
13096
+ fields?: unknown[]
13097
+ }]
13098
+ // ----- pnpm/yaml-no-duplicate-catalog-item -----
13099
+ type PnpmYamlNoDuplicateCatalogItem = []|[{
13100
+ allow?: string[]
13074
13101
  }]
13075
13102
  // ----- prefer-arrow-callback -----
13076
13103
  type PreferArrowCallback = []|[{
@@ -15733,7 +15760,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
15733
15760
  onlyEquality?: boolean
15734
15761
  }]
15735
15762
  // Names of all the configs
15736
- 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/pnpm' | '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'
15763
+ 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/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | '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'
15737
15764
 
15738
15765
  /**
15739
15766
  * ESLint config
@@ -15909,14 +15936,15 @@ declare const GLOB_JSON5: string;
15909
15936
  declare const GLOB_JSONC: string;
15910
15937
  declare const GLOB_PACKAGE_JSON: string;
15911
15938
  declare const GLOB_TSCONFIG_JSON: string[];
15939
+ declare const GLOB_YAML: string;
15940
+ declare const GLOB_PNPM_WORKSPACE_YAML: string;
15912
15941
  declare const GLOB_SVG: string;
15913
15942
  declare const GLOB_VUE: string;
15914
- declare const GLOB_YAML: string;
15943
+ declare const GLOB_SVELTE: string;
15915
15944
  declare const GLOB_TOML: string;
15916
15945
  declare const GLOB_HTML: string;
15917
15946
  declare const GLOB_ASTRO: string;
15918
15947
  declare const GLOB_ASTRO_TS: string;
15919
- declare const GLOB_SVELTE: string;
15920
15948
  declare const GLOB_MARKDOWN: string;
15921
15949
  declare const GLOB_MARKDOWN_CODE: string;
15922
15950
  declare const GLOB_MARKDOWN_NESTED: string;
@@ -15966,14 +15994,36 @@ declare function mergePrettierOptions(options?: PrettierOptions, overrides?: Pre
15966
15994
 
15967
15995
  declare function isInGitHooksOrRunBySpecifyPackages(): boolean;
15968
15996
 
15969
- /**
15970
- * @file ESLint parsers
15971
- */
15997
+ declare const parseForESLint: (code: string) => {
15998
+ ast: {
15999
+ type: string;
16000
+ loc: {
16001
+ start: number;
16002
+ end: number;
16003
+ };
16004
+ range: number[];
16005
+ body: never[];
16006
+ comments: never[];
16007
+ tokens: never[];
16008
+ };
16009
+ services: {
16010
+ isPlain: boolean;
16011
+ };
16012
+ scopeManager: null;
16013
+ visitorKeys: {
16014
+ Program: never[];
16015
+ };
16016
+ };
16017
+ declare const meta: {
16018
+ name: string;
16019
+ version: string;
16020
+ };
15972
16021
 
15973
- /**
15974
- * @copyright {@link https://github.com/so1ve/eslint-parser-plain}
15975
- */
15976
- declare const parserPlain: ESLintParser;
16022
+ declare const index_d_meta: typeof meta;
16023
+ declare const index_d_parseForESLint: typeof parseForESLint;
16024
+ declare namespace index_d {
16025
+ export { index_d_meta as meta, index_d_parseForESLint as parseForESLint };
16026
+ }
15977
16027
 
15978
16028
  /**
15979
16029
  * Options from `@ntnyq/prettier-config`
@@ -16042,4 +16092,4 @@ declare const PERFECTIONIST_SORT_IMPORTS_GROUPS: string[];
16042
16092
  */
16043
16093
  declare const PERFECTIONIST_SORT_CLASSES_GROUPS: string[];
16044
16094
 
16045
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigDeMorganOptions, type ConfigDependOptions, type ConfigESLintCommentsOptions, type ConfigESLintPluginOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportXOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigOptionsInternal, type ConfigPerfectionistOptions, type ConfigPiniaOptions, type ConfigPnpmOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSVGOOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, type ESLintRuleSeverity, type ESLintRulesRecord, 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_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, type InteropModuleDefault, type OptionsFiles, type OptionsIgnores, type OptionsOverrides, type OptionsShareable, 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, type PerfectionistPartitionByComment, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, 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 };
16095
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigDeMorganOptions, type ConfigDependOptions, type ConfigESLintCommentsOptions, type ConfigESLintPluginOptions, type ConfigFormatOptions, type ConfigGitHubActionOptions, type ConfigGitIgnoreOptions, type ConfigIgnoresOptions, type ConfigImportXOptions, type ConfigJavaScriptOptions, type ConfigJsdocOptions, type ConfigJsoncOptions, type ConfigMarkdownOptions, type ConfigNames, type ConfigNodeOptions, type ConfigNtnyqOptions, type ConfigOptions, type ConfigOptionsInternal, type ConfigPerfectionistOptions, type ConfigPiniaOptions, type ConfigPnpmOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSVGOOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, type ESLintRuleSeverity, type ESLintRulesRecord, 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, type InteropModuleDefault, type OptionsFiles, type OptionsIgnores, type OptionsOverrides, type OptionsShareable, 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, type PerfectionistPartitionByComment, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, 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, index_d as parserPlain, resolveSubOptions };
package/dist/index.mjs CHANGED
@@ -53,7 +53,7 @@ import pluginDeMorgan from 'eslint-plugin-de-morgan';
53
53
  export { default as pluginDeMorgan } from 'eslint-plugin-de-morgan';
54
54
  import pluginNoOnlyTests from 'eslint-plugin-no-only-tests';
55
55
  export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
56
- import { createConfig } from 'eslint-plugin-github-action';
56
+ import pluginGitHubAction from 'eslint-plugin-github-action';
57
57
  export { default as pluginGitHubAction } from 'eslint-plugin-github-action';
58
58
  import pluginPerfectionist from 'eslint-plugin-perfectionist';
59
59
  export { default as pluginPerfectionist } from 'eslint-plugin-perfectionist';
@@ -72,25 +72,33 @@ import globals from 'globals';
72
72
  import createGitIgnoreConfig from 'eslint-config-flat-gitignore';
73
73
  import jsConfig from '@eslint/js';
74
74
 
75
- const parserPlain = {
76
- meta: {
77
- name: "plain-eslint-parser"
75
+ const name = "eslint-parser-plain";
76
+ const version = "0.1.1";
77
+
78
+ const parseForESLint = (code) => ({
79
+ ast: {
80
+ type: "Program",
81
+ loc: { start: 0, end: code.length },
82
+ range: [0, code.length],
83
+ body: [],
84
+ comments: [],
85
+ tokens: []
78
86
  },
79
- parseForESLint: (code) => ({
80
- ast: {
81
- body: [],
82
- comments: [],
83
- loc: { start: 0, end: code.length },
84
- range: [0, code.length],
85
- tokens: [],
86
- type: "Program"
87
- },
88
- scopeManager: null,
89
- services: { isPlain: true },
90
- visitorKeys: {
91
- Program: []
92
- }
93
- })
87
+ services: { isPlain: true },
88
+ scopeManager: null,
89
+ visitorKeys: {
90
+ Program: []
91
+ }
92
+ });
93
+ const meta = {
94
+ name: name,
95
+ version: version
96
+ };
97
+
98
+ const parserPlain = {
99
+ __proto__: null,
100
+ meta: meta,
101
+ parseForESLint: parseForESLint
94
102
  };
95
103
 
96
104
  const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -131,14 +139,15 @@ const GLOB_TSCONFIG_JSON = [
131
139
  "**/tsconfig.json",
132
140
  "**/tsconfig.*.json"
133
141
  ];
142
+ const GLOB_YAML = "**/*.y?(a)ml";
143
+ const GLOB_PNPM_WORKSPACE_YAML = "**/pnpm-workspace.yaml";
134
144
  const GLOB_SVG = "**/*.svg";
135
145
  const GLOB_VUE = "**/*.vue";
136
- const GLOB_YAML = "**/*.y?(a)ml";
146
+ const GLOB_SVELTE = "**/*.svelte";
137
147
  const GLOB_TOML = "**/*.toml";
138
148
  const GLOB_HTML = "**/*.htm?(l)";
139
149
  const GLOB_ASTRO = "**/*.astro";
140
150
  const GLOB_ASTRO_TS = "**/*.astro/*.ts";
141
- const GLOB_SVELTE = "**/*.svelte";
142
151
  const GLOB_MARKDOWN = "**/*.md";
143
152
  const GLOB_MARKDOWN_CODE = `${GLOB_MARKDOWN}/${GLOB_SRC}`;
144
153
  const GLOB_MARKDOWN_NESTED = `${GLOB_MARKDOWN}/*.md`;
@@ -618,11 +627,14 @@ const configNode = (options = {}) => [
618
627
  ];
619
628
 
620
629
  const configPnpm = (options = {}) => {
621
- const { files = [GLOB_PACKAGE_JSON] } = options;
630
+ const {
631
+ filesJson = [GLOB_PACKAGE_JSON],
632
+ filesYaml = [GLOB_PNPM_WORKSPACE_YAML]
633
+ } = options;
622
634
  return [
623
635
  {
624
- name: "ntnyq/pnpm",
625
- files,
636
+ name: "ntnyq/pnpm/package-json",
637
+ files: filesJson,
626
638
  plugins: {
627
639
  pnpm: pluginPnpm
628
640
  },
@@ -630,15 +642,31 @@ const configPnpm = (options = {}) => {
630
642
  parser: parserJsonc
631
643
  },
632
644
  rules: {
633
- "pnpm/enforce-catalog": [
645
+ "pnpm/json-enforce-catalog": [
634
646
  "error",
635
647
  {
636
648
  autofix: true
637
649
  }
638
650
  ],
639
- "pnpm/valid-catalog": "error",
651
+ "pnpm/json-valid-catalog": "error",
640
652
  // Overrides rules
641
- ...options.overrides
653
+ ...options.overridesJsonRules
654
+ }
655
+ },
656
+ {
657
+ name: "ntnyq/pnpm/pnpm-workspace-yaml",
658
+ files: filesYaml,
659
+ plugins: {
660
+ pnpm: pluginPnpm
661
+ },
662
+ languageOptions: {
663
+ parser: parserYaml
664
+ },
665
+ rules: {
666
+ "pnpm/yaml-no-duplicate-catalog-item": "error",
667
+ "pnpm/yaml-no-unused-catalog-item": "error",
668
+ // Overrides rules
669
+ ...options.overridesYamlRules
642
670
  }
643
671
  }
644
672
  ];
@@ -1097,8 +1125,13 @@ const configSort = (options = {}) => {
1097
1125
  "jsonc/sort-keys": [
1098
1126
  "error",
1099
1127
  {
1100
- order: { type: "asc" },
1101
- pathPattern: ".*"
1128
+ pathPattern: ".*",
1129
+ order: [
1130
+ "$schema",
1131
+ {
1132
+ order: { type: "asc" }
1133
+ }
1134
+ ]
1102
1135
  }
1103
1136
  ]
1104
1137
  }
@@ -1145,7 +1178,7 @@ const configSVGO = (options = {}) => {
1145
1178
  const hasPinia = () => isPackageExists("pinia");
1146
1179
  const hasVitest = () => isPackageExists("vitest");
1147
1180
  const hasTypeScript = () => isPackageExists("typescript");
1148
- const hasShadcnVue = () => isPackageExists("radix-vue") && isPackageExists("clsx");
1181
+ const hasShadcnVue = () => (isPackageExists("radix-vue") || isPackageExists("reka-ui")) && isPackageExists("class-variance-authority") && isPackageExists("clsx");
1149
1182
  const hasUnoCSS = () => isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
1150
1183
  const hasVue = () => isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("vuepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
1151
1184
  paths: [
@@ -2349,6 +2382,8 @@ const configSpecials = (options = {}) => {
2349
2382
  "@typescript-eslint/no-unused-vars": "off",
2350
2383
  "import-x/consistent-type-specifier-style": "off",
2351
2384
  "vue/define-emits-declaration": "off",
2385
+ "vue/html-button-has-type": "off",
2386
+ "vue/no-duplicate-attr-inheritance": "off",
2352
2387
  // Overrides rules
2353
2388
  ...shadcnOptions.overridesRules
2354
2389
  }
@@ -2852,24 +2887,27 @@ const configESLintPlugin = async (options = {}) => {
2852
2887
 
2853
2888
  const configGitHubAction = (options = {}) => {
2854
2889
  const {
2890
+ //
2855
2891
  files = [GLOB_GITHUB_ACTION],
2856
- rules = {},
2857
- overrides: overridesRules = {},
2858
- ...restOptions
2892
+ overrides: overridesRules = {}
2859
2893
  } = options;
2860
2894
  return [
2861
- createConfig({
2895
+ {
2862
2896
  name: "ntnyq/github-action",
2863
2897
  files,
2898
+ plugins: {
2899
+ "github-action": pluginGitHubAction
2900
+ },
2901
+ languageOptions: {
2902
+ parser: parserYaml
2903
+ },
2864
2904
  rules: {
2865
2905
  "github-action/no-invalid-key": "error",
2866
2906
  "github-action/prefer-file-extension": "error",
2867
2907
  "github-action/require-action-name": "error",
2868
- ...rules,
2869
2908
  ...overridesRules
2870
- },
2871
- ...restOptions
2872
- })
2909
+ }
2910
+ }
2873
2911
  ];
2874
2912
  };
2875
2913
 
@@ -3380,12 +3418,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3380
3418
  );
3381
3419
  }
3382
3420
  if (enablePnpm) {
3383
- configs.push(
3384
- configPnpm({
3385
- ...resolveSubOptions(options, "pnpm"),
3386
- overrides: getOverrides(options, "pnpm")
3387
- })
3388
- );
3421
+ configs.push(configPnpm(resolveSubOptions(options, "pnpm")));
3389
3422
  }
3390
3423
  if (enableSVGO) {
3391
3424
  configs.push(configSVGO(resolveSubOptions(options, "svgo")));
@@ -3406,4 +3439,4 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3406
3439
  return composer;
3407
3440
  }
3408
3441
 
3409
- 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_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 };
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 };
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",
5
- "packageManager": "pnpm@10.6.1",
4
+ "version": "4.0.2",
5
+ "packageManager": "pnpm@10.6.3",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -47,9 +47,10 @@
47
47
  "generate:type": "tsx scripts/generateType.ts",
48
48
  "lint": "eslint --cache",
49
49
  "prepare": "husky",
50
- "release": "run-s release:check release:version",
50
+ "release": "run-s release:check release:version release:publish",
51
51
  "release:check": "run-s build lint typecheck",
52
- "release:version": "bumpp && npm publish --tag next",
52
+ "release:publish": "npm publish",
53
+ "release:version": "bumpp",
53
54
  "stub": "unbuild --stub",
54
55
  "test": "vitest",
55
56
  "typecheck": "tsc --noEmit"
@@ -77,29 +78,29 @@
77
78
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
78
79
  "@eslint/js": "^9.22.0",
79
80
  "@eslint/markdown": "^6.3.0",
80
- "@unocss/eslint-plugin": "^66.1.0-beta.3",
81
- "@vitest/eslint-plugin": "^1.1.36",
81
+ "@unocss/eslint-plugin": "^66.1.0-beta.5",
82
+ "@vitest/eslint-plugin": "^1.1.37",
82
83
  "eslint-config-flat-gitignore": "^2.1.0",
83
84
  "eslint-flat-config-utils": "^2.0.1",
84
- "eslint-import-resolver-typescript": "^3.8.3",
85
+ "eslint-import-resolver-typescript": "^3.9.0",
85
86
  "eslint-merge-processors": "^2.0.0",
86
87
  "eslint-plugin-antfu": "^3.1.1",
87
88
  "eslint-plugin-command": "^3.1.0",
88
- "eslint-plugin-de-morgan": "^1.2.0",
89
+ "eslint-plugin-de-morgan": "^1.2.1",
89
90
  "eslint-plugin-depend": "^0.12.0",
90
- "eslint-plugin-github-action": "^0.0.14",
91
- "eslint-plugin-import-x": "^4.6.1",
92
- "eslint-plugin-jsdoc": "^50.6.3",
91
+ "eslint-plugin-github-action": "^0.0.15",
92
+ "eslint-plugin-import-x": "^4.7.0",
93
+ "eslint-plugin-jsdoc": "^50.6.6",
93
94
  "eslint-plugin-jsonc": "^2.19.1",
94
95
  "eslint-plugin-n": "^17.16.2",
95
96
  "eslint-plugin-no-only-tests": "^3.3.0",
96
- "eslint-plugin-ntnyq": "^0.10.0",
97
+ "eslint-plugin-ntnyq": "^0.11.0",
97
98
  "eslint-plugin-perfectionist": "^4.10.1",
98
99
  "eslint-plugin-pinia": "^0.4.1",
99
- "eslint-plugin-pnpm": "^0.1.2",
100
+ "eslint-plugin-pnpm": "^0.3.1",
100
101
  "eslint-plugin-prettier": "^5.2.3",
101
102
  "eslint-plugin-regexp": "^2.7.0",
102
- "eslint-plugin-svgo": "^0.6.0",
103
+ "eslint-plugin-svgo": "^0.7.0",
103
104
  "eslint-plugin-toml": "^0.12.0",
104
105
  "eslint-plugin-unicorn": "^57.0.0",
105
106
  "eslint-plugin-vue": "^10.0.0",
@@ -110,17 +111,18 @@
110
111
  "local-pkg": "^1.1.1",
111
112
  "prettier": "^3.5.3",
112
113
  "toml-eslint-parser": "^0.10.0",
113
- "typescript-eslint": "^8.26.0",
114
+ "typescript-eslint": "^8.26.1",
114
115
  "vue-eslint-parser": "^10.1.1",
115
116
  "yaml-eslint-parser": "^1.3.0"
116
117
  },
117
118
  "devDependencies": {
118
119
  "@ntnyq/prettier-config": "^2.0.0",
119
120
  "@types/node": "^22.13.10",
120
- "bumpp": "^10.0.3",
121
+ "bumpp": "^10.1.0",
121
122
  "eslint": "^9.22.0",
123
+ "eslint-parser-plain": "^0.1.1",
122
124
  "eslint-plugin-eslint-plugin": "^6.4.0",
123
- "eslint-typegen": "^2.0.0",
125
+ "eslint-typegen": "^2.1.0",
124
126
  "husky": "^9.1.7",
125
127
  "jiti": "^2.4.2",
126
128
  "nano-staged": "^0.8.0",
@@ -135,15 +137,6 @@
135
137
  "engines": {
136
138
  "node": ">=18.18.0"
137
139
  },
138
- "resolutions": {
139
- "@shikijs/core": "^3.1.0",
140
- "@shikijs/markdown-it": "^3.1.0",
141
- "@shikijs/rehype": "^3.1.0",
142
- "@shikijs/transformers": "^3.1.0",
143
- "@shikijs/types": "^3.1.0",
144
- "esbuild": "^0.25.0",
145
- "shiki": "^3.1.0"
146
- },
147
140
  "nano-staged": {
148
141
  "*.{js,ts,mjs,cjs,md,vue,svg,yml,yaml,toml,json}": "eslint --fix",
149
142
  "*.{css,scss,html}": "prettier -uw"