jh-be-tools 1.0.26 → 1.0.27
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.
|
@@ -3,7 +3,7 @@ import { RouteDef } from '../route-handler/routeCreation';
|
|
|
3
3
|
export interface QueryData {
|
|
4
4
|
params?: Record<string, string>;
|
|
5
5
|
query?: AxiosRequestConfig['params'];
|
|
6
|
-
headers?: AxiosHeaders;
|
|
6
|
+
headers?: typeof AxiosHeaders;
|
|
7
7
|
body?: unknown;
|
|
8
8
|
}
|
|
9
9
|
export interface Request {
|
|
@@ -0,0 +1,67 @@
|
|
|
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-plugin-import';
|
|
9
|
+
import nodePlugin from 'eslint-plugin-n';
|
|
10
|
+
import prettier from 'eslint-plugin-prettier';
|
|
11
|
+
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
|
+
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')),
|
|
22
|
+
{
|
|
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
|
+
settings: {
|
|
38
|
+
'import/parsers': {
|
|
39
|
+
'@typescript-eslint/parser': ['.ts', '.tsx'],
|
|
40
|
+
},
|
|
41
|
+
'import/resolver': {
|
|
42
|
+
typescript: {
|
|
43
|
+
alwaysTryTypes: true,
|
|
44
|
+
},
|
|
45
|
+
node: {
|
|
46
|
+
extensions: ['.js', '.ts'],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
rules: {
|
|
51
|
+
semi: 'off',
|
|
52
|
+
'import/order': [
|
|
53
|
+
'error',
|
|
54
|
+
{
|
|
55
|
+
'newlines-between': 'always',
|
|
56
|
+
alphabetize: {
|
|
57
|
+
order: 'asc',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
'import/export': 'off',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
ignores: ['eslint.config.mts'],
|
|
66
|
+
},
|
|
67
|
+
];
|