@nemigo/configs 1.5.0 → 1.6.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.
@@ -1,7 +1,7 @@
1
- import type { ConfigWithExtendsArray } from "../types.js";
1
+ import type { ConfigWithExtendsArray } from "./types.js";
2
2
  import { convertIgnorePatternToMinimatch, includeIgnoreFile } from "@eslint/compat";
3
+ import type { ConfigObject } from "@eslint/core";
3
4
  import type { Config } from "@sveltejs/kit";
4
- import type { Linter } from "eslint";
5
5
  export { includeIgnoreFile, convertIgnorePatternToMinimatch as convertIgnorePattern };
6
6
  /**
7
7
  * Опции создания конфигураций для {@link defineEslintConfig}
@@ -30,7 +30,7 @@ export interface EslintConfigOptions {
30
30
  ignore?: string;
31
31
  }
32
32
  /**
33
- * ## Создает flat-конфигурации для {@link https://eslint.org ESLint}
33
+ * ## Создаёт flat-конфигурации для {@link https://eslint.org ESLint}
34
34
  *
35
35
  * ### Включает в себя:
36
36
  * - Глобусы исключений из **.eslint.ignore** пакета (или иного файла) с помощью {@link includeIgnoreFile} из {@link https://www.npmjs.com/package/@eslint/compat @eslint/compat}
@@ -67,4 +67,4 @@ export interface EslintConfigOptions {
67
67
  * });
68
68
  * ```
69
69
  */
70
- export declare const defineEslintConfig: (options?: EslintConfigOptions, ...rest: ConfigWithExtendsArray) => Linter.Config[];
70
+ export declare const defineEslintConfig: (options?: EslintConfigOptions, ...rest: ConfigWithExtendsArray) => ConfigObject[];
@@ -7,7 +7,7 @@ import { join } from "node:path";
7
7
  import tslint from "typescript-eslint";
8
8
  export { includeIgnoreFile, convertIgnorePatternToMinimatch as convertIgnorePattern };
9
9
  /**
10
- * ## Создает flat-конфигурации для {@link https://eslint.org ESLint}
10
+ * ## Создаёт flat-конфигурации для {@link https://eslint.org ESLint}
11
11
  *
12
12
  * ### Включает в себя:
13
13
  * - Глобусы исключений из **.eslint.ignore** пакета (или иного файла) с помощью {@link includeIgnoreFile} из {@link https://www.npmjs.com/package/@eslint/compat @eslint/compat}
@@ -75,6 +75,7 @@ export const defineEslintConfig = (options, ...rest) => {
75
75
  });
76
76
  }
77
77
  if (options?.svelte) {
78
+ // @ts-expect-error <eslint-plugin-svelte со старыми типами>
78
79
  acc.push(svelteConfigs["flat/recommended"]);
79
80
  acc.push({
80
81
  files: [
@@ -1,13 +1,13 @@
1
- import type { Linter } from "eslint";
1
+ import type { ConfigObject } from "@eslint/core";
2
2
  export type InfiniteArray<T> = T | InfiniteArray<T>[];
3
- export type SimpleExtendsElement = string | Linter.Config;
4
- export type ExtendsElement = SimpleExtendsElement | InfiniteArray<Linter.Config>;
5
- export interface ConfigWithExtends extends Linter.Config {
3
+ export type SimpleExtendsElement = string | ConfigObject;
4
+ export type ExtendsElement = SimpleExtendsElement | InfiniteArray<ConfigObject>;
5
+ export interface ConfigWithExtends extends ConfigObject {
6
6
  extends?: ExtendsElement[];
7
7
  }
8
8
  /**
9
9
  * Массив конфигов для {@link defineConfig} из {@link https://www.npmjs.com/package/eslint/config eslint/config}
10
10
  *
11
- * @remarks Взято из {@link https://www.npmjs.com/package/@eslint/config-helpers @eslint/config-helpers/types (0.3.1)}, т.к. этот тип не экспортируется
11
+ * @remarks Взято из {@link https://www.npmjs.com/package/@eslint/config-helpers @eslint/config-helpers/types (0.4.2)}, т.к. этот тип не экспортируется
12
12
  */
13
13
  export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
@@ -53,7 +53,7 @@ export interface PrettierConfigOptions {
53
53
  overload?: PrettierExtraConfig;
54
54
  }
55
55
  /**
56
- * ## Создает готовый конфиг для {@link https://prettier.io Prettier}
56
+ * ## Создаёт готовый конфиг для {@link https://prettier.io Prettier}
57
57
  *
58
58
  * ### Включает в себя плагины:
59
59
  * - {@link https://www.npmjs.com/package/prettier-plugin-svelte prettier-plugin-svelte} для {@link https://svelte.dev Svelte}
@@ -4,7 +4,7 @@ import * as arrays from "prettier-plugin-multiline-arrays";
4
4
  import * as svelte from "prettier-plugin-svelte";
5
5
  import * as tailwind from "prettier-plugin-tailwindcss";
6
6
  /**
7
- * ## Создает готовый конфиг для {@link https://prettier.io Prettier}
7
+ * ## Создаёт готовый конфиг для {@link https://prettier.io Prettier}
8
8
  *
9
9
  * ### Включает в себя плагины:
10
10
  * - {@link https://www.npmjs.com/package/prettier-plugin-svelte prettier-plugin-svelte} для {@link https://svelte.dev Svelte}
@@ -31,7 +31,7 @@ export const defineSvelteConfig = (options) => ({
31
31
  compilerOptions: {
32
32
  runes: options.runes ?? true,
33
33
  /**
34
- * Использование современного AST (не знаю, на что влияет)
34
+ * Использование современного AST
35
35
  */
36
36
  modernAst: true,
37
37
  },
@@ -27,7 +27,7 @@ export const defineSveltePackageConfig = (options) => ({
27
27
  compilerOptions: {
28
28
  runes: options?.runes ?? true,
29
29
  /**
30
- * Использование современного AST (не знаю, на что влияет)
30
+ * Использование современного AST
31
31
  */
32
32
  modernAst: true,
33
33
  },
@@ -5,7 +5,7 @@ import type { ViteUserConfig } from "vitest/config";
5
5
  */
6
6
  export interface ViteConfigOptions {
7
7
  /**
8
- * Путь к директории, где читает .env-файлы. Отключено, так как предполагается использование **dotenv**
8
+ * Путь к директории, где читаются .env-файлы. Отключено, так как предполагается использование **dotenv**
9
9
  *
10
10
  * Аналог к {@link ViteUserConfig.envDir}
11
11
  *
@@ -13,7 +13,7 @@ export interface ViteProxyConfigOptions {
13
13
  */
14
14
  domain: string;
15
15
  /**
16
- * Префикс маршрута, который будет перенаправляться.
16
+ * Префикс маршрута, который будет перенаправляться
17
17
  *
18
18
  * @example
19
19
  * ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/configs",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Vlad Logvin",
@@ -81,18 +81,17 @@
81
81
  }
82
82
  },
83
83
  "dependencies": {
84
- "@eslint/compat": "1.4.0",
84
+ "@eslint/compat": "1.4.1",
85
+ "@eslint/config-helpers": "0.4.2",
86
+ "@eslint/core": "0.17.0",
85
87
  "@eslint/js": "9.38.0",
86
88
  "@types/eslint": "9.6.1",
87
- "eslint-plugin-svelte": "3.12.5",
89
+ "eslint-plugin-svelte": "3.13.0",
88
90
  "globals": "16.4.0",
89
91
  "prettier-plugin-css-order": "2.1.2",
90
92
  "prettier-plugin-multiline-arrays": "4.0.3",
91
93
  "prettier-plugin-svelte": "3.4.0",
92
94
  "prettier-plugin-tailwindcss": "0.7.1",
93
95
  "typescript-eslint": "8.46.2"
94
- },
95
- "devDependencies": {
96
- "@nemigo/configs": "1.5.0"
97
96
  }
98
97
  }