@mamindom/core 1.0.7 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mamindom/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Core",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -1,72 +1,70 @@
1
-
2
1
  import eslint from '@eslint/js'
3
2
  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
4
3
  import globals from 'globals'
5
4
  import tseslint from 'typescript-eslint'
6
5
 
7
6
  export const coreEslintConfig = [
8
- {
9
- ignores: [
10
- 'eslint.config.mjs',
11
- 'prettier.config.mjs',
12
- 'dist/**',
13
- 'node_modules/**',
14
- 'coverage/**'
15
- ]
16
- },
17
-
18
- eslint.configs.recommended,
19
-
20
-
21
- ...tseslint.configs.recommendedTypeChecked,
22
- ...tseslint.configs.strictTypeChecked,
23
-
24
-
25
- eslintPluginPrettierRecommended,
26
-
27
- {
28
- languageOptions: {
29
- globals: {
30
- ...globals.node,
31
- ...globals.jest
32
- },
33
- sourceType: 'module'
7
+ {
8
+ ignores: [
9
+ 'eslint.config.mjs',
10
+ 'prettier.config.mjs',
11
+ 'dist/**',
12
+ 'node_modules/**',
13
+ 'coverage/**',
14
+ '**/*.pb.ts',
15
+ '**/*_pb.ts',
16
+ '**/*_grpc.ts',
17
+ ]
34
18
  },
35
- rules: {
36
-
37
- '@typescript-eslint/no-explicit-any': 'warn',
38
-
39
-
40
- '@typescript-eslint/no-floating-promises': 'error',
41
-
42
-
43
- '@typescript-eslint/await-thenable': 'error',
44
-
19
+ eslint.configs.recommended,
45
20
 
46
- '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
47
-
48
-
49
- '@typescript-eslint/no-misused-promises': 'error',
21
+ ...tseslint.configs.strictTypeChecked,
22
+ eslintPluginPrettierRecommended,
23
+ {
24
+ languageOptions: {
25
+ globals: {
26
+ ...globals.node,
27
+ ...globals.jest
28
+ },
29
+ sourceType: 'module'
30
+
31
+ },
32
+ rules: {
33
+
34
+ '@typescript-eslint/no-explicit-any': 'warn',
35
+ '@typescript-eslint/no-floating-promises': 'error',
36
+ '@typescript-eslint/await-thenable': 'error',
37
+ '@typescript-eslint/no-unused-vars': ['error', {
38
+ argsIgnorePattern: '^_',
39
+ varsIgnorePattern: '^_',
40
+ caughtErrorsIgnorePattern: '^_'
41
+ }],
42
+ '@typescript-eslint/no-misused-promises': 'error',
43
+ '@typescript-eslint/consistent-type-imports': ['error', {
44
+ prefer: 'type-imports',
45
+ fixStyle: 'inline-type-imports'
46
+ }],
47
+ '@typescript-eslint/consistent-type-exports': 'error',
50
48
 
51
-
52
- 'no-console': 'warn',
53
-
54
-
55
- 'eqeqeq': ['error', 'always'],
56
-
57
-
58
- 'curly': ['error', 'all'],
59
-
60
-
61
- 'object-shorthand': 'error',
49
+
50
+ 'no-console': 'warn',
51
+ 'eqeqeq': ['error', 'always'],
52
+ 'curly': ['error', 'all'],
53
+ 'object-shorthand': 'error',
54
+ 'no-return-await': 'off',
55
+ '@typescript-eslint/return-await': ['error', 'always'],
62
56
 
63
-
64
-
65
- 'no-return-await': 'off',
66
- '@typescript-eslint/return-await': ['error', 'always'],
57
+
58
+ 'no-restricted-imports': ['warn', {
59
+ patterns: [
60
+ {
61
+ group: ['../../../*'],
62
+ message: 'Занадто глибокий відносний імпорт. Використовуй path alias (@/) або перевір архітектуру.'
63
+ }
64
+ ]
65
+ }],
67
66
 
68
-
69
- 'prettier/prettier': ['error', { endOfLine: 'auto' }]
67
+ 'prettier/prettier': ['error', { endOfLine: 'auto' }]
68
+ }
70
69
  }
71
- }
72
70
  ]
@@ -1,29 +1,30 @@
1
- /**@type {import("prettier").Config} */
1
+ /** @type {import("prettier").Config} */
2
2
  export default {
3
- trailingComma: 'none',
4
- tabWidth: 4,
5
- useTabs: true,
6
- semi: false,
7
- singleQuote: true,
8
- jsxSingleQuote: true,
9
- arrowParens: 'avoid',
10
- importOrderSeparation: true,
11
-
12
- importOrderSortSpecifiers: true,
13
- importOrderCaseInsensitive: true,
14
- importOrderParserPlugins: [
15
- 'classProperties',
16
- 'decorators-legacy',
17
- 'typescript',
18
- ],
3
+ printWidth: 100,
4
+ tabWidth: 4,
5
+ useTabs: true,
6
+ semi: false,
7
+ singleQuote: true,
8
+ jsxSingleQuote: true,
9
+ trailingComma: 'none',
10
+ arrowParens: 'avoid',
19
11
 
20
12
 
21
- importOrder: [
22
- '^./observability/tracing/tracing.module$',
23
- '<THIRD_PARTY_MODULES>',
24
- '^@/(.*)$',
25
- '^../(.*)',
26
- '^./(.*)',
27
- ],
28
- plugins: ['@trivago/prettier-plugin-sort-imports'],
13
+ importOrder: [
14
+ '^./observability/tracing/tracing.module$',
15
+ '<THIRD_PARTY_MODULES>',
16
+ '^@/(.*)$',
17
+ '^\\.\\./(.*)',
18
+ '^\\.(.*)',
19
+ ],
20
+ importOrderSeparation: true,
21
+ importOrderSortSpecifiers: true,
22
+ importOrderCaseInsensitive: true,
23
+ importOrderParserPlugins: [
24
+ 'classProperties',
25
+ 'decorators-legacy',
26
+ 'typescript',
27
+ ],
28
+
29
+ plugins: ['@trivago/prettier-plugin-sort-imports'],
29
30
  }