@ningboyz/types 1.8.62 → 1.8.64
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/.prettierignore +0 -0
- package/.prettierrc +15 -0
- package/eslint.config.js +30 -0
- package/package.json +3 -22
- package/tsconfig.json +22 -0
- package/vite.config.ts +33 -0
package/.prettierignore
ADDED
|
File without changes
|
package/.prettierrc
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"printWidth": 200,
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"useTabs": false,
|
|
5
|
+
"semi": true,
|
|
6
|
+
"singleQuote": false,
|
|
7
|
+
"trailingComma": "none",
|
|
8
|
+
"bracketSpacing": true,
|
|
9
|
+
"bracketSameLine": true,
|
|
10
|
+
"arrowParens": "always",
|
|
11
|
+
"htmlWhitespaceSensitivity": "ignore",
|
|
12
|
+
"vueIndentScriptAndStyle": false,
|
|
13
|
+
"endOfLine": "auto",
|
|
14
|
+
"singleAttributePerLine": false
|
|
15
|
+
}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import eslint from "@eslint/js"
|
|
2
|
+
import tsParser from "@typescript-eslint/parser";
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
{
|
|
6
|
+
ignores: ['node_modules', 'build', 'dist'],
|
|
7
|
+
},
|
|
8
|
+
eslint.configs.recommended,
|
|
9
|
+
{
|
|
10
|
+
files: ['**/*.{ts, tsx}'],
|
|
11
|
+
rules: {
|
|
12
|
+
'comma-dangle': "off",
|
|
13
|
+
'no-console': "error",
|
|
14
|
+
"no-debugger": "error",
|
|
15
|
+
"no-unused-vars": ["error", {
|
|
16
|
+
'vars': 'all',
|
|
17
|
+
'args': 'after-used',
|
|
18
|
+
'caughtErrors': 'none',
|
|
19
|
+
'argsIgnorePattern': '^_'
|
|
20
|
+
}],
|
|
21
|
+
'no-empty': ["error", { "allowEmptyCatch": true }]
|
|
22
|
+
},
|
|
23
|
+
languageOptions: {
|
|
24
|
+
parser: tsParser,
|
|
25
|
+
parserOptions: {
|
|
26
|
+
extraFileExtension: [".ts"],
|
|
27
|
+
parser: tsParser
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
}]
|
package/package.json
CHANGED
|
@@ -1,29 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ningboyz/types",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.64",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "宁波甬政类型库",
|
|
7
7
|
"author": "nbyt-syq",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"keywords": [],
|
|
10
|
-
"
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./es/index.d.ts",
|
|
13
|
-
"import": "./es/index.js",
|
|
14
|
-
"default": "./es/index.js"
|
|
15
|
-
},
|
|
16
|
-
"./es/*": "./es/*",
|
|
17
|
-
"./src/*": "./src/*",
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
"main": "es/index.js",
|
|
21
|
-
"types": "es/index.d.ts",
|
|
22
|
-
"miniprogram": "es",
|
|
23
|
-
"files": [
|
|
24
|
-
"es",
|
|
25
|
-
"src"
|
|
26
|
-
],
|
|
10
|
+
"main": "src/index.ts",
|
|
27
11
|
"scripts": {
|
|
28
12
|
"build": "vite build",
|
|
29
13
|
"prettier": "prettier --config ./.prettierrc --write \"./**/*.{ts,tsx}\" "
|
|
@@ -41,9 +25,6 @@
|
|
|
41
25
|
"@types/lodash": "4.17.16",
|
|
42
26
|
"@typescript-eslint/parser": "^8.41.0",
|
|
43
27
|
"eslint": "^9.34.0",
|
|
44
|
-
"prettier": "^3.6.2"
|
|
45
|
-
"vite": "7.1.3",
|
|
46
|
-
"vite-plugin-dts": "4.5.4",
|
|
47
|
-
"vite-plugin-tsx-resolve-types": "0.0.4"
|
|
28
|
+
"prettier": "^3.6.2"
|
|
48
29
|
}
|
|
49
30
|
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"lib": ["ES2023", "DOM"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
|
|
8
|
+
/* Bundler mode */
|
|
9
|
+
"moduleResolution": "bundler",
|
|
10
|
+
"allowImportingTsExtensions": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"moduleDetection": "force",
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
|
|
15
|
+
/* Linting */
|
|
16
|
+
"strict": true,
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"noFallthroughCasesInSwitch": true,
|
|
20
|
+
"experimentalDecorators": true
|
|
21
|
+
}
|
|
22
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
|
|
3
|
+
import tsxResolveTypes from "vite-plugin-tsx-resolve-types";
|
|
4
|
+
import dts from "vite-plugin-dts";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [
|
|
8
|
+
tsxResolveTypes(),
|
|
9
|
+
dts({
|
|
10
|
+
entryRoot: "src",
|
|
11
|
+
// outDir: ['es', 'lib'],
|
|
12
|
+
outDir: ["es"],
|
|
13
|
+
exclude: ["**/tests/**"]
|
|
14
|
+
})
|
|
15
|
+
],
|
|
16
|
+
build: {
|
|
17
|
+
rollupOptions: {
|
|
18
|
+
external: ["lodash", "@aximario/json-tree"],
|
|
19
|
+
output: [
|
|
20
|
+
{
|
|
21
|
+
preserveModules: true,
|
|
22
|
+
preserveModulesRoot: "src",
|
|
23
|
+
entryFileNames: "[name].js",
|
|
24
|
+
format: "esm",
|
|
25
|
+
dir: "es"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
lib: {
|
|
30
|
+
entry: "src/index.ts"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|