@ksv90/tools 0.0.1
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/README.md +3 -0
- package/package.json +64 -0
- package/packs/commitlint/index.js +5 -0
- package/packs/eslint/index.js +68 -0
- package/packs/lint-staged/index.js +4 -0
- package/packs/prettier/index.js +13 -0
- package/packs/typescript/tsconfig.json +15 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ksv90/tools",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "ksv90",
|
|
8
|
+
"license": "ISC",
|
|
9
|
+
"files": [
|
|
10
|
+
"packs"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
"./prettier": {
|
|
14
|
+
"import": "./packs/prettier/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./eslint": {
|
|
17
|
+
"import": "./packs/eslint/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./typescript": {
|
|
20
|
+
"import": "./packs/typescript/tsconfig.json"
|
|
21
|
+
},
|
|
22
|
+
"./lint-staged": {
|
|
23
|
+
"import": "./packs/lint-staged/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./commitlint": {
|
|
26
|
+
"import": "./packs/commitlint/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@commitlint/cli": "^18.6.1",
|
|
31
|
+
"@commitlint/config-conventional": "^18.6.3",
|
|
32
|
+
"@eslint/js": "^9.14.0",
|
|
33
|
+
"@types/node": "^20.16.11",
|
|
34
|
+
"eslint": "^9.14.0",
|
|
35
|
+
"eslint-config-prettier": "^9.1.0",
|
|
36
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
37
|
+
"eslint-plugin-import": "^2.31.0",
|
|
38
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
39
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
40
|
+
"globals": "^15.12.0",
|
|
41
|
+
"husky": "^9.1.6",
|
|
42
|
+
"lint-staged": "^15.2.10",
|
|
43
|
+
"prettier": "^3.3.3",
|
|
44
|
+
"typescript": "^5.5.4",
|
|
45
|
+
"typescript-eslint": "^8.13.0",
|
|
46
|
+
"vite": "^5.4.8",
|
|
47
|
+
"vite-plugin-dts": "^3.9.1"
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=16.0.0"
|
|
51
|
+
},
|
|
52
|
+
"homepage": "https://github.com/ksv90/tools",
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/ksv90/tools.git"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"lint": "eslint",
|
|
59
|
+
"format": "prettier --write .",
|
|
60
|
+
"test": "echo test",
|
|
61
|
+
"build": "echo build",
|
|
62
|
+
"prepublish": "pnpm build"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import eslintRules from '@eslint/js';
|
|
2
|
+
import importPlugin from 'eslint-plugin-import';
|
|
3
|
+
import prettierPlugin from 'eslint-plugin-prettier/recommended';
|
|
4
|
+
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
|
|
5
|
+
import globals from 'globals';
|
|
6
|
+
import { config as tsConfig, configs as tsRules } from 'typescript-eslint';
|
|
7
|
+
|
|
8
|
+
export default tsConfig(
|
|
9
|
+
{ ignores: ['dist/*'] },
|
|
10
|
+
{
|
|
11
|
+
languageOptions: {
|
|
12
|
+
globals: { ...globals.browser, ...globals.node },
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
settings: {
|
|
17
|
+
'import/resolver': {
|
|
18
|
+
typescript: true,
|
|
19
|
+
node: true,
|
|
20
|
+
},
|
|
21
|
+
'import/extensions': ['.js', '.ts'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
plugins: {
|
|
26
|
+
'simple-import-sort': simpleImportSortPlugin,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
extends: [
|
|
31
|
+
eslintRules.configs.recommended,
|
|
32
|
+
...tsRules.strictTypeChecked,
|
|
33
|
+
...tsRules.stylisticTypeChecked,
|
|
34
|
+
importPlugin.flatConfigs.recommended,
|
|
35
|
+
prettierPlugin,
|
|
36
|
+
],
|
|
37
|
+
files: ['**/*.{js,ts}'],
|
|
38
|
+
rules: {
|
|
39
|
+
'no-console': 'warn',
|
|
40
|
+
'simple-import-sort/exports': 'warn',
|
|
41
|
+
'simple-import-sort/imports': 'warn',
|
|
42
|
+
'import/first': 'error',
|
|
43
|
+
'import/newline-after-import': 'error',
|
|
44
|
+
'import/no-duplicates': 'error',
|
|
45
|
+
'@typescript-eslint/array-type': ['error', { default: 'array-simple', readonly: 'array-simple' }],
|
|
46
|
+
'@typescript-eslint/no-empty-object-type': ['error', { allowInterfaces: 'with-single-extends' }],
|
|
47
|
+
'@typescript-eslint/no-extraneous-class': ['error', { allowWithDecorator: true }],
|
|
48
|
+
'@typescript-eslint/no-invalid-void-type': 'warn',
|
|
49
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
50
|
+
'@typescript-eslint/no-unused-vars': [
|
|
51
|
+
'error',
|
|
52
|
+
{
|
|
53
|
+
args: 'all',
|
|
54
|
+
argsIgnorePattern: '^_',
|
|
55
|
+
caughtErrors: 'all',
|
|
56
|
+
caughtErrorsIgnorePattern: '^_',
|
|
57
|
+
destructuredArrayIgnorePattern: '^_',
|
|
58
|
+
varsIgnorePattern: '^_',
|
|
59
|
+
ignoreRestSiblings: true,
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
files: ['**/*.js'],
|
|
66
|
+
...tsRules.disableTypeChecked,
|
|
67
|
+
},
|
|
68
|
+
);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** @type {import("prettier").Config} */
|
|
2
|
+
const config = {
|
|
3
|
+
printWidth: 150,
|
|
4
|
+
tabWidth: 2,
|
|
5
|
+
semi: true,
|
|
6
|
+
singleQuote: true,
|
|
7
|
+
trailingComma: 'all',
|
|
8
|
+
bracketSpacing: true,
|
|
9
|
+
bracketSameLine: false,
|
|
10
|
+
arrowParens: 'always',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default config;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
4
|
+
"declaration": true,
|
|
5
|
+
"lib": ["DOM", "ESNext"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "Bundler",
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"noUnusedLocals": false,
|
|
10
|
+
"noUnusedParameters": false,
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"strict": true,
|
|
13
|
+
"target": "ESNext"
|
|
14
|
+
}
|
|
15
|
+
}
|