@jeportie/create-tskickstart 1.6.0

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.
@@ -0,0 +1,120 @@
1
+ import eslint from '@eslint/js';
2
+ import stylistic from '@stylistic/eslint-plugin';
3
+ import prettier from 'eslint-config-prettier';
4
+ import importPlugin from 'eslint-plugin-import';
5
+ import tseslint from 'typescript-eslint';
6
+
7
+ export default tseslint.config(
8
+ /* ---------------- GLOBAL IGNORES ---------------- */
9
+ {
10
+ ignores: [
11
+ '**/dist/**',
12
+ '**/node_modules/**',
13
+ '**/coverage/**',
14
+ '**/.vite/**',
15
+ ],
16
+ },
17
+
18
+ /* ---------------- BASE CONFIGS ---------------- */
19
+ eslint.configs.recommended,
20
+ ...tseslint.configs.recommendedTypeChecked,
21
+ ...tseslint.configs.stylisticTypeChecked,
22
+
23
+ /* ---------------- TYPESCRIPT PARSER OPTIONS ---------------- */
24
+ {
25
+ languageOptions: {
26
+ parserOptions: {
27
+ projectService: true,
28
+ tsconfigRootDir: import.meta.dirname,
29
+ },
30
+ },
31
+ },
32
+
33
+ /* ---------------- IMPORT PLUGIN ---------------- */
34
+ {
35
+ plugins: {
36
+ import: importPlugin,
37
+ },
38
+
39
+ settings: {
40
+ 'import/resolver': {
41
+ typescript: true,
42
+ node: true,
43
+ },
44
+ },
45
+
46
+ rules: {
47
+ 'import/first': 'error',
48
+ 'import/no-cycle': 'error',
49
+ 'import/no-self-import': 'error',
50
+ 'import/no-unresolved': 'error',
51
+ 'import/no-useless-path-segments': 'error',
52
+ 'import/order': [
53
+ 'error',
54
+ {
55
+ alphabetize: { order: 'asc', caseInsensitive: true },
56
+ groups: [
57
+ 'builtin',
58
+ 'external',
59
+ 'internal',
60
+ 'parent',
61
+ ['sibling', 'index'],
62
+ 'type',
63
+ ],
64
+ 'newlines-between': 'always',
65
+ },
66
+ ],
67
+ },
68
+ },
69
+
70
+ /* ---------------- STYLISTIC RULES ---------------- */
71
+ {
72
+ plugins: {
73
+ '@stylistic': stylistic,
74
+ },
75
+
76
+ rules: {
77
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
78
+ },
79
+ },
80
+
81
+ /* ---------------- GENERAL RULES ---------------- */
82
+ {
83
+ rules: {
84
+ 'sort-imports': 'off',
85
+ 'spaced-comment': [
86
+ 'error',
87
+ 'always',
88
+ { block: { markers: ['!'], balanced: true } },
89
+ ],
90
+ '@typescript-eslint/no-unused-vars': [
91
+ 'error',
92
+ { argsIgnorePattern: '^_' },
93
+ ],
94
+ },
95
+ },
96
+
97
+ /* ---------------- TEST OVERRIDES ---------------- */
98
+ {
99
+ files: [
100
+ '**/__tests__/**/*.{ts,tsx}',
101
+ '**/*.test.{ts,tsx}',
102
+ '**/*.spec.{ts,tsx}',
103
+ ],
104
+ rules: {
105
+ '@typescript-eslint/no-explicit-any': 'off',
106
+ '@typescript-eslint/no-unsafe-assignment': 'off',
107
+ '@typescript-eslint/no-unsafe-member-access': 'off',
108
+ '@typescript-eslint/no-unsafe-call': 'off',
109
+ },
110
+ },
111
+
112
+ /* ---------------- CONFIG FILES ---------------- */
113
+ {
114
+ files: ['*.config.{js,mjs,cjs}', '**/*.config.{js,mjs,cjs}'],
115
+ ...tseslint.configs.disableTypeChecked,
116
+ },
117
+
118
+ /* ---------------- PRETTIER MUST BE LAST ---------------- */
119
+ prettier,
120
+ );
@@ -0,0 +1,132 @@
1
+ import cspellPlugin from '@cspell/eslint-plugin';
2
+ import eslint from '@eslint/js';
3
+ import stylistic from '@stylistic/eslint-plugin';
4
+ import prettier from 'eslint-config-prettier';
5
+ import importPlugin from 'eslint-plugin-import';
6
+ import tseslint from 'typescript-eslint';
7
+
8
+ export default tseslint.config(
9
+ /* ---------------- GLOBAL IGNORES ---------------- */
10
+ {
11
+ ignores: [
12
+ '**/dist/**',
13
+ '**/node_modules/**',
14
+ '**/coverage/**',
15
+ '**/.vite/**',
16
+ ],
17
+ },
18
+
19
+ /* ---------------- BASE CONFIGS ---------------- */
20
+ eslint.configs.recommended,
21
+ ...tseslint.configs.recommendedTypeChecked,
22
+ ...tseslint.configs.stylisticTypeChecked,
23
+
24
+ /* ---------------- TYPESCRIPT PARSER OPTIONS ---------------- */
25
+ {
26
+ languageOptions: {
27
+ parserOptions: {
28
+ projectService: true,
29
+ tsconfigRootDir: import.meta.dirname,
30
+ },
31
+ },
32
+ },
33
+
34
+ /* ---------------- IMPORT PLUGIN ---------------- */
35
+ {
36
+ plugins: {
37
+ import: importPlugin,
38
+ },
39
+
40
+ settings: {
41
+ 'import/resolver': {
42
+ typescript: true,
43
+ node: true,
44
+ },
45
+ },
46
+
47
+ rules: {
48
+ 'import/first': 'error',
49
+ 'import/no-cycle': 'error',
50
+ 'import/no-self-import': 'error',
51
+ 'import/no-unresolved': 'error',
52
+ 'import/no-useless-path-segments': 'error',
53
+ 'import/order': [
54
+ 'error',
55
+ {
56
+ alphabetize: { order: 'asc', caseInsensitive: true },
57
+ groups: [
58
+ 'builtin',
59
+ 'external',
60
+ 'internal',
61
+ 'parent',
62
+ ['sibling', 'index'],
63
+ 'type',
64
+ ],
65
+ 'newlines-between': 'always',
66
+ },
67
+ ],
68
+ },
69
+ },
70
+
71
+ /* ---------------- STYLISTIC RULES ---------------- */
72
+ {
73
+ plugins: {
74
+ '@stylistic': stylistic,
75
+ },
76
+
77
+ rules: {
78
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
79
+ },
80
+ },
81
+
82
+ /* ---------------- CSPELL RULES ---------------- */
83
+ {
84
+ plugins: {
85
+ '@cspell': cspellPlugin,
86
+ },
87
+
88
+ rules: {
89
+ '@cspell/spellchecker': ['warn', { autoFix: true }],
90
+ },
91
+ },
92
+
93
+ /* ---------------- GENERAL RULES ---------------- */
94
+ {
95
+ rules: {
96
+ 'sort-imports': 'off',
97
+ 'spaced-comment': [
98
+ 'error',
99
+ 'always',
100
+ { block: { markers: ['!'], balanced: true } },
101
+ ],
102
+ '@typescript-eslint/no-unused-vars': [
103
+ 'error',
104
+ { argsIgnorePattern: '^_' },
105
+ ],
106
+ },
107
+ },
108
+
109
+ /* ---------------- TEST OVERRIDES ---------------- */
110
+ {
111
+ files: [
112
+ '**/__tests__/**/*.{ts,tsx}',
113
+ '**/*.test.{ts,tsx}',
114
+ '**/*.spec.{ts,tsx}',
115
+ ],
116
+ rules: {
117
+ '@typescript-eslint/no-explicit-any': 'off',
118
+ '@typescript-eslint/no-unsafe-assignment': 'off',
119
+ '@typescript-eslint/no-unsafe-member-access': 'off',
120
+ '@typescript-eslint/no-unsafe-call': 'off',
121
+ },
122
+ },
123
+
124
+ /* ---------------- CONFIG FILES ---------------- */
125
+ {
126
+ files: ['*.config.{js,mjs,cjs}', '**/*.config.{js,mjs,cjs}'],
127
+ ...tseslint.configs.disableTypeChecked,
128
+ },
129
+
130
+ /* ---------------- PRETTIER MUST BE LAST ---------------- */
131
+ prettier,
132
+ );
@@ -0,0 +1,12 @@
1
+ export default {
2
+ printWidth: 80,
3
+ tabWidth: 2,
4
+ useTabs: false,
5
+ semi: true,
6
+ singleQuote: true,
7
+ trailingComma: 'all',
8
+ bracketSameLine: false,
9
+ bracketSpacing: true,
10
+ arrowParens: 'always',
11
+ proseWrap: 'never',
12
+ };
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2022",
4
+ "lib": ["es2023"],
5
+ "module": "NodeNext",
6
+ "moduleResolution": "NodeNext",
7
+ "resolveJsonModule": true,
8
+ "declaration": true,
9
+ "declarationMap": true,
10
+ "sourceMap": true,
11
+ "removeComments": true,
12
+ "isolatedModules": true,
13
+ "allowSyntheticDefaultImports": true,
14
+ "esModuleInterop": true,
15
+ "forceConsistentCasingInFileNames": true,
16
+ "strict": true,
17
+ "alwaysStrict": true,
18
+ "noImplicitAny": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "exactOptionalPropertyTypes": true,
22
+ "noImplicitReturns": true,
23
+ "noFallthroughCasesInSwitch": true,
24
+ "noUncheckedIndexedAccess": true,
25
+ "noImplicitOverride": true,
26
+ "allowUnusedLabels": false,
27
+ "allowUnreachableCode": false,
28
+ "skipLibCheck": true,
29
+ "verbatimModuleSyntax": true,
30
+ "noErrorTruncation": true,
31
+ "useUnknownInCatchVariables": false
32
+ }
33
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "module": "ESNExt",
5
+ "moduleResolution": "Bundler",
6
+ "noEmit": true,
7
+ "baseUrl": ".",
8
+ "paths": {
9
+ "@/*": [
10
+ "src/*"
11
+ ]
12
+ },
13
+ "types": [
14
+ "node"
15
+ ]
16
+ },
17
+ "include": [
18
+ "src",
19
+ "test",
20
+ "__tests__",
21
+ "./*.ts",
22
+ "./*.js",
23
+ "./*.mjs",
24
+ "./*.cjs"
25
+ ],
26
+ "exclude": [
27
+ "node_modules"
28
+ ]
29
+ }
@@ -0,0 +1,23 @@
1
+ import { resolve } from 'path';
2
+
3
+ import { defineConfig } from 'vitest/config';
4
+
5
+ export default defineConfig({
6
+ resolve: {
7
+ alias: {
8
+ '@': resolve(__dirname, 'src'),
9
+ },
10
+ },
11
+ test: {
12
+ include: [
13
+ '**/__tests__/**/*.{test,spec}.{ts,tsx,js}',
14
+ '**/test/**/*.{test,spec}.{ts,tsx,js}',
15
+ ],
16
+ coverage: {
17
+ enabled: true,
18
+ reporter: ['json-summary', 'json', 'html'],
19
+ include: ['src/**/*'],
20
+ reportOnFailure: true,
21
+ },
22
+ },
23
+ });
@@ -0,0 +1,17 @@
1
+ import { resolve } from 'path';
2
+
3
+ import { defineConfig } from 'vitest/config';
4
+
5
+ export default defineConfig({
6
+ resolve: {
7
+ alias: {
8
+ '@': resolve(__dirname, 'src'),
9
+ },
10
+ },
11
+ test: {
12
+ include: [
13
+ '**/__tests__/**/*.{test,spec}.{ts,tsx,js}',
14
+ '**/test/**/*.{test,spec}.{ts,tsx,js}',
15
+ ],
16
+ },
17
+ });