@nemigo/configs 1.6.0 → 2.1.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/.eslint.ignore CHANGED
@@ -32,7 +32,7 @@ coverage
32
32
  test-results
33
33
  temp-*
34
34
  logs
35
- *.log
35
+ *.log*
36
36
 
37
37
  # BUILD
38
38
  .deploy
@@ -1,7 +1,7 @@
1
- import type { ConfigWithExtendsArray } from "./types.js";
2
1
  import { convertIgnorePatternToMinimatch, includeIgnoreFile } from "@eslint/compat";
3
2
  import type { ConfigObject } from "@eslint/core";
4
3
  import type { Config } from "@sveltejs/kit";
4
+ import type { ConfigWithExtendsArray } from "./types.js";
5
5
  export { includeIgnoreFile, convertIgnorePatternToMinimatch as convertIgnorePattern };
6
6
  /**
7
7
  * Опции создания конфигураций для {@link defineEslintConfig}
@@ -1,9 +1,9 @@
1
+ import { join } from "node:path";
1
2
  import { convertIgnorePatternToMinimatch, includeIgnoreFile } from "@eslint/compat";
2
3
  import jslint from "@eslint/js";
3
- import { configs as svelteConfigs } from "eslint-plugin-svelte";
4
4
  import { defineConfig } from "eslint/config";
5
+ import { configs as svelteConfigs } from "eslint-plugin-svelte";
5
6
  import globals from "globals";
6
- import { join } from "node:path";
7
7
  import tslint from "typescript-eslint";
8
8
  export { includeIgnoreFile, convertIgnorePatternToMinimatch as convertIgnorePattern };
9
9
  /**
@@ -78,11 +78,7 @@ export const defineEslintConfig = (options, ...rest) => {
78
78
  // @ts-expect-error <eslint-plugin-svelte со старыми типами>
79
79
  acc.push(svelteConfigs["flat/recommended"]);
80
80
  acc.push({
81
- files: [
82
- "**/*.svelte",
83
- "**/*.svelte.ts",
84
- "**/*.svelte.js",
85
- ],
81
+ files: ["**/*.svelte", "**/*.svelte.ts", "**/*.svelte.js"],
86
82
  languageOptions: {
87
83
  parserOptions: {
88
84
  projectService: true,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { defineEslintConfig, convertIgnorePattern, includeIgnoreFile } from "./eslint/index.js";
1
+ export { convertIgnorePattern, defineEslintConfig, includeIgnoreFile } from "./eslint/index.js";
2
2
  export { definePrettierConfig, pretty } from "./prettier/index.js";
3
3
  export { defineSvelteConfig } from "./svelte/index.js";
4
4
  export { defineSveltePackageConfig } from "./svelte/package.js";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { defineEslintConfig, convertIgnorePattern, includeIgnoreFile } from "./eslint/index.js";
1
+ export { convertIgnorePattern, defineEslintConfig, includeIgnoreFile } from "./eslint/index.js";
2
2
  export { definePrettierConfig, pretty } from "./prettier/index.js";
3
3
  export { defineSvelteConfig } from "./svelte/index.js";
4
4
  export { defineSveltePackageConfig } from "./svelte/package.js";
@@ -1,4 +1,4 @@
1
- import type { Config as PrettierConfig, Options } from "prettier";
1
+ import type { Options, Config as PrettierConfig } from "prettier";
2
2
  import type { CssOrderPrettierConfig } from "prettier-plugin-css-order";
3
3
  import type { MultilineArrayOptions } from "prettier-plugin-multiline-arrays";
4
4
  import type { PluginConfig as SveltePrettierConfig } from "prettier-plugin-svelte";
@@ -38,12 +38,7 @@ export const definePrettierConfig = (options) => ({
38
38
  trailingComma: "es5",
39
39
  bracketSameLine: true,
40
40
  multilineArraysWrapThreshold: options?.arraysWrapThreshold ?? 3,
41
- plugins: [
42
- svelte,
43
- css,
44
- arrays,
45
- tailwind,
46
- ],
41
+ plugins: [svelte, css, arrays, tailwind],
47
42
  overrides: [
48
43
  {
49
44
  files: "*.svelte",
@@ -51,14 +51,14 @@ export const defineSvelteConfig = (options) => ({
51
51
  */
52
52
  typescript: {
53
53
  config: (config) => {
54
- config["compilerOptions"] = {
55
- ...getOptionalObject(config["compilerOptions"]),
54
+ config.compilerOptions = {
55
+ ...getOptionalObject(config.compilerOptions),
56
56
  allowJs: true,
57
57
  checkJs: true,
58
58
  target: "ES2023", // override
59
59
  module: "NodeNext", // override
60
60
  moduleResolution: "NodeNext", // override
61
- // noEmit: true,
61
+ // noemit: true,
62
62
  strict: true,
63
63
  noImplicitAny: false,
64
64
  // isolatedModules: true,
@@ -69,14 +69,9 @@ export const defineSvelteConfig = (options) => ({
69
69
  skipLibCheck: true,
70
70
  disableSizeLimit: true,
71
71
  };
72
- config["exclude"] = setifyArray([
73
- ...getOptionalArray(config["exclude"]),
74
- "../**/trash/**",
75
- "../**/drafts/**",
76
- ...(options.exclude ?? []),
77
- ]);
78
- config["include"] = setifyArray([
79
- ...getOptionalArray(config["include"]),
72
+ config.exclude = setifyArray([...getOptionalArray(config.exclude), "../**/trash/**", "../**/drafts/**", ...(options.exclude ?? [])]);
73
+ config.include = setifyArray([
74
+ ...getOptionalArray(config.include),
80
75
  "../scripts",
81
76
  "../types",
82
77
  "../*.ts",
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export type { EslintConfigOptions } from "./eslint/index.js";
2
2
  export type { ConfigWithExtendsArray } from "./eslint/types.js";
3
- export type { PrettierConfigOptions, PrettierExtraConfig, MultilineArrayPrettierConfig, CssOrderPrettierConfig, SveltePrettierConfig, PrettierConfig, TailwindPrettierConfig, } from "./prettier/index.js";
3
+ export type { CssOrderPrettierConfig, MultilineArrayPrettierConfig, PrettierConfig, PrettierConfigOptions, PrettierExtraConfig, SveltePrettierConfig, TailwindPrettierConfig, } from "./prettier/index.js";
4
4
  export type { SvelteConfigOptions } from "./svelte/index.js";
5
5
  export type { SveltePackageConfigOptions } from "./svelte/package.js";
6
6
  export type { ViteConfigOptions } from "./vite/index.js";
@@ -1,5 +1,4 @@
1
- import type { BuildOptions, PluginOption, ServerOptions } from "vite";
2
- import type { ViteUserConfig } from "vitest/config";
1
+ import type { BuildOptions, PluginOption, ServerOptions, UserConfig } from "vite";
3
2
  /**
4
3
  * Опции создания конфигурации для {@link defineViteConfig}
5
4
  */
@@ -7,7 +6,7 @@ export interface ViteConfigOptions {
7
6
  /**
8
7
  * Путь к директории, где читаются .env-файлы. Отключено, так как предполагается использование **dotenv**
9
8
  *
10
- * Аналог к {@link ViteUserConfig.envDir}
9
+ * Аналог к {@link UserConfig.envDir}
11
10
  *
12
11
  * @default false
13
12
  *
@@ -60,4 +59,4 @@ export interface ViteConfigOptions {
60
59
  * - По умолчанию строгая конфигурация порта сервера
61
60
  * - По умолчанию путь к тестам `"./src/**\/*.{test,spec}.{ts,js}"`
62
61
  */
63
- export declare const defineViteConfig: (options?: ViteConfigOptions, test?: ViteUserConfig["test"]) => ViteUserConfig;
62
+ export declare const defineViteConfig: (options?: ViteConfigOptions) => UserConfig;
@@ -1,4 +1,4 @@
1
- import { defineConfig } from "vitest/config";
1
+ import { defineConfig } from "vite";
2
2
  /**
3
3
  * ## Реструктурированная конфигурация для {@link https://vite.dev Vite} через {@link defineConfig} от {@link https://vitest.dev Vitest}
4
4
  *
@@ -8,7 +8,7 @@ import { defineConfig } from "vitest/config";
8
8
  * - По умолчанию строгая конфигурация порта сервера
9
9
  * - По умолчанию путь к тестам `"./src/**\/*.{test,spec}.{ts,js}"`
10
10
  */
11
- export const defineViteConfig = (options, test) => defineConfig({
11
+ export const defineViteConfig = (options) => defineConfig({
12
12
  envDir: options?.env ?? false,
13
13
  /**
14
14
  * Префикс публичных env-переменных (чтобы совпадало с svelte-kit)
@@ -48,12 +48,12 @@ export const defineViteConfig = (options, test) => defineConfig({
48
48
  *
49
49
  * @see https://vitest.dev/config
50
50
  */
51
- test: test ?? {
52
- /**
53
- * Glob-путь к файлам тестов
54
- *
55
- * @see https://vitest.dev/config/#include
56
- */
57
- include: ["./src/**/*.{test,spec}.{ts,js}"],
58
- },
51
+ // test: test ?? {
52
+ // /**
53
+ // * Glob-путь к файлам тестов
54
+ // *
55
+ // * @see https://vitest.dev/config/#include
56
+ // */
57
+ // include: ["./src/**/*.{test,spec}.{ts,js}"],
58
+ // },
59
59
  });
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@nemigo/configs",
3
- "version": "1.6.0",
3
+ "version": "2.1.0",
4
4
  "private": false,
5
5
  "author": {
6
6
  "name": "Vlad Logvin",
7
7
  "email": "vlad.logvin84@gmail.com"
8
8
  },
9
9
  "type": "module",
10
- "engines": {
11
- "node": ">=22"
12
- },
13
10
  "scripts": {
14
- "build": "svelte-package && rimraf .svelte-kit",
15
- "check": "tsc --noemit",
16
- "lint": "eslint ./",
17
- "format": "prettier --write ./"
11
+ "build": "bunx --bun svelte-package && bunx --bun rimraf .svelte-kit",
12
+ "check": "bunx --bun tsc --noemit",
13
+ "eslint": "bunx --bun eslint ./",
14
+ "eslint:fix": "bunx --bun eslint --fix ./",
15
+ "lint": "biome lint",
16
+ "lint:fix": "biome lint --fix --unsafe",
17
+ "lint:fix:unsafe": "biome lint --fix --unsafe",
18
+ "format": "biome check --write --linter-enabled=false"
18
19
  },
19
20
  "files": [
20
21
  "dist",
@@ -87,11 +88,11 @@
87
88
  "@eslint/js": "9.38.0",
88
89
  "@types/eslint": "9.6.1",
89
90
  "eslint-plugin-svelte": "3.13.0",
90
- "globals": "16.4.0",
91
+ "globals": "16.5.0",
91
92
  "prettier-plugin-css-order": "2.1.2",
92
93
  "prettier-plugin-multiline-arrays": "4.0.3",
93
94
  "prettier-plugin-svelte": "3.4.0",
94
95
  "prettier-plugin-tailwindcss": "0.7.1",
95
- "typescript-eslint": "8.46.2"
96
+ "typescript-eslint": "8.46.3"
96
97
  }
97
98
  }