@mamindom/core 1.0.7 → 1.0.9
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 +8 -1
- package/src/eslint.config.mjs +57 -59
- package/src/prettier.config.mjs +26 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mamindom/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Core",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,5 +15,12 @@
|
|
|
15
15
|
},
|
|
16
16
|
"exports": {
|
|
17
17
|
"./prettier": "./src/prettier.config.mjs"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@eslint/js": "^10.0.1",
|
|
21
|
+
"eslint-config-prettier": "^10.1.8",
|
|
22
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
23
|
+
"globals": "^17.5.0",
|
|
24
|
+
"typescript-eslint": "^8.58.2"
|
|
18
25
|
}
|
|
19
26
|
}
|
package/src/eslint.config.mjs
CHANGED
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
66
|
-
|
|
57
|
+
|
|
58
|
+
'no-restricted-imports': ['warn', {
|
|
59
|
+
patterns: [
|
|
60
|
+
{
|
|
61
|
+
group: ['../../../*'],
|
|
62
|
+
message: 'Relative import too deep. Use path alias (@/) or check architecture.'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}],
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
'prettier/prettier': ['error', { endOfLine: 'auto' }]
|
|
68
|
+
}
|
|
70
69
|
}
|
|
71
|
-
}
|
|
72
70
|
]
|
package/src/prettier.config.mjs
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
/** @type {import("prettier").Config} */
|
|
2
2
|
export default {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
}
|