@d-kuehn/eslint-config 1.0.3 → 1.0.5

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
@@ -101,9 +101,9 @@ The Typescript plugin further accept setting some
101
101
  ```ts
102
102
  interface Options {
103
103
  ignores?: string[];
104
- plugins?: Record<string, TSESLint.FlatConfig.Plugin | TSESLint.FlatConfig.Plugins>;
104
+ plugins?: Record<string, TSESLint.Linter.Plugin>;
105
105
  rules?: Record<string, TSESLint.FlatConfig.RuleEntry>;
106
- languageOptions?: TSESLint.FlatConfig.LanguageOptions
106
+ languageOptions?: Linter.LanguageOptions;
107
107
  }
108
108
  ```
109
109
 
package/dist/index.d.ts CHANGED
@@ -1,14 +1,15 @@
1
+ import { Linter } from 'eslint';
1
2
  import { TSESLint } from '@typescript-eslint/utils';
2
3
 
4
+ type Awaitable<T> = Promise<T> | T;
3
5
  interface Options {
4
6
  ignores?: string[];
5
- plugins?: Record<string, TSESLint.FlatConfig.Plugin | TSESLint.FlatConfig.Plugins>;
6
- rules?: Record<string, TSESLint.FlatConfig.RuleEntry>;
7
+ plugins?: Record<string, TSESLint.Linter.Plugin>;
8
+ rules?: Record<string, TSESLint.SharedConfig.RuleEntry>;
7
9
  }
8
10
  interface OptionsTypescript extends Options {
9
- languageOptions?: TSESLint.FlatConfig.LanguageOptions;
11
+ languageOptions?: Linter.LanguageOptions;
10
12
  }
11
- type Awaitable<T> = Promise<T> | T;
12
13
 
13
14
  /**
14
15
  * generates a flat ESLint configuration for
@@ -18,9 +19,9 @@ type Awaitable<T> = Promise<T> | T;
18
19
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
19
20
  *
20
21
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
21
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
22
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
22
23
  */
23
- declare const defaults: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
24
+ declare const defaults: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
24
25
 
25
26
  declare const GLOBS_EXCLUDE: string[];
26
27
  declare const GLOB_VUE = "**/*.vue";
@@ -52,9 +53,9 @@ declare const GLOBS_TESTS_E2E: string[];
52
53
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
53
54
  *
54
55
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
55
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
56
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
56
57
  */
57
- declare const importX: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
58
+ declare const importX: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
58
59
 
59
60
  /**
60
61
  * generates a flat ESLint configuration for {@link https://github.com/gajus/eslint-plugin-jsdoc|eslint-plugin-jsdoc}
@@ -63,9 +64,9 @@ declare const importX: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
63
64
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
64
65
  *
65
66
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
66
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
67
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
67
68
  */
68
- declare const jsdoc: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
69
+ declare const jsdoc: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
69
70
 
70
71
  /**
71
72
  * generates a flat ESLint configuration for
@@ -75,9 +76,9 @@ declare const jsdoc: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
75
76
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
76
77
  *
77
78
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
78
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
79
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
79
80
  */
80
- declare const jsonc: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
81
+ declare const jsonc: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
81
82
 
82
83
  /**
83
84
  * generates a flat ESLint configuration for
@@ -87,9 +88,9 @@ declare const jsonc: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
87
88
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
88
89
  *
89
90
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
90
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
91
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
91
92
  */
92
- declare const perfectionist: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
93
+ declare const perfectionist: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
93
94
 
94
95
  /**
95
96
  * generates a flat ESLint configuration for
@@ -99,9 +100,9 @@ declare const perfectionist: (options?: Options) => TSESLint.FlatConfig.ConfigPr
99
100
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
100
101
  *
101
102
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
102
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
103
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
103
104
  */
104
- declare const playwright: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
105
+ declare const playwright: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
105
106
 
106
107
  /**
107
108
  * generates a flat ESLint configuration for
@@ -111,9 +112,9 @@ declare const playwright: (options?: Options) => TSESLint.FlatConfig.ConfigPromi
111
112
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
112
113
  *
113
114
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
114
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
115
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
115
116
  */
116
- declare const regexp: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
117
+ declare const regexp: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
117
118
 
118
119
  /**
119
120
  * generates a flat ESLint configuration for
@@ -123,9 +124,9 @@ declare const regexp: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
123
124
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
124
125
  *
125
126
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
126
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
127
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
127
128
  */
128
- declare const storybook: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
129
+ declare const storybook: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
129
130
 
130
131
  /**
131
132
  * generates a flat ESLint configuration for
@@ -135,9 +136,9 @@ declare const storybook: (options?: Options) => TSESLint.FlatConfig.ConfigPromis
135
136
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
136
137
  *
137
138
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
138
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
139
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
139
140
  */
140
- declare const stylistic: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
141
+ declare const stylistic: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
141
142
 
142
143
  /**
143
144
  * generates a flat ESLint configuration for
@@ -147,9 +148,9 @@ declare const stylistic: (options?: Options) => TSESLint.FlatConfig.ConfigPromis
147
148
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
148
149
  *
149
150
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
150
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
151
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
151
152
  */
152
- declare const tailwindCss: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
153
+ declare const tailwindCss: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
153
154
 
154
155
  /**
155
156
  * generates a flat ESLint configuration for
@@ -159,9 +160,9 @@ declare const tailwindCss: (options?: Options) => TSESLint.FlatConfig.ConfigProm
159
160
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
160
161
  *
161
162
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
162
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
163
+ * @returns {Promise<Linter.Config[]>} - a promise that resolves to an array of flat ESLint configurations.
163
164
  */
164
- declare const testingLibrary: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
165
+ declare const testingLibrary: (options?: Options) => Promise<Linter.Config[]>;
165
166
 
166
167
  /**
167
168
  * generates a flat ESLint configuration for
@@ -171,9 +172,9 @@ declare const testingLibrary: (options?: Options) => TSESLint.FlatConfig.ConfigP
171
172
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
172
173
  *
173
174
  * @param {OptionsTypescript} [options={}] - an optional object that can contain additional ignores, plugins, and rules
174
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations
175
+ * @returns {Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations
175
176
  */
176
- declare const typescript: (options?: OptionsTypescript) => TSESLint.FlatConfig.ConfigPromise;
177
+ declare const typescript: (options?: OptionsTypescript) => Promise<TSESLint.Linter.ConfigType>;
177
178
 
178
179
  /**
179
180
  * generates a flat ESLint configuration for
@@ -183,9 +184,9 @@ declare const typescript: (options?: OptionsTypescript) => TSESLint.FlatConfig.C
183
184
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
184
185
  *
185
186
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
186
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
187
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
187
188
  */
188
- declare const unicorn: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
189
+ declare const unicorn: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
189
190
 
190
191
  /**
191
192
  * generates a flat ESLint configuration for
@@ -195,9 +196,9 @@ declare const unicorn: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
195
196
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
196
197
  *
197
198
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
198
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
199
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
199
200
  */
200
- declare const vitest: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
201
+ declare const vitest: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
201
202
 
202
203
  /**
203
204
  * generates a flat ESLint configuration for
@@ -207,9 +208,9 @@ declare const vitest: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
207
208
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
208
209
  *
209
210
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
210
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
211
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
211
212
  */
212
- declare const vue: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
213
+ declare const vue: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
213
214
 
214
215
  /**
215
216
  * generates a flat ESLint configuration for
@@ -219,23 +220,22 @@ declare const vue: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
219
220
  * {@link https://eslint.org/docs/latest/use/configure/configuration-files#configuring-rules|rules},
220
221
  *
221
222
  * @param {Options} [options={}] - an optional object that can contain additional ignores, plugins, and rules.
222
- * @returns {TSESLint.FlatConfig.ConfigPromise} - a promise that resolves to an array of flat ESLint configurations.
223
+ * @returns { Promise<TSESLint.Linter.ConfigType>} - a promise that resolves to an array of flat ESLint configurations.
223
224
  */
224
- declare const vueAccessibility: (options?: Options) => TSESLint.FlatConfig.ConfigPromise;
225
+ declare const vueAccessibility: (options?: Options) => Promise<TSESLint.Linter.ConfigType>;
225
226
 
226
227
  /**
227
228
  * combines multiple ESLint flat configurations into a single array.
228
229
  * useful for merging different configuration sources that might be provided as individual configs
229
230
  * or arrays of configs, handling both synchronous and asynchronous inputs
230
231
  *
231
- * @param {...Awaitable<TSESLint.FlatConfig.Config
232
- * | TSESLint.FlatConfig.Config[]>} configs - variable number of ESLint configurations
232
+ * @param {...Awaitable<TSESLint.Linter.ConfigType>} configs - variable number of ESLint configurations
233
233
  * each parameter can be:
234
234
  * - a single FlatConfig.Config object
235
235
  * - an array of FlatConfig.Config objects
236
236
  * - a Promise that resolves to either of the above
237
237
  *
238
- * @returns {Promise<TSESLint.FlatConfig.Config[]>} a promise that resolves to a flattened array
238
+ * @returns {Promise<TSESLint.Linter.ConfigType[]>} a promise that resolves to a flattened array
239
239
  * containing all provided configurations
240
240
  *
241
241
  * @example
@@ -245,6 +245,6 @@ declare const vueAccessibility: (options?: Options) => TSESLint.FlatConfig.Confi
245
245
  * [customConfig1, customConfig2]
246
246
  * );
247
247
  */
248
- declare const combine: (...configs: Awaitable<TSESLint.FlatConfig.Config | TSESLint.FlatConfig.Config[]>[]) => Promise<TSESLint.FlatConfig.Config[]>;
248
+ declare const combine: (...configs: Awaitable<TSESLint.Linter.ConfigType>[]) => Promise<TSESLint.Linter.ConfigType[]>;
249
249
 
250
250
  export { GLOBS_EXCLUDE, GLOBS_TESTS, GLOBS_TESTS_E2E, GLOB_CSS, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STORYBOOK, GLOB_STYLE, GLOB_TS, GLOB_TSX, GLOB_VUE, combine, defaults, importX, jsdoc, jsonc, perfectionist, playwright, regexp, storybook, stylistic, tailwindCss, testingLibrary, typescript, unicorn, vitest, vue, vueAccessibility };
package/dist/index.js CHANGED
@@ -417,8 +417,6 @@ var perfectionist = async (options = {}) => {
417
417
  type: "natural"
418
418
  }
419
419
  ],
420
- // ref: https://github.com/azat-io/eslint-plugin-perfectionist/issues/175
421
- "perfectionist/sort-vue-attributes": "off",
422
420
  ...options?.rules && options.rules
423
421
  }
424
422
  }
@@ -876,9 +874,9 @@ var unicorn = async (options = {}) => {
876
874
  pascalCase: true
877
875
  }
878
876
  }
879
- ]
880
- },
881
- ...options?.rules && options.rules
877
+ ],
878
+ ...options?.rules && options.rules
879
+ }
882
880
  }
883
881
  ];
884
882
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-kuehn/eslint-config",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -24,28 +24,28 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@eslint/compat": "1.2.3",
27
- "@eslint/js": "9.14.0",
28
- "@stylistic/eslint-plugin": "2.10.1",
29
- "@typescript-eslint/parser": "8.14.0",
27
+ "@eslint/js": "9.15.0",
28
+ "@stylistic/eslint-plugin": "2.11.0",
29
+ "@typescript-eslint/parser": "8.15.0",
30
30
  "@vitest/eslint-plugin": "1.1.10",
31
31
  "@vue/eslint-config-typescript": "14.1.3",
32
- "eslint": "9.14.0",
32
+ "eslint": "9.15.0",
33
33
  "eslint-flat-config-utils": "0.4.0",
34
34
  "eslint-plugin-import-x": "4.4.2",
35
35
  "eslint-plugin-jsdoc": "50.5.0",
36
- "eslint-plugin-jsonc": "2.18.1",
37
- "eslint-plugin-perfectionist": "3.9.1",
38
- "eslint-plugin-playwright": "2.0.1",
36
+ "eslint-plugin-jsonc": "2.18.2",
37
+ "eslint-plugin-perfectionist": "4.0.1",
38
+ "eslint-plugin-playwright": "2.1.0",
39
39
  "eslint-plugin-regexp": "2.7.0",
40
- "eslint-plugin-storybook": "0.11.0",
40
+ "eslint-plugin-storybook": "0.11.1",
41
41
  "eslint-plugin-tailwindcss": "3.17.5",
42
42
  "eslint-plugin-testing-library": "6.4.0",
43
- "eslint-plugin-unicorn": "56.0.0",
43
+ "eslint-plugin-unicorn": "56.0.1",
44
44
  "eslint-plugin-vue": "9.31.0",
45
45
  "eslint-plugin-vuejs-accessibility": "2.4.1",
46
46
  "globals": "15.12.0",
47
47
  "jsonc-eslint-parser": "2.4.0",
48
- "typescript-eslint": "8.14.0",
48
+ "typescript-eslint": "8.15.0",
49
49
  "vue-eslint-parser": "9.4.3"
50
50
  },
51
51
  "devDependencies": {