@ntnyq/eslint-config 3.8.1 → 3.9.0

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
@@ -110,55 +110,36 @@ Check for detail in:
110
110
 
111
111
  ```ts
112
112
  export interface ConfigOptions extends ConfigOptionsInternal {
113
- node?: ConfigNodeOptions
114
-
115
- jsdoc?: ConfigJsdocOptions
116
-
117
- ignores?: ConfigIgnoresOptions
118
-
119
- importX?: ConfigImportsOptions
120
-
121
113
  command?: ConfigCommandOptions
122
-
123
114
  comments?: ConfigCommentsOptions
124
-
115
+ ignores?: ConfigIgnoresOptions
116
+ importX?: ConfigImportXOptions
125
117
  javascript?: ConfigJavaScriptOptions
126
-
118
+ jsdoc?: ConfigJsdocOptions
119
+ node?: ConfigNodeOptions
127
120
  specials?: ConfigSpecialsOptions
128
121
 
129
- sort?: boolean | ConfigSortOptions
130
-
122
+ /**
123
+ * bellow can be disabled
124
+ */
125
+ antfu?: boolean | ConfigAntfuOptions
126
+ githubAction?: boolean | ConfigGitHubActionOptions
131
127
  gitignore?: boolean | ConfigGitIgnoreOptions
132
-
128
+ jsonc?: boolean | ConfigJsoncOptions
129
+ markdown?: boolean | ConfigMarkdownOptions
130
+ perfectionist?: boolean | ConfigPerfectionistOptions
131
+ pinia?: boolean | ConfigPiniaOptions
132
+ prettier?: boolean | ConfigPrettierOptions
133
+ regexp?: boolean | ConfigRegexpOptions
134
+ sort?: boolean | ConfigSortOptions
133
135
  stylistic?: boolean | ConfigStylisticOptions
134
-
136
+ test?: boolean | ConfigTestOptions
137
+ toml?: boolean | ConfigTomlOptions
135
138
  typescript?: boolean | ConfigTypeScriptOptions
136
-
137
139
  unicorn?: boolean | ConfigUnicornOptions
138
-
139
- prettier?: boolean | ConfigPrettierOptions
140
-
141
- perfectionist?: boolean | ConfigPerfectionistOptions
142
-
143
140
  unocss?: boolean | ConfigUnoCSSOptions
144
-
145
- regexp?: boolean | ConfigRegexpOptions
146
-
147
- jsonc?: boolean | ConfigJsoncOptions
148
-
149
- yml?: boolean | ConfigYmlOptions
150
-
151
- markdown?: boolean | ConfigMarkdownOptions
152
-
153
- toml?: boolean | ConfigTomlOptions
154
-
155
141
  vue?: boolean | ConfigVueOptions
156
-
157
- test?: boolean | ConfigTestOptions
158
-
159
- antfu?: boolean | ConfigAntfuOptions
160
-
161
- githubAction?: boolean | ConfigGitHubActionOptions
142
+ yml?: boolean | ConfigYmlOptions
162
143
  }
163
144
  ```
164
145
 
package/dist/index.cjs CHANGED
@@ -51,6 +51,7 @@ __export(src_exports, {
51
51
  GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
52
52
  GLOB_MARKDOWN_NESTED: () => GLOB_MARKDOWN_NESTED,
53
53
  GLOB_NODE_MODULES: () => GLOB_NODE_MODULES,
54
+ GLOB_PINIA_STORE: () => GLOB_PINIA_STORE,
54
55
  GLOB_POSTCSS: () => GLOB_POSTCSS,
55
56
  GLOB_SCSS: () => GLOB_SCSS,
56
57
  GLOB_SRC: () => GLOB_SRC,
@@ -73,6 +74,7 @@ __export(src_exports, {
73
74
  getOverrides: () => getOverrides,
74
75
  githubAction: () => githubAction,
75
76
  gitignore: () => gitignore,
77
+ hasPinia: () => hasPinia,
76
78
  hasTypeScript: () => hasTypeScript,
77
79
  hasUnoCSS: () => hasUnoCSS,
78
80
  hasVitest: () => hasVitest,
@@ -97,6 +99,7 @@ __export(src_exports, {
97
99
  parserVue: () => parserVue,
98
100
  parserYaml: () => parserYaml,
99
101
  perfectionist: () => perfectionist,
102
+ pinia: () => pinia,
100
103
  pluginAntfu: () => import_eslint_plugin_antfu.default,
101
104
  pluginComments: () => import_eslint_plugin_eslint_comments.default,
102
105
  pluginEsX: () => import_eslint_plugin_es_x.default,
@@ -109,6 +112,7 @@ __export(src_exports, {
109
112
  pluginNode: () => import_eslint_plugin_n.default,
110
113
  pluginNtnyq: () => import_eslint_plugin_ntnyq.default,
111
114
  pluginPerfectionist: () => import_eslint_plugin_perfectionist.default,
115
+ pluginPinia: () => import_eslint_plugin_pinia.default,
112
116
  pluginPrettier: () => import_eslint_plugin_prettier.default,
113
117
  pluginRegexp: () => pluginRegexp,
114
118
  pluginStylistic: () => import_eslint_plugin3.default,
@@ -183,6 +187,7 @@ var import_eslint_plugin_vue = __toESM(require("eslint-plugin-vue"), 1);
183
187
  var import_eslint_plugin_es_x = __toESM(require("eslint-plugin-es-x"), 1);
184
188
  var import_eslint_plugin_yml = __toESM(require("eslint-plugin-yml"), 1);
185
189
  var import_eslint_plugin_toml = __toESM(require("eslint-plugin-toml"), 1);
190
+ var import_eslint_plugin_pinia = __toESM(require("eslint-plugin-pinia"), 1);
186
191
  var import_eslint_plugin_ntnyq = __toESM(require("eslint-plugin-ntnyq"), 1);
187
192
  var import_markdown = __toESM(require("@eslint/markdown"), 1);
188
193
  var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
@@ -253,6 +258,7 @@ var GLOB_ALL_SRC = [
253
258
  GLOB_HTML,
254
259
  GLOB_MARKDOWN
255
260
  ];
261
+ var GLOB_PINIA_STORE = `**/store?(s)/*.${GLOB_SRC_EXT}`;
256
262
  var GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
257
263
  var GLOB_NODE_MODULES = "**/node_modules/**";
258
264
  var GLOB_DIST = "**/dist/**";
@@ -1419,6 +1425,37 @@ var jsonc = (options = {}) => [
1419
1425
  }
1420
1426
  ];
1421
1427
 
1428
+ // src/configs/pinia.ts
1429
+ var pinia = (options = {}) => {
1430
+ const { files = [GLOB_PINIA_STORE] } = options;
1431
+ return [
1432
+ {
1433
+ name: "ntnyq/pinia",
1434
+ files,
1435
+ plugins: {
1436
+ pinia: import_eslint_plugin_pinia.default
1437
+ },
1438
+ rules: {
1439
+ "pinia/prefer-single-store-per-file": "error",
1440
+ "pinia/no-duplicate-store-ids": "error",
1441
+ "pinia/no-return-global-properties": "error",
1442
+ "pinia/no-store-to-refs-in-store": "error",
1443
+ "pinia/never-export-initialized-store": "error",
1444
+ "pinia/require-setup-store-properties-export": "error",
1445
+ "pinia/prefer-use-store-naming-convention": [
1446
+ "error",
1447
+ {
1448
+ checkStoreNameMismatch: true,
1449
+ storeSuffix: "Store"
1450
+ }
1451
+ ],
1452
+ // Overrides rules
1453
+ ...options.overrides
1454
+ }
1455
+ }
1456
+ ];
1457
+ };
1458
+
1422
1459
  // src/configs/ntnyq.ts
1423
1460
  var ntnyq = (options = {}) => [
1424
1461
  {
@@ -1440,7 +1477,7 @@ var regexp = (options = {}) => {
1440
1477
  const recommendedRules2 = {
1441
1478
  ...recommendedConfig.rules
1442
1479
  };
1443
- if (options.level === "warn") {
1480
+ if (options.severity || options.level === "warn") {
1444
1481
  for (const key in recommendedRules2) {
1445
1482
  if (recommendedRules2[key] === "error") {
1446
1483
  recommendedRules2[key] = "warn";
@@ -1534,6 +1571,7 @@ var hasVitest = (0, import_local_pkg.isPackageExists)("vitest");
1534
1571
  var hasVue = (0, import_local_pkg.isPackageExists)("vue") || (0, import_local_pkg.isPackageExists)("nuxt") || (0, import_local_pkg.isPackageExists)("vitepress") || (0, import_local_pkg.isPackageExists)("@slidev/cli") || (0, import_local_pkg.isPackageExists)("vue", {
1535
1572
  paths: [(0, import_node_path.resolve)(import_node_process.default.cwd(), "playground")]
1536
1573
  });
1574
+ var hasPinia = (0, import_local_pkg.isPackageExists)("pinia");
1537
1575
  var hasUnoCSS = (0, import_local_pkg.isPackageExists)("unocss") || (0, import_local_pkg.isPackageExists)("@unocss/postcss") || (0, import_local_pkg.isPackageExists)("@unocss/webpack") || (0, import_local_pkg.isPackageExists)("@unocss/nuxt");
1538
1576
 
1539
1577
  // src/utils/toArray.ts
@@ -2019,7 +2057,7 @@ var prettier = (options = {}) => {
2019
2057
  "vue/space-unary-ops": "off",
2020
2058
  "vue/template-curly-spacing": "off",
2021
2059
  ...import_eslint_plugin_prettier.default.configs.recommended.rules,
2022
- "prettier/prettier": options.level || "warn",
2060
+ "prettier/prettier": options.severity || options.level || "warn",
2023
2061
  // Overrides rules
2024
2062
  ...options.overrides
2025
2063
  }
@@ -2864,6 +2902,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2864
2902
  * Conditional by deps
2865
2903
  */
2866
2904
  vue: enableVue = hasVue,
2905
+ pinia: enablePinia = hasPinia,
2867
2906
  test: enableTest = hasVitest,
2868
2907
  unocss: enableUnoCSS = hasUnoCSS,
2869
2908
  typescript: enableTypeScript = hasTypeScript,
@@ -2934,6 +2973,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2934
2973
  })
2935
2974
  );
2936
2975
  }
2976
+ if (enablePinia) {
2977
+ configs2.push(
2978
+ ...pinia({
2979
+ ...resolveSubOptions(options, "pinia"),
2980
+ overrides: getOverrides(options, "pinia")
2981
+ })
2982
+ );
2983
+ }
2937
2984
  if (enableRegexp) {
2938
2985
  configs2.push(
2939
2986
  ...regexp({
@@ -3072,6 +3119,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3072
3119
  GLOB_MARKDOWN_CODE,
3073
3120
  GLOB_MARKDOWN_NESTED,
3074
3121
  GLOB_NODE_MODULES,
3122
+ GLOB_PINIA_STORE,
3075
3123
  GLOB_POSTCSS,
3076
3124
  GLOB_SCSS,
3077
3125
  GLOB_SRC,
@@ -3094,6 +3142,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3094
3142
  getOverrides,
3095
3143
  githubAction,
3096
3144
  gitignore,
3145
+ hasPinia,
3097
3146
  hasTypeScript,
3098
3147
  hasUnoCSS,
3099
3148
  hasVitest,
@@ -3118,6 +3167,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3118
3167
  parserVue,
3119
3168
  parserYaml,
3120
3169
  perfectionist,
3170
+ pinia,
3121
3171
  pluginAntfu,
3122
3172
  pluginComments,
3123
3173
  pluginEsX,
@@ -3130,6 +3180,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
3130
3180
  pluginNode,
3131
3181
  pluginNtnyq,
3132
3182
  pluginPerfectionist,
3183
+ pluginPinia,
3133
3184
  pluginPrettier,
3134
3185
  pluginRegexp,
3135
3186
  pluginStylistic,
package/dist/index.d.cts CHANGED
@@ -9,6 +9,7 @@ import { Linter } from 'eslint';
9
9
  import { ConfigWithExtends } from 'typescript-eslint';
10
10
  export { plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
11
11
  import { RequiredOptions, BuiltInParserName } from 'prettier';
12
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
12
13
  import * as eslintPluginRegexp from 'eslint-plugin-regexp';
13
14
  export { eslintPluginRegexp as pluginRegexp };
14
15
  export { default as pluginNode } from 'eslint-plugin-n';
@@ -16,6 +17,7 @@ export { default as pluginVue } from 'eslint-plugin-vue';
16
17
  export { default as pluginEsX } from 'eslint-plugin-es-x';
17
18
  export { default as pluginYaml } from 'eslint-plugin-yml';
18
19
  export { default as pluginToml } from 'eslint-plugin-toml';
20
+ export { default as pluginPinia } from 'eslint-plugin-pinia';
19
21
  export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
20
22
  export { default as pluginMarkdown } from '@eslint/markdown';
21
23
  export { default as pluginAntfu } from 'eslint-plugin-antfu';
@@ -3091,6 +3093,11 @@ interface RuleOptions {
3091
3093
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-name.html
3092
3094
  */
3093
3095
  'github-action/require-action-name'?: Linter.RuleEntry<[]>;
3096
+ /**
3097
+ * require action run-name to be set.
3098
+ * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-run-name.html
3099
+ */
3100
+ 'github-action/require-action-run-name'?: Linter.RuleEntry<[]>;
3094
3101
  /**
3095
3102
  * require job name to be set.
3096
3103
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-name.html
@@ -5243,6 +5250,41 @@ interface RuleOptions {
5243
5250
  * @see https://perfectionist.dev/rules/sort-variable-declarations
5244
5251
  */
5245
5252
  'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
5253
+ /**
5254
+ * Never export an initialized named or default store.
5255
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/never-export-initialized-store.md
5256
+ */
5257
+ 'pinia/never-export-initialized-store'?: Linter.RuleEntry<[]>;
5258
+ /**
5259
+ * Disallow duplicate store ids.
5260
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-duplicate-store-ids.md
5261
+ */
5262
+ 'pinia/no-duplicate-store-ids'?: Linter.RuleEntry<[]>;
5263
+ /**
5264
+ * Disallows returning globally provided properties from Pinia stores.
5265
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-return-global-properties.md
5266
+ */
5267
+ 'pinia/no-return-global-properties'?: Linter.RuleEntry<[]>;
5268
+ /**
5269
+ * Disallow use of storeToRefs inside defineStore
5270
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-store-to-refs-in-store.md
5271
+ */
5272
+ 'pinia/no-store-to-refs-in-store'?: Linter.RuleEntry<[]>;
5273
+ /**
5274
+ * Encourages defining each store in a separate file.
5275
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-single-store-per-file.md
5276
+ */
5277
+ 'pinia/prefer-single-store-per-file'?: Linter.RuleEntry<[]>;
5278
+ /**
5279
+ * Enforces the convention of naming stores with the prefix `use` followed by the store name.
5280
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-use-store-naming-convention.md
5281
+ */
5282
+ 'pinia/prefer-use-store-naming-convention'?: Linter.RuleEntry<PiniaPreferUseStoreNamingConvention>;
5283
+ /**
5284
+ * In setup stores all state properties must be exported.
5285
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/require-setup-store-properties-export.md
5286
+ */
5287
+ 'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>;
5246
5288
  /**
5247
5289
  * Require using arrow functions for callbacks
5248
5290
  * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
@@ -14538,6 +14580,13 @@ type PerfectionistSortVariableDeclarations = [] | [
14538
14580
  type?: ("alphabetical" | "natural" | "line-length");
14539
14581
  }
14540
14582
  ];
14583
+ type PiniaPreferUseStoreNamingConvention = [] | [
14584
+ {
14585
+ checkStoreNameMismatch?: boolean;
14586
+ storeSuffix?: string;
14587
+ [k: string]: unknown | undefined;
14588
+ }
14589
+ ];
14541
14590
  type PreferArrowCallback = [] | [
14542
14591
  {
14543
14592
  allowNamedFunctions?: boolean;
@@ -16966,7 +17015,7 @@ type Yoda = [] | [("always" | "never")] | [
16966
17015
  onlyEquality?: boolean;
16967
17016
  }
16968
17017
  ];
16969
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/es-x' | '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/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | '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/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
17018
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/es-x' | '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/code-blocks' | '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/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
16970
17019
 
16971
17020
  /**
16972
17021
  * ESLint config
@@ -16984,6 +17033,12 @@ type ESLintProcessor = Linter.Processor;
16984
17033
  * ESLint parserOptions
16985
17034
  */
16986
17035
  type ESLintParserOptions = Linter.ParserOptions;
17036
+ /**
17037
+ * ESLint rule severity
17038
+ *
17039
+ * for config options use, don't need `off`
17040
+ */
17041
+ type ESLintRuleSeverity = 'error' | 'warn';
16987
17042
  /**
16988
17043
  * TypeScript ESLint parserOptions
16989
17044
  */
@@ -17033,6 +17088,8 @@ interface ConfigNodeOptions extends OptionsOverrides {
17033
17088
  }
17034
17089
  interface ConfigNtnyqOptions extends OptionsOverrides {
17035
17090
  }
17091
+ interface ConfigPiniaOptions extends OptionsFiles, OptionsOverrides {
17092
+ }
17036
17093
  interface ConfigStylisticOptions extends OptionsOverrides {
17037
17094
  }
17038
17095
  interface ConfigTomlOptions extends OptionsOverrides {
@@ -17136,28 +17193,41 @@ interface ConfigPerfectionistOptions extends OptionsOverrides {
17136
17193
  }
17137
17194
  interface ConfigPrettierOptions extends OptionsOverrides {
17138
17195
  /**
17139
- * Prettier level
17196
+ * TODO: remove in next major version
17140
17197
  *
17141
- * @default 'warn'
17198
+ * @deprecated use `severity` instead
17142
17199
  */
17143
- level?: 'error' | 'warn';
17200
+ level?: ESLintRuleSeverity;
17201
+ /**
17202
+ * rule severity
17203
+ *
17204
+ * @default `warn`
17205
+ */
17206
+ severity?: ESLintRuleSeverity;
17144
17207
  /**
17145
17208
  * Glob of built-in disabled files
17146
17209
  */
17147
17210
  disabledFiles?: string[];
17148
17211
  /**
17149
17212
  * Glob of user custom disabled files
17213
+ *
17150
17214
  * @default []
17151
17215
  */
17152
17216
  userDisabledFiles?: string[];
17153
17217
  }
17154
17218
  interface ConfigRegexpOptions extends OptionsOverrides {
17155
17219
  /**
17156
- * Prettier level
17220
+ * TODO: remove in next major version
17221
+ *
17222
+ * @deprecated use `severity` instead
17223
+ */
17224
+ level?: ESLintRuleSeverity;
17225
+ /**
17226
+ * rule severity
17157
17227
  *
17158
17228
  * @default 'error'
17159
17229
  */
17160
- level?: 'error' | 'warn';
17230
+ severity?: ESLintRuleSeverity;
17161
17231
  }
17162
17232
  interface ConfigSortOptions {
17163
17233
  /**
@@ -17242,6 +17312,7 @@ interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrid
17242
17312
  * Create virtual files for Vue SFC blocks to enable linting.
17243
17313
  *
17244
17314
  * @see https://github.com/antfu/eslint-processor-vue-blocks
17315
+ *
17245
17316
  * @default true
17246
17317
  */
17247
17318
  sfcBlocks?: boolean | Options;
@@ -17285,6 +17356,7 @@ interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
17285
17356
  jsonc?: boolean | ConfigJsoncOptions;
17286
17357
  markdown?: boolean | ConfigMarkdownOptions;
17287
17358
  perfectionist?: boolean | ConfigPerfectionistOptions;
17359
+ pinia?: boolean | ConfigPiniaOptions;
17288
17360
  prettier?: boolean | ConfigPrettierOptions;
17289
17361
  regexp?: boolean | ConfigRegexpOptions;
17290
17362
  sort?: boolean | ConfigSortOptions;
@@ -17345,6 +17417,7 @@ declare const GLOB_MARKDOWN = "**/*.md";
17345
17417
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
17346
17418
  declare const GLOB_MARKDOWN_NESTED = "**/*.md/*.md";
17347
17419
  declare const GLOB_ALL_SRC: string[];
17420
+ declare const GLOB_PINIA_STORE = "**/store?(s)/*.?([cm])[jt]s?(x)";
17348
17421
  declare const GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
17349
17422
  declare const GLOB_NODE_MODULES = "**/node_modules/**";
17350
17423
  declare const GLOB_DIST = "**/dist/**";
@@ -17354,6 +17427,7 @@ declare const GLOB_EXCLUDE: string[];
17354
17427
  declare const hasTypeScript: boolean;
17355
17428
  declare const hasVitest: boolean;
17356
17429
  declare const hasVue: boolean;
17430
+ declare const hasPinia: boolean;
17357
17431
  declare const hasUnoCSS: boolean;
17358
17432
 
17359
17433
  declare function toArray<T>(val?: Arrayable<T>): T[];
@@ -17382,24 +17456,12 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
17382
17456
 
17383
17457
  declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
17384
17458
 
17385
- /**
17386
- * @file ESLint parsers
17387
- */
17388
-
17389
17459
  /**
17390
17460
  * With meta
17391
17461
  */
17392
17462
  declare const parserTypeScript: {
17393
- meta?: {
17394
- name?: string | undefined;
17395
- version?: string | undefined;
17396
- };
17397
- parseForESLint(text: string, options?: unknown): {
17398
- ast: unknown;
17399
- scopeManager?: unknown;
17400
- services?: unknown;
17401
- visitorKeys?: unknown;
17402
- };
17463
+ meta?: { [K in keyof _typescript_eslint_utils_ts_eslint.Parser.ParserMeta]?: _typescript_eslint_utils_ts_eslint.Parser.ParserMeta[K] | undefined; };
17464
+ parseForESLint(text: string, options?: unknown): { [k in keyof _typescript_eslint_utils_ts_eslint.Parser.ParseResult]: unknown; };
17403
17465
  };
17404
17466
 
17405
17467
  /**
@@ -17428,6 +17490,8 @@ declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
17428
17490
 
17429
17491
  declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
17430
17492
 
17493
+ declare const pinia: (options?: ConfigPiniaOptions) => TypedConfigItem[];
17494
+
17431
17495
  declare const ntnyq: (options?: ConfigNtnyqOptions) => TypedConfigItem[];
17432
17496
 
17433
17497
  /**
@@ -17483,4 +17547,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
17483
17547
  */
17484
17548
  declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
17485
17549
 
17486
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigEsXOptions, 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 ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, 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_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, esX, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, importX, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
17550
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigEsXOptions, 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 ConfigPerfectionistOptions, type ConfigPiniaOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, type ESLintRuleSeverity, 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_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PINIA_STORE, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, esX, format, getOverrides, githubAction, gitignore, hasPinia, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, importX, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, pinia, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { Linter } from 'eslint';
9
9
  import { ConfigWithExtends } from 'typescript-eslint';
10
10
  export { plugin as pluginTypeScript, configs as typescriptConfigs } from 'typescript-eslint';
11
11
  import { RequiredOptions, BuiltInParserName } from 'prettier';
12
+ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
12
13
  import * as eslintPluginRegexp from 'eslint-plugin-regexp';
13
14
  export { eslintPluginRegexp as pluginRegexp };
14
15
  export { default as pluginNode } from 'eslint-plugin-n';
@@ -16,6 +17,7 @@ export { default as pluginVue } from 'eslint-plugin-vue';
16
17
  export { default as pluginEsX } from 'eslint-plugin-es-x';
17
18
  export { default as pluginYaml } from 'eslint-plugin-yml';
18
19
  export { default as pluginToml } from 'eslint-plugin-toml';
20
+ export { default as pluginPinia } from 'eslint-plugin-pinia';
19
21
  export { default as pluginNtnyq } from 'eslint-plugin-ntnyq';
20
22
  export { default as pluginMarkdown } from '@eslint/markdown';
21
23
  export { default as pluginAntfu } from 'eslint-plugin-antfu';
@@ -3091,6 +3093,11 @@ interface RuleOptions {
3091
3093
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-name.html
3092
3094
  */
3093
3095
  'github-action/require-action-name'?: Linter.RuleEntry<[]>;
3096
+ /**
3097
+ * require action run-name to be set.
3098
+ * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-action-run-name.html
3099
+ */
3100
+ 'github-action/require-action-run-name'?: Linter.RuleEntry<[]>;
3094
3101
  /**
3095
3102
  * require job name to be set.
3096
3103
  * @see https://eslint-plugin-github-action.ntnyq.com/rules/require-job-name.html
@@ -5243,6 +5250,41 @@ interface RuleOptions {
5243
5250
  * @see https://perfectionist.dev/rules/sort-variable-declarations
5244
5251
  */
5245
5252
  'perfectionist/sort-variable-declarations'?: Linter.RuleEntry<PerfectionistSortVariableDeclarations>;
5253
+ /**
5254
+ * Never export an initialized named or default store.
5255
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/never-export-initialized-store.md
5256
+ */
5257
+ 'pinia/never-export-initialized-store'?: Linter.RuleEntry<[]>;
5258
+ /**
5259
+ * Disallow duplicate store ids.
5260
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-duplicate-store-ids.md
5261
+ */
5262
+ 'pinia/no-duplicate-store-ids'?: Linter.RuleEntry<[]>;
5263
+ /**
5264
+ * Disallows returning globally provided properties from Pinia stores.
5265
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-return-global-properties.md
5266
+ */
5267
+ 'pinia/no-return-global-properties'?: Linter.RuleEntry<[]>;
5268
+ /**
5269
+ * Disallow use of storeToRefs inside defineStore
5270
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/no-store-to-refs-in-store.md
5271
+ */
5272
+ 'pinia/no-store-to-refs-in-store'?: Linter.RuleEntry<[]>;
5273
+ /**
5274
+ * Encourages defining each store in a separate file.
5275
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-single-store-per-file.md
5276
+ */
5277
+ 'pinia/prefer-single-store-per-file'?: Linter.RuleEntry<[]>;
5278
+ /**
5279
+ * Enforces the convention of naming stores with the prefix `use` followed by the store name.
5280
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/prefer-use-store-naming-convention.md
5281
+ */
5282
+ 'pinia/prefer-use-store-naming-convention'?: Linter.RuleEntry<PiniaPreferUseStoreNamingConvention>;
5283
+ /**
5284
+ * In setup stores all state properties must be exported.
5285
+ * @see https://github.com/lisilinhart/eslint-plugin-pinia/blob/main/docs/rules/require-setup-store-properties-export.md
5286
+ */
5287
+ 'pinia/require-setup-store-properties-export'?: Linter.RuleEntry<[]>;
5246
5288
  /**
5247
5289
  * Require using arrow functions for callbacks
5248
5290
  * @see https://eslint.org/docs/latest/rules/prefer-arrow-callback
@@ -14538,6 +14580,13 @@ type PerfectionistSortVariableDeclarations = [] | [
14538
14580
  type?: ("alphabetical" | "natural" | "line-length");
14539
14581
  }
14540
14582
  ];
14583
+ type PiniaPreferUseStoreNamingConvention = [] | [
14584
+ {
14585
+ checkStoreNameMismatch?: boolean;
14586
+ storeSuffix?: string;
14587
+ [k: string]: unknown | undefined;
14588
+ }
14589
+ ];
14541
14590
  type PreferArrowCallback = [] | [
14542
14591
  {
14543
14592
  allowNamedFunctions?: boolean;
@@ -16966,7 +17015,7 @@ type Yoda = [] | [("always" | "never")] | [
16966
17015
  onlyEquality?: boolean;
16967
17016
  }
16968
17017
  ];
16969
- type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/es-x' | '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/code-blocks' | 'ntnyq/node' | 'ntnyq/ntnyq' | '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/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
17018
+ type ConfigNames = 'ntnyq/antfu' | 'ntnyq/command' | 'ntnyq/eslint-comments' | 'ntnyq/es-x' | '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/code-blocks' | '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/stylistic' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vitest' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yaml';
16970
17019
 
16971
17020
  /**
16972
17021
  * ESLint config
@@ -16984,6 +17033,12 @@ type ESLintProcessor = Linter.Processor;
16984
17033
  * ESLint parserOptions
16985
17034
  */
16986
17035
  type ESLintParserOptions = Linter.ParserOptions;
17036
+ /**
17037
+ * ESLint rule severity
17038
+ *
17039
+ * for config options use, don't need `off`
17040
+ */
17041
+ type ESLintRuleSeverity = 'error' | 'warn';
16987
17042
  /**
16988
17043
  * TypeScript ESLint parserOptions
16989
17044
  */
@@ -17033,6 +17088,8 @@ interface ConfigNodeOptions extends OptionsOverrides {
17033
17088
  }
17034
17089
  interface ConfigNtnyqOptions extends OptionsOverrides {
17035
17090
  }
17091
+ interface ConfigPiniaOptions extends OptionsFiles, OptionsOverrides {
17092
+ }
17036
17093
  interface ConfigStylisticOptions extends OptionsOverrides {
17037
17094
  }
17038
17095
  interface ConfigTomlOptions extends OptionsOverrides {
@@ -17136,28 +17193,41 @@ interface ConfigPerfectionistOptions extends OptionsOverrides {
17136
17193
  }
17137
17194
  interface ConfigPrettierOptions extends OptionsOverrides {
17138
17195
  /**
17139
- * Prettier level
17196
+ * TODO: remove in next major version
17140
17197
  *
17141
- * @default 'warn'
17198
+ * @deprecated use `severity` instead
17142
17199
  */
17143
- level?: 'error' | 'warn';
17200
+ level?: ESLintRuleSeverity;
17201
+ /**
17202
+ * rule severity
17203
+ *
17204
+ * @default `warn`
17205
+ */
17206
+ severity?: ESLintRuleSeverity;
17144
17207
  /**
17145
17208
  * Glob of built-in disabled files
17146
17209
  */
17147
17210
  disabledFiles?: string[];
17148
17211
  /**
17149
17212
  * Glob of user custom disabled files
17213
+ *
17150
17214
  * @default []
17151
17215
  */
17152
17216
  userDisabledFiles?: string[];
17153
17217
  }
17154
17218
  interface ConfigRegexpOptions extends OptionsOverrides {
17155
17219
  /**
17156
- * Prettier level
17220
+ * TODO: remove in next major version
17221
+ *
17222
+ * @deprecated use `severity` instead
17223
+ */
17224
+ level?: ESLintRuleSeverity;
17225
+ /**
17226
+ * rule severity
17157
17227
  *
17158
17228
  * @default 'error'
17159
17229
  */
17160
- level?: 'error' | 'warn';
17230
+ severity?: ESLintRuleSeverity;
17161
17231
  }
17162
17232
  interface ConfigSortOptions {
17163
17233
  /**
@@ -17242,6 +17312,7 @@ interface ConfigVueOptions extends OptionsFeatures, OptionsFiles, OptionsOverrid
17242
17312
  * Create virtual files for Vue SFC blocks to enable linting.
17243
17313
  *
17244
17314
  * @see https://github.com/antfu/eslint-processor-vue-blocks
17315
+ *
17245
17316
  * @default true
17246
17317
  */
17247
17318
  sfcBlocks?: boolean | Options;
@@ -17285,6 +17356,7 @@ interface ConfigOptions extends ConfigOptionsInternal, OptionsExtensions {
17285
17356
  jsonc?: boolean | ConfigJsoncOptions;
17286
17357
  markdown?: boolean | ConfigMarkdownOptions;
17287
17358
  perfectionist?: boolean | ConfigPerfectionistOptions;
17359
+ pinia?: boolean | ConfigPiniaOptions;
17288
17360
  prettier?: boolean | ConfigPrettierOptions;
17289
17361
  regexp?: boolean | ConfigRegexpOptions;
17290
17362
  sort?: boolean | ConfigSortOptions;
@@ -17345,6 +17417,7 @@ declare const GLOB_MARKDOWN = "**/*.md";
17345
17417
  declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
17346
17418
  declare const GLOB_MARKDOWN_NESTED = "**/*.md/*.md";
17347
17419
  declare const GLOB_ALL_SRC: string[];
17420
+ declare const GLOB_PINIA_STORE = "**/store?(s)/*.?([cm])[jt]s?(x)";
17348
17421
  declare const GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
17349
17422
  declare const GLOB_NODE_MODULES = "**/node_modules/**";
17350
17423
  declare const GLOB_DIST = "**/dist/**";
@@ -17354,6 +17427,7 @@ declare const GLOB_EXCLUDE: string[];
17354
17427
  declare const hasTypeScript: boolean;
17355
17428
  declare const hasVitest: boolean;
17356
17429
  declare const hasVue: boolean;
17430
+ declare const hasPinia: boolean;
17357
17431
  declare const hasUnoCSS: boolean;
17358
17432
 
17359
17433
  declare function toArray<T>(val?: Arrayable<T>): T[];
@@ -17382,24 +17456,12 @@ declare function resolveSubOptions<K extends keyof ConfigOptions>(options: Confi
17382
17456
 
17383
17457
  declare function mergePrettierOptions(options?: PrettierOptions, overrides?: PrettierOptions): PrettierOptions;
17384
17458
 
17385
- /**
17386
- * @file ESLint parsers
17387
- */
17388
-
17389
17459
  /**
17390
17460
  * With meta
17391
17461
  */
17392
17462
  declare const parserTypeScript: {
17393
- meta?: {
17394
- name?: string | undefined;
17395
- version?: string | undefined;
17396
- };
17397
- parseForESLint(text: string, options?: unknown): {
17398
- ast: unknown;
17399
- scopeManager?: unknown;
17400
- services?: unknown;
17401
- visitorKeys?: unknown;
17402
- };
17463
+ meta?: { [K in keyof _typescript_eslint_utils_ts_eslint.Parser.ParserMeta]?: _typescript_eslint_utils_ts_eslint.Parser.ParserMeta[K] | undefined; };
17464
+ parseForESLint(text: string, options?: unknown): { [k in keyof _typescript_eslint_utils_ts_eslint.Parser.ParseResult]: unknown; };
17403
17465
  };
17404
17466
 
17405
17467
  /**
@@ -17428,6 +17490,8 @@ declare const jsdoc: (options?: ConfigJsdocOptions) => TypedConfigItem[];
17428
17490
 
17429
17491
  declare const jsonc: (options?: ConfigJsoncOptions) => TypedConfigItem[];
17430
17492
 
17493
+ declare const pinia: (options?: ConfigPiniaOptions) => TypedConfigItem[];
17494
+
17431
17495
  declare const ntnyq: (options?: ConfigNtnyqOptions) => TypedConfigItem[];
17432
17496
 
17433
17497
  /**
@@ -17483,4 +17547,4 @@ declare const unusedImports: (options?: ConfigUnusedImportsOptions) => TypedConf
17483
17547
  */
17484
17548
  declare const DEFAULT_PRETTIER_OPTIONS: PrettierOptions;
17485
17549
 
17486
- export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigEsXOptions, 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 ConfigPerfectionistOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, 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_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, esX, format, getOverrides, githubAction, gitignore, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, importX, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
17550
+ export { type Arrayable, type Awaitable, type ConfigAntfuOptions, type ConfigCommandOptions, type ConfigCommentsOptions, type ConfigEsXOptions, 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 ConfigPerfectionistOptions, type ConfigPiniaOptions, type ConfigPrettierOptions, type ConfigRegexpOptions, type ConfigSortOptions, type ConfigSpecialsOptions, type ConfigStylisticOptions, type ConfigTestOptions, type ConfigTomlOptions, type ConfigTypeScriptOptions, type ConfigUnicornOptions, type ConfigUnoCSSOptions, type ConfigUnusedImportsOptions, type ConfigVueOptions, type ConfigYmlOptions, DEFAULT_PRETTIER_OPTIONS, type ESLintConfig, type ESLintParser, type ESLintParserOptions, type ESLintProcessor, type ESLintRuleSeverity, 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_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PINIA_STORE, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_TYPES, GLOB_VUE, GLOB_YAML, type InteropModuleDefault, type OptionsExtensions, type OptionsFeatures, type OptionsFiles, type OptionsOverrides, type PrettierOptions, type Pretty, type ResolvedOptions, type RuleOptions, type TSESLintParserOptions, type TypedConfigItem, antfu, command, comments, defineESLintConfig, esX, format, getOverrides, githubAction, gitignore, hasPinia, hasTypeScript, hasUnoCSS, hasVitest, hasVue, ignores, importX, interopDefault, javascript, jsdoc, jsonc, jsx, loadPlugin, markdown, mergePrettierOptions, node, ntnyq, parserPlain, parserTypeScript, perfectionist, pinia, prettier, regexp, resolveSubOptions, sort, specials, stylistic, test, toArray, toml, typescript, unicorn, unocss, unusedImports, vitest, vue, yml };
package/dist/index.js CHANGED
@@ -39,23 +39,24 @@ import { default as default3 } from "eslint-plugin-vue";
39
39
  import { default as default4 } from "eslint-plugin-es-x";
40
40
  import { default as default5 } from "eslint-plugin-yml";
41
41
  import { default as default6 } from "eslint-plugin-toml";
42
- import { default as default7 } from "eslint-plugin-ntnyq";
43
- import { default as default8 } from "@eslint/markdown";
44
- import { default as default9 } from "eslint-plugin-antfu";
45
- import { default as default10 } from "eslint-plugin-jsdoc";
46
- import { default as default11 } from "eslint-plugin-jsonc";
42
+ import { default as default7 } from "eslint-plugin-pinia";
43
+ import { default as default8 } from "eslint-plugin-ntnyq";
44
+ import { default as default9 } from "@eslint/markdown";
45
+ import { default as default10 } from "eslint-plugin-antfu";
46
+ import { default as default11 } from "eslint-plugin-jsdoc";
47
+ import { default as default12 } from "eslint-plugin-jsonc";
47
48
  import { plugin } from "typescript-eslint";
48
- import { default as default12 } from "eslint-plugin-format";
49
- import { default as default13 } from "@unocss/eslint-plugin";
50
- import { default as default14 } from "@vitest/eslint-plugin";
51
- import { default as default15 } from "eslint-plugin-unicorn";
52
- import { default as default16 } from "eslint-plugin-import-x";
53
- import { default as default17 } from "eslint-plugin-prettier";
54
- import { default as default18 } from "@stylistic/eslint-plugin";
55
- import { default as default19 } from "eslint-plugin-github-action";
56
- import { default as default20 } from "eslint-plugin-perfectionist";
57
- import { default as default21 } from "eslint-plugin-unused-imports";
58
- import { default as default22 } from "@eslint-community/eslint-plugin-eslint-comments";
49
+ import { default as default13 } from "eslint-plugin-format";
50
+ import { default as default14 } from "@unocss/eslint-plugin";
51
+ import { default as default15 } from "@vitest/eslint-plugin";
52
+ import { default as default16 } from "eslint-plugin-unicorn";
53
+ import { default as default17 } from "eslint-plugin-import-x";
54
+ import { default as default18 } from "eslint-plugin-prettier";
55
+ import { default as default19 } from "@stylistic/eslint-plugin";
56
+ import { default as default20 } from "eslint-plugin-github-action";
57
+ import { default as default21 } from "eslint-plugin-perfectionist";
58
+ import { default as default22 } from "eslint-plugin-unused-imports";
59
+ import { default as default23 } from "@eslint-community/eslint-plugin-eslint-comments";
59
60
 
60
61
  // src/eslint/configs.ts
61
62
  import { configs } from "typescript-eslint";
@@ -63,7 +64,7 @@ import { configs } from "typescript-eslint";
63
64
  // src/eslint/processors.ts
64
65
  import { mergeProcessors } from "eslint-merge-processors";
65
66
  import { processorPassThrough } from "eslint-merge-processors";
66
- import { default as default23 } from "eslint-processor-vue-blocks";
67
+ import { default as default24 } from "eslint-processor-vue-blocks";
67
68
 
68
69
  // src/globs.ts
69
70
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
@@ -109,6 +110,7 @@ var GLOB_ALL_SRC = [
109
110
  GLOB_HTML,
110
111
  GLOB_MARKDOWN
111
112
  ];
113
+ var GLOB_PINIA_STORE = `**/store?(s)/*.${GLOB_SRC_EXT}`;
112
114
  var GLOB_GITHUB_ACTION = "**/.github/workflows/*.y?(a)ml";
113
115
  var GLOB_NODE_MODULES = "**/node_modules/**";
114
116
  var GLOB_DIST = "**/dist/**";
@@ -372,7 +374,7 @@ var vue = (options = {}) => {
372
374
  if (!sfcBlocks) return processorVueSFC;
373
375
  return mergeProcessors2([
374
376
  processorVueSFC,
375
- default23({
377
+ default24({
376
378
  ...sfcBlocks,
377
379
  blocks: {
378
380
  styles: true,
@@ -971,11 +973,11 @@ var vitest = (options = {}) => [
971
973
  {
972
974
  name: "ntnyq/vitest",
973
975
  plugins: {
974
- vitest: default14
976
+ vitest: default15
975
977
  },
976
978
  files: [...GLOB_TEST],
977
979
  rules: {
978
- ...default14.configs.recommended.rules,
980
+ ...default15.configs.recommended.rules,
979
981
  // Overrides rules
980
982
  ...options.overridesVitestRules
981
983
  }
@@ -987,7 +989,7 @@ var antfu = (options = {}) => [
987
989
  {
988
990
  name: "ntnyq/antfu",
989
991
  plugins: {
990
- antfu: default9
992
+ antfu: default10
991
993
  },
992
994
  rules: {
993
995
  // required `object-curly-newline` to be disabled
@@ -1014,7 +1016,7 @@ var jsdoc = (options = {}) => [
1014
1016
  {
1015
1017
  name: "ntnyq/jsdoc",
1016
1018
  plugins: {
1017
- jsdoc: default10
1019
+ jsdoc: default11
1018
1020
  },
1019
1021
  rules: {
1020
1022
  // Disabled rules
@@ -1236,13 +1238,13 @@ var jsonc = (options = {}) => [
1236
1238
  name: "ntnyq/jsonc",
1237
1239
  files: [GLOB_JSON, GLOB_JSON5, GLOB_JSONC],
1238
1240
  plugins: {
1239
- jsonc: default11
1241
+ jsonc: default12
1240
1242
  },
1241
1243
  languageOptions: {
1242
1244
  parser: parserJsonc
1243
1245
  },
1244
1246
  rules: {
1245
- ...default11.configs["recommended-with-jsonc"].rules,
1247
+ ...default12.configs["recommended-with-jsonc"].rules,
1246
1248
  "jsonc/no-octal-escape": "error",
1247
1249
  "jsonc/indent": ["error", 2],
1248
1250
  "jsonc/comma-style": ["error", "last"],
@@ -1275,12 +1277,43 @@ var jsonc = (options = {}) => [
1275
1277
  }
1276
1278
  ];
1277
1279
 
1280
+ // src/configs/pinia.ts
1281
+ var pinia = (options = {}) => {
1282
+ const { files = [GLOB_PINIA_STORE] } = options;
1283
+ return [
1284
+ {
1285
+ name: "ntnyq/pinia",
1286
+ files,
1287
+ plugins: {
1288
+ pinia: default7
1289
+ },
1290
+ rules: {
1291
+ "pinia/prefer-single-store-per-file": "error",
1292
+ "pinia/no-duplicate-store-ids": "error",
1293
+ "pinia/no-return-global-properties": "error",
1294
+ "pinia/no-store-to-refs-in-store": "error",
1295
+ "pinia/never-export-initialized-store": "error",
1296
+ "pinia/require-setup-store-properties-export": "error",
1297
+ "pinia/prefer-use-store-naming-convention": [
1298
+ "error",
1299
+ {
1300
+ checkStoreNameMismatch: true,
1301
+ storeSuffix: "Store"
1302
+ }
1303
+ ],
1304
+ // Overrides rules
1305
+ ...options.overrides
1306
+ }
1307
+ }
1308
+ ];
1309
+ };
1310
+
1278
1311
  // src/configs/ntnyq.ts
1279
1312
  var ntnyq = (options = {}) => [
1280
1313
  {
1281
1314
  name: "ntnyq/ntnyq",
1282
1315
  plugins: {
1283
- ntnyq: default7
1316
+ ntnyq: default8
1284
1317
  },
1285
1318
  rules: {
1286
1319
  "ntnyq/no-member-accessibility": "error",
@@ -1296,7 +1329,7 @@ var regexp = (options = {}) => {
1296
1329
  const recommendedRules2 = {
1297
1330
  ...recommendedConfig.rules
1298
1331
  };
1299
- if (options.level === "warn") {
1332
+ if (options.severity || options.level === "warn") {
1300
1333
  for (const key in recommendedRules2) {
1301
1334
  if (recommendedRules2[key] === "error") {
1302
1335
  recommendedRules2[key] = "warn";
@@ -1321,7 +1354,7 @@ var unocss = (options = {}) => [
1321
1354
  {
1322
1355
  name: "ntnyq/unocss",
1323
1356
  plugins: {
1324
- unocss: default13
1357
+ unocss: default14
1325
1358
  },
1326
1359
  rules: {
1327
1360
  "unocss/order": "error",
@@ -1390,6 +1423,7 @@ var hasVitest = isPackageExists("vitest");
1390
1423
  var hasVue = isPackageExists("vue") || isPackageExists("nuxt") || isPackageExists("vitepress") || isPackageExists("@slidev/cli") || isPackageExists("vue", {
1391
1424
  paths: [resolve(process.cwd(), "playground")]
1392
1425
  });
1426
+ var hasPinia = isPackageExists("pinia");
1393
1427
  var hasUnoCSS = isPackageExists("unocss") || isPackageExists("@unocss/postcss") || isPackageExists("@unocss/webpack") || isPackageExists("@unocss/nuxt");
1394
1428
 
1395
1429
  // src/utils/toArray.ts
@@ -1455,7 +1489,7 @@ var format = (options = {}) => {
1455
1489
  {
1456
1490
  name: "ntnyq/format/setup",
1457
1491
  plugins: {
1458
- format: default12
1492
+ format: default13
1459
1493
  }
1460
1494
  }
1461
1495
  ];
@@ -1554,7 +1588,7 @@ var importX = (options = {}) => [
1554
1588
  {
1555
1589
  name: "ntnyq/import-x",
1556
1590
  plugins: {
1557
- "import-x": default16
1591
+ "import-x": default17
1558
1592
  },
1559
1593
  settings: {
1560
1594
  "import-x/resolver": {
@@ -1595,7 +1629,7 @@ var unicorn = (options = {}) => [
1595
1629
  {
1596
1630
  name: "ntnyq/unicorn",
1597
1631
  plugins: {
1598
- unicorn: default15
1632
+ unicorn: default16
1599
1633
  },
1600
1634
  rules: {
1601
1635
  "unicorn/escape-case": "error",
@@ -1717,8 +1751,8 @@ var specials = (options = {}) => [
1717
1751
  name: "ntnyq/specials/config-file",
1718
1752
  files: [`**/*.config*.${GLOB_SRC_EXT}`],
1719
1753
  plugins: {
1720
- "import-x": default16,
1721
- perfectionist: default20
1754
+ "import-x": default17,
1755
+ perfectionist: default21
1722
1756
  },
1723
1757
  rules: {
1724
1758
  "no-console": "off",
@@ -1744,10 +1778,10 @@ var comments = (options = {}) => [
1744
1778
  {
1745
1779
  name: "ntnyq/eslint-comments",
1746
1780
  plugins: {
1747
- "@eslint-community/eslint-comments": default22
1781
+ "@eslint-community/eslint-comments": default23
1748
1782
  },
1749
1783
  rules: {
1750
- ...default22.configs.recommended.rules,
1784
+ ...default23.configs.recommended.rules,
1751
1785
  "@eslint-community/eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }],
1752
1786
  // Overrides rules
1753
1787
  ...options.overrides
@@ -1757,10 +1791,10 @@ var comments = (options = {}) => [
1757
1791
 
1758
1792
  // src/configs/markdown.ts
1759
1793
  var markdown = (options = {}) => {
1760
- if (!Array.isArray(default8.configs?.processor)) return [];
1794
+ if (!Array.isArray(default9.configs?.processor)) return [];
1761
1795
  const { files = [`${GLOB_MARKDOWN}/${GLOB_SRC}`], extensions = [] } = options;
1762
1796
  return [
1763
- ...default8.configs.processor.map((config) => ({
1797
+ ...default9.configs.processor.map((config) => ({
1764
1798
  ...config,
1765
1799
  name: `ntnyq/${config.name}`
1766
1800
  })),
@@ -1769,7 +1803,7 @@ var markdown = (options = {}) => {
1769
1803
  files,
1770
1804
  ignores: [GLOB_MARKDOWN_NESTED],
1771
1805
  processor: mergeProcessors([
1772
- default8.processors.markdown,
1806
+ default9.processors.markdown,
1773
1807
  // Just pass through processor
1774
1808
  processorPassThrough
1775
1809
  ])
@@ -1834,7 +1868,7 @@ var prettier = (options = {}) => {
1834
1868
  {
1835
1869
  name: "ntnyq/prettier",
1836
1870
  plugins: {
1837
- prettier: default17
1871
+ prettier: default18
1838
1872
  },
1839
1873
  rules: {
1840
1874
  "vue/array-bracket-newline": "off",
@@ -1874,8 +1908,8 @@ var prettier = (options = {}) => {
1874
1908
  "vue/space-infix-ops": "off",
1875
1909
  "vue/space-unary-ops": "off",
1876
1910
  "vue/template-curly-spacing": "off",
1877
- ...default17.configs.recommended.rules,
1878
- "prettier/prettier": options.level || "warn",
1911
+ ...default18.configs.recommended.rules,
1912
+ "prettier/prettier": options.severity || options.level || "warn",
1879
1913
  // Overrides rules
1880
1914
  ...options.overrides
1881
1915
  }
@@ -1887,7 +1921,7 @@ var prettier = (options = {}) => {
1887
1921
  name: "ntnyq/prettier/disabled",
1888
1922
  files: [...disabledFiles, ...userDisabledFiles],
1889
1923
  plugins: {
1890
- prettier: default17
1924
+ prettier: default18
1891
1925
  },
1892
1926
  rules: {
1893
1927
  "prettier/prettier": "off"
@@ -1901,7 +1935,7 @@ var stylistic = (options = {}) => [
1901
1935
  {
1902
1936
  name: "ntnyq/stylistic",
1903
1937
  plugins: {
1904
- "@stylistic": default18
1938
+ "@stylistic": default19
1905
1939
  },
1906
1940
  rules: {
1907
1941
  // Only rules are not conflicted with Prettier
@@ -2235,7 +2269,7 @@ var typescript = (options = {}) => {
2235
2269
  name: "ntnyq/ts/setup",
2236
2270
  plugins: {
2237
2271
  "@typescript-eslint": plugin,
2238
- antfu: default9
2272
+ antfu: default10
2239
2273
  }
2240
2274
  },
2241
2275
  ...enableTypeAwareLint ? [
@@ -2459,7 +2493,7 @@ var perfectionist = (options = {}) => {
2459
2493
  {
2460
2494
  name: "ntnyq/perfectionist/common",
2461
2495
  plugins: {
2462
- perfectionist: default20
2496
+ perfectionist: default21
2463
2497
  },
2464
2498
  rules: {
2465
2499
  "perfectionist/sort-imports": [
@@ -2544,7 +2578,7 @@ var perfectionist = (options = {}) => {
2544
2578
  name: "ntnyq/perfectionist/enums",
2545
2579
  files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
2546
2580
  plugins: {
2547
- perfectionist: default20
2581
+ perfectionist: default21
2548
2582
  },
2549
2583
  rules: {
2550
2584
  "perfectionist/sort-enums": [
@@ -2573,7 +2607,7 @@ var perfectionist = (options = {}) => {
2573
2607
  name: "ntnyq/perfectionist/types",
2574
2608
  files: [...GLOB_TYPES],
2575
2609
  plugins: {
2576
- perfectionist: default20
2610
+ perfectionist: default21
2577
2611
  },
2578
2612
  rules: {
2579
2613
  "perfectionist/sort-heritage-clauses": [
@@ -2637,7 +2671,7 @@ var perfectionist = (options = {}) => {
2637
2671
  name: "ntnyq/perfectionist/constants",
2638
2672
  files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
2639
2673
  plugins: {
2640
- perfectionist: default20
2674
+ perfectionist: default21
2641
2675
  },
2642
2676
  rules: {
2643
2677
  "perfectionist/sort-maps": [
@@ -2685,7 +2719,7 @@ var unusedImports = (options = {}) => [
2685
2719
  {
2686
2720
  name: "ntnyq/unused-imports",
2687
2721
  plugins: {
2688
- "unused-imports": default21
2722
+ "unused-imports": default22
2689
2723
  },
2690
2724
  rules: {
2691
2725
  "@typescript-eslint/no-unused-vars": "off",
@@ -2720,6 +2754,7 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2720
2754
  * Conditional by deps
2721
2755
  */
2722
2756
  vue: enableVue = hasVue,
2757
+ pinia: enablePinia = hasPinia,
2723
2758
  test: enableTest = hasVitest,
2724
2759
  unocss: enableUnoCSS = hasUnoCSS,
2725
2760
  typescript: enableTypeScript = hasTypeScript,
@@ -2790,6 +2825,14 @@ function defineESLintConfig(options = {}, ...userConfigs) {
2790
2825
  })
2791
2826
  );
2792
2827
  }
2828
+ if (enablePinia) {
2829
+ configs2.push(
2830
+ ...pinia({
2831
+ ...resolveSubOptions(options, "pinia"),
2832
+ overrides: getOverrides(options, "pinia")
2833
+ })
2834
+ );
2835
+ }
2793
2836
  if (enableRegexp) {
2794
2837
  configs2.push(
2795
2838
  ...regexp({
@@ -2927,6 +2970,7 @@ export {
2927
2970
  GLOB_MARKDOWN_CODE,
2928
2971
  GLOB_MARKDOWN_NESTED,
2929
2972
  GLOB_NODE_MODULES,
2973
+ GLOB_PINIA_STORE,
2930
2974
  GLOB_POSTCSS,
2931
2975
  GLOB_SCSS,
2932
2976
  GLOB_SRC,
@@ -2949,6 +2993,7 @@ export {
2949
2993
  getOverrides,
2950
2994
  githubAction,
2951
2995
  gitignore,
2996
+ hasPinia,
2952
2997
  hasTypeScript,
2953
2998
  hasUnoCSS,
2954
2999
  hasVitest,
@@ -2973,32 +3018,34 @@ export {
2973
3018
  parserVue,
2974
3019
  parserYaml,
2975
3020
  perfectionist,
2976
- default9 as pluginAntfu,
2977
- default22 as pluginComments,
3021
+ pinia,
3022
+ default10 as pluginAntfu,
3023
+ default23 as pluginComments,
2978
3024
  default4 as pluginEsX,
2979
- default12 as pluginFormat,
2980
- default19 as pluginGitHubAction,
2981
- default16 as pluginImportX,
2982
- default10 as pluginJsdoc,
2983
- default11 as pluginJsonc,
2984
- default8 as pluginMarkdown,
3025
+ default13 as pluginFormat,
3026
+ default20 as pluginGitHubAction,
3027
+ default17 as pluginImportX,
3028
+ default11 as pluginJsdoc,
3029
+ default12 as pluginJsonc,
3030
+ default9 as pluginMarkdown,
2985
3031
  default2 as pluginNode,
2986
- default7 as pluginNtnyq,
2987
- default20 as pluginPerfectionist,
2988
- default17 as pluginPrettier,
3032
+ default8 as pluginNtnyq,
3033
+ default21 as pluginPerfectionist,
3034
+ default7 as pluginPinia,
3035
+ default18 as pluginPrettier,
2989
3036
  pluginRegexp,
2990
- default18 as pluginStylistic,
3037
+ default19 as pluginStylistic,
2991
3038
  default6 as pluginToml,
2992
3039
  plugin as pluginTypeScript,
2993
- default15 as pluginUnicorn,
2994
- default13 as pluginUnoCSS,
2995
- default21 as pluginUnusedImports,
2996
- default14 as pluginVitest,
3040
+ default16 as pluginUnicorn,
3041
+ default14 as pluginUnoCSS,
3042
+ default22 as pluginUnusedImports,
3043
+ default15 as pluginVitest,
2997
3044
  default3 as pluginVue,
2998
3045
  default5 as pluginYaml,
2999
3046
  prettier,
3000
3047
  processorPassThrough,
3001
- default23 as processorVueBlocks,
3048
+ default24 as processorVueBlocks,
3002
3049
  regexp,
3003
3050
  resolveSubOptions,
3004
3051
  sort,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@ntnyq/eslint-config",
3
3
  "type": "module",
4
- "version": "3.8.1",
5
- "packageManager": "pnpm@9.14.4",
4
+ "version": "3.9.0",
5
+ "packageManager": "pnpm@9.15.0",
6
6
  "description": "An opinionated ESLint config preset of ntnyq",
7
7
  "keywords": [
8
8
  "eslint",
@@ -60,21 +60,23 @@
60
60
  "@eslint/js": "^9.16.0",
61
61
  "@eslint/markdown": "^6.2.1",
62
62
  "@stylistic/eslint-plugin": "^2.11.0",
63
- "@unocss/eslint-plugin": "^0.65.0",
63
+ "@unocss/eslint-plugin": "^0.65.1",
64
64
  "@vitest/eslint-plugin": "^1.1.14",
65
65
  "eslint-config-flat-gitignore": "^0.3.0",
66
66
  "eslint-flat-config-utils": "^0.4.0",
67
67
  "eslint-merge-processors": "^0.1.0",
68
68
  "eslint-plugin-antfu": "^2.7.0",
69
69
  "eslint-plugin-command": "^0.2.6",
70
+ "eslint-plugin-es-x": "^8.4.1",
70
71
  "eslint-plugin-format": "^0.1.3",
71
- "eslint-plugin-github-action": "^0.0.8",
72
+ "eslint-plugin-github-action": "^0.0.11",
72
73
  "eslint-plugin-import-x": "^4.5.0",
73
74
  "eslint-plugin-jsdoc": "^50.6.0",
74
75
  "eslint-plugin-jsonc": "^2.18.2",
75
76
  "eslint-plugin-n": "^17.14.0",
76
77
  "eslint-plugin-ntnyq": "^0.7.1",
77
78
  "eslint-plugin-perfectionist": "^4.2.0",
79
+ "eslint-plugin-pinia": "^0.4.1",
78
80
  "eslint-plugin-prettier": "^5.2.1",
79
81
  "eslint-plugin-regexp": "^2.7.0",
80
82
  "eslint-plugin-toml": "^0.12.0",
@@ -86,7 +88,7 @@
86
88
  "globals": "^15.13.0",
87
89
  "jsonc-eslint-parser": "^2.4.0",
88
90
  "local-pkg": "^0.5.1",
89
- "prettier": "^3.4.1",
91
+ "prettier": "^3.4.2",
90
92
  "toml-eslint-parser": "^0.10.0",
91
93
  "typescript-eslint": "^8.17.0",
92
94
  "vue-eslint-parser": "^9.4.3",
@@ -97,7 +99,6 @@
97
99
  "@types/node": "^22.10.1",
98
100
  "bumpp": "^9.8.1",
99
101
  "eslint": "^9.16.0",
100
- "eslint-plugin-es-x": "^8.4.1",
101
102
  "eslint-typegen": "^0.3.2",
102
103
  "husky": "^9.1.7",
103
104
  "jiti": "^2.4.1",
@@ -118,7 +119,6 @@
118
119
  "@vitest/eslint-plugin": "patches/@vitest__eslint-plugin.patch"
119
120
  }
120
121
  },
121
- "prettier": "@ntnyq/prettier-config",
122
122
  "nano-staged": {
123
123
  "*.{js,ts,mjs,cjs,json,jsonc,md,yaml,yml}": "eslint --flag unstable_ts_config --fix"
124
124
  }