@nemigo/configs 1.6.0 → 2.0.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";
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@nemigo/configs",
3
- "version": "1.6.0",
3
+ "version": "2.0.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
11
  "build": "svelte-package && rimraf .svelte-kit",
15
12
  "check": "tsc --noemit",
16
- "lint": "eslint ./",
17
- "format": "prettier --write ./"
13
+ "eslint": "eslint ./",
14
+ "eslint:fix": "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",
@@ -70,7 +71,8 @@
70
71
  "eslint": ">=9.0.0",
71
72
  "prettier": ">=3.6.0",
72
73
  "svelte": ">=5.0.0",
73
- "typescript": ">=5.8.0"
74
+ "typescript": ">=5.8.0",
75
+ "vitest": ">=4.0.0"
74
76
  },
75
77
  "peerDependenciesMeta": {
76
78
  "@sveltejs/vite-plugin-svelte": {
@@ -78,6 +80,9 @@
78
80
  },
79
81
  "svelte": {
80
82
  "optional": true
83
+ },
84
+ "vitest": {
85
+ "optional": true
81
86
  }
82
87
  },
83
88
  "dependencies": {
@@ -87,11 +92,12 @@
87
92
  "@eslint/js": "9.38.0",
88
93
  "@types/eslint": "9.6.1",
89
94
  "eslint-plugin-svelte": "3.13.0",
90
- "globals": "16.4.0",
95
+ "globals": "16.5.0",
91
96
  "prettier-plugin-css-order": "2.1.2",
92
97
  "prettier-plugin-multiline-arrays": "4.0.3",
93
98
  "prettier-plugin-svelte": "3.4.0",
94
99
  "prettier-plugin-tailwindcss": "0.7.1",
95
- "typescript-eslint": "8.46.2"
100
+ "typescript-eslint": "8.46.3",
101
+ "vitest": "4.0.6"
96
102
  }
97
103
  }