jh-be-tools 1.0.51 → 1.0.52

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,118 +1,70 @@
1
- declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
2
- plugins: {
3
- '@typescript-eslint': import("eslint").ESLint.Plugin;
4
- import: import("eslint").ESLint.Plugin;
5
- prettier: import("eslint").ESLint.Plugin;
6
- 'unused-imports': import("eslint").ESLint.Plugin;
7
- node: import("eslint").ESLint.Plugin;
8
- };
9
- languageOptions: {
10
- globals: {
11
- __dirname: false;
12
- __filename: false;
13
- AbortController: false;
14
- AbortSignal: false;
15
- atob: false;
16
- Blob: false;
17
- BroadcastChannel: false;
18
- btoa: false;
19
- Buffer: false;
20
- ByteLengthQueuingStrategy: false;
21
- clearImmediate: false;
22
- clearInterval: false;
23
- clearTimeout: false;
24
- CompressionStream: false;
25
- console: false;
26
- CountQueuingStrategy: false;
27
- crypto: false;
28
- Crypto: false;
29
- CryptoKey: false;
30
- CustomEvent: false;
31
- DecompressionStream: false;
32
- DOMException: false;
33
- Event: false;
34
- EventTarget: false;
35
- exports: true;
36
- fetch: false;
37
- File: false;
38
- FormData: false;
39
- global: false;
40
- Headers: false;
41
- Intl: false;
42
- MessageChannel: false;
43
- MessageEvent: false;
44
- MessagePort: false;
45
- module: false;
46
- performance: false;
47
- PerformanceEntry: false;
48
- PerformanceMark: false;
49
- PerformanceMeasure: false;
50
- PerformanceObserver: false;
51
- PerformanceObserverEntryList: false;
52
- PerformanceResourceTiming: false;
53
- process: false;
54
- queueMicrotask: false;
55
- ReadableByteStreamController: false;
56
- ReadableStream: false;
57
- ReadableStreamBYOBReader: false;
58
- ReadableStreamBYOBRequest: false;
59
- ReadableStreamDefaultController: false;
60
- ReadableStreamDefaultReader: false;
61
- Request: false;
62
- require: false;
63
- Response: false;
64
- setImmediate: false;
65
- setInterval: false;
66
- setTimeout: false;
67
- structuredClone: false;
68
- SubtleCrypto: false;
69
- TextDecoder: false;
70
- TextDecoderStream: false;
71
- TextEncoder: false;
72
- TextEncoderStream: false;
73
- TransformStream: false;
74
- TransformStreamDefaultController: false;
75
- URL: false;
76
- URLSearchParams: false;
77
- WebAssembly: false;
78
- WritableStream: false;
79
- WritableStreamDefaultController: false;
80
- WritableStreamDefaultWriter: false;
81
- };
82
- parser: typeof tsParser;
83
- ecmaVersion: string;
84
- };
1
+ declare const _default: ({
2
+ readonly rules: Readonly<import("eslint").Linter.RulesRecord>;
3
+ } | import("eslint").Linter.FlatConfig<import("eslint").Linter.RulesRecord> | import("@typescript-eslint/utils/ts-eslint").FlatConfig.Config | {
85
4
  settings: {
86
5
  'import/parsers': {
87
6
  '@typescript-eslint/parser': string[];
88
7
  };
89
8
  'import/resolver': {
90
9
  typescript: {
91
- alwaysTryTypes: boolean;
10
+ project: string;
92
11
  };
93
12
  node: {
94
13
  extensions: string[];
95
14
  };
96
15
  };
97
16
  };
17
+ plugins: {
18
+ 'unused-imports': import("eslint").ESLint.Plugin;
19
+ prettier: import("eslint").ESLint.Plugin;
20
+ };
21
+ languageOptions: {
22
+ parser: import("@typescript-eslint/utils/ts-eslint").Parser.LooseParserModule;
23
+ ecmaVersion: number;
24
+ sourceType: string;
25
+ parserOptions: {
26
+ project: string[];
27
+ sourceType: string;
28
+ ecmaFeatures: {
29
+ modules: boolean;
30
+ };
31
+ };
32
+ };
98
33
  rules: {
34
+ '@typescript-eslint/explicit-member-accessibility': number;
35
+ '@typescript-eslint/explicit-function-return-type': number;
36
+ '@typescript-eslint/consistent-type-definitions': string[];
37
+ '@typescript-eslint/no-unused-vars': (string | {
38
+ vars: string;
39
+ varsIgnorePattern: string;
40
+ args: string;
41
+ argsIgnorePattern: string;
42
+ ignoreRestSiblings: boolean;
43
+ })[];
44
+ '@typescript-eslint/no-floating-promises': (string | {
45
+ ignoreIIFE: boolean;
46
+ ignoreVoid: boolean;
47
+ })[];
48
+ 'no-return-await': string;
49
+ '@typescript-eslint/return-await': string[];
50
+ 'require-await': string;
51
+ '@typescript-eslint/require-await': string;
52
+ 'prettier/prettier': (string | {
53
+ singleQuote: boolean;
54
+ })[];
99
55
  'import/order': (string | {
100
56
  'newlines-between': string;
101
57
  alphabetize: {
102
58
  order: string;
103
59
  };
104
60
  })[];
105
- 'import/export': string;
106
- quotes: string[];
107
- 'prettier/prettier': (string | {
108
- singleQuote: boolean;
109
- semi: boolean;
110
- useTabs: boolean;
111
- printWidth: number;
112
- })[];
113
- semi: string[];
114
- indent: string[];
61
+ 'import/order:/no-named-as-default-member': number;
62
+ 'unused-imports/no-unused-imports': string;
63
+ '@typescript-eslint/no-non-null-assertion': string;
64
+ eqeqeq: number;
65
+ 'no-console': number;
66
+ 'no-unused-expressions': number;
67
+ curly: string;
115
68
  };
116
69
  })[];
117
70
  export default _default;
118
- import tsParser from '@typescript-eslint/parser';
@@ -1,70 +1,70 @@
1
- import path from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
- import { fixupConfigRules, fixupPluginRules } from '@eslint/compat';
4
- import { FlatCompat } from '@eslint/eslintrc';
5
- import js from '@eslint/js';
6
- import typescriptEslint from '@typescript-eslint/eslint-plugin';
7
- import tsParser from '@typescript-eslint/parser';
8
- import _import from '@eslint/eslint-plugin-module';
9
- import nodePlugin from 'eslint-plugin-n';
10
- import prettier from 'eslint-plugin-prettier';
1
+ import eslint from '@eslint/js';
2
+ import tsEslint from 'typescript-eslint';
3
+ import importPlugin from 'eslint-plugin-import';
4
+ import prettierConfig from 'eslint-config-prettier';
5
+ import eslintPluginPrettier from 'eslint-plugin-prettier';
11
6
  import unusedImports from 'eslint-plugin-unused-imports';
12
- import globals from 'globals';
13
- const __filename = fileURLToPath(import.meta.url);
14
- const __dirname = path.dirname(__filename);
15
- const compat = new FlatCompat({
16
- baseDirectory: __dirname,
17
- recommendedConfig: js.configs.recommended,
18
- allConfig: js.configs.all,
19
- });
20
7
  export default [
21
- ...fixupConfigRules(compat.extends('plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', 'plugin:import/recommended', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript')),
8
+ eslint.configs.recommended,
9
+ ...tsEslint.configs.recommendedTypeChecked,
10
+ importPlugin.flatConfigs.recommended,
11
+ importPlugin.flatConfigs.typescript,
12
+ prettierConfig,
22
13
  {
23
- plugins: {
24
- '@typescript-eslint': fixupPluginRules(typescriptEslint),
25
- import: fixupPluginRules(_import),
26
- prettier: fixupPluginRules(prettier),
27
- 'unused-imports': unusedImports,
28
- node: fixupPluginRules(nodePlugin),
29
- },
30
- languageOptions: {
31
- globals: {
32
- ...globals.node,
33
- },
34
- parser: tsParser,
35
- ecmaVersion: 'latest',
36
- },
37
14
  settings: {
38
15
  'import/parsers': {
39
16
  '@typescript-eslint/parser': ['.ts', '.tsx'],
40
17
  },
41
18
  'import/resolver': {
42
19
  typescript: {
43
- alwaysTryTypes: true,
20
+ project: './tsconfig.json',
44
21
  },
45
22
  node: {
46
- extensions: ['.js', '.ts'],
23
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
24
+ },
25
+ },
26
+ },
27
+ plugins: {
28
+ 'unused-imports': unusedImports,
29
+ prettier: eslintPluginPrettier,
30
+ },
31
+ languageOptions: {
32
+ parser: tsEslint.parser,
33
+ ecmaVersion: 6,
34
+ sourceType: 'module',
35
+ parserOptions: {
36
+ project: ['./tsconfig.json'],
37
+ sourceType: 'module',
38
+ ecmaFeatures: {
39
+ modules: true,
47
40
  },
48
41
  },
49
42
  },
50
43
  rules: {
51
- 'import/order': [
44
+ '@typescript-eslint/explicit-member-accessibility': 0,
45
+ '@typescript-eslint/explicit-function-return-type': 0,
46
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
47
+ '@typescript-eslint/no-unused-vars': [
52
48
  'error',
53
- {
54
- 'newlines-between': 'always',
55
- alphabetize: {
56
- order: 'asc',
57
- },
58
- },
49
+ { vars: 'all', varsIgnorePattern: '^_', args: 'after-used', argsIgnorePattern: '^_', ignoreRestSiblings: true },
59
50
  ],
60
- 'import/export': 'off',
61
- quotes: ['off'],
62
- 'prettier/prettier': ['error', { singleQuote: true, semi: false, useTabs: true, printWidth: 150 }],
63
- semi: ['error', 'never'],
64
- indent: ['error', 'tab'],
51
+ '@typescript-eslint/no-floating-promises': ['error', { ignoreIIFE: true, ignoreVoid: false }],
52
+ 'no-return-await': 'off',
53
+ '@typescript-eslint/return-await': ['error', 'always'],
54
+ 'require-await': 'off',
55
+ '@typescript-eslint/require-await': 'error',
56
+ 'prettier/prettier': ['error', { singleQuote: true }],
57
+ 'import/order': ['error', { 'newlines-between': 'always', alphabetize: { order: 'asc' } }],
58
+ 'import/order:/no-named-as-default-member': 0,
59
+ 'unused-imports/no-unused-imports': 'error',
60
+ '@typescript-eslint/no-non-null-assertion': 'error',
61
+ eqeqeq: 2,
62
+ 'no-console': 2,
63
+ 'no-unused-expressions': 2,
64
+ curly: 'error',
65
65
  },
66
66
  },
67
67
  {
68
- ignores: ['eslint.config.mjs'],
68
+ ignores: ['node_modules', '**/build', '**/coverage', '**/dist/**', 'eslint.config.mjs'],
69
69
  },
70
70
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jh-be-tools",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,13 +13,15 @@
13
13
  "devDependencies": {
14
14
  "@eslint/js": "^9.30.0",
15
15
  "@types/express": "^5.0.1",
16
- "@types/node": "^22.13.11",
16
+ "@types/node": "^24.0.10",
17
17
  "eslint": "^9.30.0",
18
+ "eslint-import-resolver-typescript": "^4.4.4",
18
19
  "typescript": "^5.8.3",
19
20
  "typescript-eslint": "^8.35.0"
20
21
  },
21
22
  "dependencies": {
22
23
  "axios": "^1.10.0",
24
+ "eslint-plugin-import": "^2.32.0",
23
25
  "express": "^5.1.0",
24
26
  "zod": "^3.25.67"
25
27
  },