@dimensional-innovations/tool-config 3.0.1 → 3.0.2
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 +12 -12
- package/bin/lib/package-manager.js +6 -6
- package/package.json +5 -5
- package/src/tools/prettier/README.md +7 -7
- package/src/tools/semantic-release/README.md +10 -10
- package/src/tools/semantic-release/templates/.gitlab-ci.yml +9 -9
- package/src/tools/semantic-release/templates/bitbucket-pipelines.yml +30 -30
- package/src/tools/semantic-release/templates/github-workflow.yml +14 -14
- package/src/tools/stylelint/README.md +6 -6
- package/src/tools/typescript/README.md +17 -17
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@dimensional-innovations/tool-config)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
|
-
[](https://nodejs.org/)
|
|
8
8
|
[](./tests/)
|
|
9
9
|
|
|
10
10
|
**One package. Five tools. Zero configuration.**
|
|
@@ -16,7 +16,7 @@ Stop juggling multiple config packages. This single package provides battle-test
|
|
|
16
16
|
**Before:**
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
19
|
+
yarn add --dev \
|
|
20
20
|
eslint @eslint/js eslint-config-airbnb eslint-plugin-react \
|
|
21
21
|
prettier prettier-config-standard \
|
|
22
22
|
stylelint stylelint-config-standard \
|
|
@@ -28,7 +28,7 @@ npm install --save-dev \
|
|
|
28
28
|
**After:**
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
|
|
31
|
+
yarn add --dev @dimensional-innovations/tool-config
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
## Features
|
|
@@ -48,7 +48,7 @@ npm install --save-dev @dimensional-innovations/tool-config
|
|
|
48
48
|
### Installation
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
|
-
|
|
51
|
+
yarn add --dev @dimensional-innovations/tool-config
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
Or use the interactive CLI:
|
|
@@ -111,7 +111,7 @@ export default createConfig('semantic-release')
|
|
|
111
111
|
|
|
112
112
|
That's it! The configs will automatically detect your framework and TypeScript setup.
|
|
113
113
|
|
|
114
|
-
### Add
|
|
114
|
+
### Add Scripts
|
|
115
115
|
|
|
116
116
|
```json
|
|
117
117
|
{
|
|
@@ -124,7 +124,7 @@ That's it! The configs will automatically detect your framework and TypeScript s
|
|
|
124
124
|
"style:fix": "stylelint '**/*.css' --fix --allow-empty-input",
|
|
125
125
|
"typecheck": "tsc --noEmit",
|
|
126
126
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
127
|
-
"check-all": "
|
|
127
|
+
"check-all": "yarn prettier && yarn style && yarn lint && yarn typecheck"
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
```
|
|
@@ -365,7 +365,7 @@ npx @dimensional-innovations/tool-config
|
|
|
365
365
|
- Choose which tools to configure
|
|
366
366
|
- Auto-detects framework and TypeScript
|
|
367
367
|
- Creates config files automatically
|
|
368
|
-
- Adds
|
|
368
|
+
- Adds scripts to package.json (including `check-all` for multiple tools)
|
|
369
369
|
- Automated CI/CD pipeline setup
|
|
370
370
|
- **Uninstall support** - Clean removal of configs and scripts
|
|
371
371
|
- Supports dry-run mode
|
|
@@ -642,13 +642,13 @@ npx prettier --check . --debug-check
|
|
|
642
642
|
|
|
643
643
|
**ESLint not detecting framework:** Ensure framework is in `package.json` dependencies, or explicitly set `framework: 'react'`.
|
|
644
644
|
|
|
645
|
-
**TypeScript parsing errors:** Install TypeScript: `
|
|
645
|
+
**TypeScript parsing errors:** Install TypeScript: `yarn add --dev typescript`
|
|
646
646
|
|
|
647
647
|
**Prettier plugin not found:** Install required peer dependency:
|
|
648
648
|
|
|
649
649
|
```bash
|
|
650
|
-
|
|
651
|
-
|
|
650
|
+
yarn add --dev prettier-plugin-svelte # Svelte
|
|
651
|
+
yarn add --dev prettier-plugin-astro # Astro
|
|
652
652
|
```
|
|
653
653
|
|
|
654
654
|
**Stylelint not linting .vue files:** Update script: `"style": "stylelint '**/*.css' '**/*.vue' --allow-empty-input"`
|
|
@@ -657,8 +657,8 @@ npm install --save-dev prettier-plugin-astro # Astro
|
|
|
657
657
|
|
|
658
658
|
## Requirements
|
|
659
659
|
|
|
660
|
-
- **Node.js**: >= 22.
|
|
661
|
-
- **
|
|
660
|
+
- **Node.js**: >= 22.20.0 (Node.js 22 LTS "Jod")
|
|
661
|
+
- **Yarn**: >= 4.0.0 (or npm >= 10.0.0)
|
|
662
662
|
- **ECMAScript**: ES2025 (ESM modules required)
|
|
663
663
|
|
|
664
664
|
## Philosophy
|
|
@@ -23,7 +23,7 @@ const CHECK_ORDER = ['prettier', 'stylelint', 'eslint', 'typescript']
|
|
|
23
23
|
*/
|
|
24
24
|
function generateCheckAllScript(installedTools) {
|
|
25
25
|
const commands = CHECK_ORDER.filter(tool => installedTools.includes(tool))
|
|
26
|
-
.map(tool => `
|
|
26
|
+
.map(tool => `yarn ${CHECK_SCRIPT_MAP[tool]}`)
|
|
27
27
|
.join(' && ')
|
|
28
28
|
|
|
29
29
|
return commands || null
|
|
@@ -75,11 +75,11 @@ export function updatePackageJsonScripts(tools, getScriptsFn, context) {
|
|
|
75
75
|
const existingCheckAll = packageJson.scripts['check-all']
|
|
76
76
|
|
|
77
77
|
// Only add if doesn't exist, or update if it's our auto-generated pattern
|
|
78
|
-
// Auto-generated scripts follow pattern: "
|
|
78
|
+
// Auto-generated scripts follow pattern: "yarn X && yarn Y && ..."
|
|
79
79
|
const isAutoGenerated =
|
|
80
80
|
existingCheckAll &&
|
|
81
|
-
existingCheckAll.startsWith('
|
|
82
|
-
existingCheckAll.includes(' &&
|
|
81
|
+
existingCheckAll.startsWith('yarn ') &&
|
|
82
|
+
existingCheckAll.includes(' && yarn ')
|
|
83
83
|
|
|
84
84
|
if (!existingCheckAll || isAutoGenerated) {
|
|
85
85
|
scriptsToAdd['check-all'] = checkAllCmd
|
|
@@ -157,9 +157,9 @@ export function removePackageJsonScripts(tools, getScriptsFn, context) {
|
|
|
157
157
|
// Handle check-all script separately
|
|
158
158
|
const checkAllScript = packageJson.scripts['check-all']
|
|
159
159
|
if (checkAllScript) {
|
|
160
|
-
// Only remove if it's auto-generated (follows
|
|
160
|
+
// Only remove if it's auto-generated (follows yarn X && yarn Y pattern)
|
|
161
161
|
const isAutoGenerated =
|
|
162
|
-
checkAllScript.startsWith('
|
|
162
|
+
checkAllScript.startsWith('yarn ') && checkAllScript.includes(' && yarn ')
|
|
163
163
|
|
|
164
164
|
if (isAutoGenerated) {
|
|
165
165
|
scriptsToRemove.push('check-all')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dimensional-innovations/tool-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Universal configuration package for ESLint, Prettier, Stylelint, TypeScript, and semantic-release with auto-detection for React, Vue, Svelte, Solid, Astro, Angular, and more",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"LICENSE"
|
|
48
48
|
],
|
|
49
49
|
"engines": {
|
|
50
|
-
"node": ">=22.
|
|
50
|
+
"node": ">=22.20.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"lint": "eslint .",
|
|
54
54
|
"lint:fix": "eslint --fix .",
|
|
55
|
-
"prettier": "
|
|
56
|
-
"prettier:fix": "
|
|
55
|
+
"prettier": "prettier --check .",
|
|
56
|
+
"prettier:fix": "prettier --write .",
|
|
57
57
|
"test": "vitest run",
|
|
58
58
|
"test:watch": "vitest",
|
|
59
59
|
"test:ui": "vitest --ui",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"style:fix": "stylelint \"**/*.css\" --fix --allow-empty-input",
|
|
65
65
|
"typecheck": "tsc --noEmit",
|
|
66
66
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
67
|
-
"check-all": "
|
|
67
|
+
"check-all": "yarn prettier && yarn style && yarn lint && yarn typecheck"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@eslint/compat": "^1.4.0",
|
|
@@ -43,7 +43,7 @@ The base preset applies to all frameworks:
|
|
|
43
43
|
**Installation**:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
|
|
46
|
+
yarn add --save-dev prettier-plugin-vue
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
**Example**:
|
|
@@ -82,7 +82,7 @@ export default createConfig('prettier')
|
|
|
82
82
|
**Installation**:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
|
|
85
|
+
yarn add --save-dev prettier-plugin-svelte
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
**Svelte 5 Support**: Fully compatible with Svelte 5 runes (`$state`, `$derived`, etc.)
|
|
@@ -94,7 +94,7 @@ npm install --save-dev prettier-plugin-svelte
|
|
|
94
94
|
**Installation**:
|
|
95
95
|
|
|
96
96
|
```bash
|
|
97
|
-
|
|
97
|
+
yarn add --save-dev prettier-plugin-astro
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
**Automatic Formatting**: The Astro plugin handles all `.astro` file formatting automatically
|
|
@@ -195,8 +195,8 @@ Add these scripts to your `package.json`:
|
|
|
195
195
|
Then run:
|
|
196
196
|
|
|
197
197
|
```bash
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
yarn prettier:fix # Format all files
|
|
199
|
+
yarn prettier # Check formatting without writing
|
|
200
200
|
```
|
|
201
201
|
|
|
202
202
|
## VSCode Integration
|
|
@@ -258,7 +258,7 @@ This package deliberately **does not** integrate Prettier with ESLint. They rema
|
|
|
258
258
|
Run them separately:
|
|
259
259
|
|
|
260
260
|
```bash
|
|
261
|
-
|
|
261
|
+
yarn lint && yarn prettier:fix
|
|
262
262
|
```
|
|
263
263
|
|
|
264
264
|
## Troubleshooting
|
|
@@ -270,7 +270,7 @@ If you see errors like `Cannot find module 'prettier-plugin-svelte'`:
|
|
|
270
270
|
1. Install the required plugin:
|
|
271
271
|
|
|
272
272
|
```bash
|
|
273
|
-
|
|
273
|
+
yarn add --save-dev prettier-plugin-svelte
|
|
274
274
|
```
|
|
275
275
|
|
|
276
276
|
2. Or specify a framework that doesn't need plugins:
|
|
@@ -49,7 +49,7 @@ export default createConfig('semantic-release', {
|
|
|
49
49
|
## Installation
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
|
|
52
|
+
yarn add --save-dev @dimensional-innovations/tool-config semantic-release
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### Optional Peer Dependencies
|
|
@@ -58,13 +58,13 @@ Install the semantic-release plugins you need based on your Git provider:
|
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
# For GitLab projects
|
|
61
|
-
|
|
61
|
+
yarn add --save-dev @semantic-release/changelog @semantic-release/git @semantic-release/gitlab
|
|
62
62
|
|
|
63
63
|
# For GitHub projects
|
|
64
|
-
|
|
64
|
+
yarn add --save-dev @semantic-release/changelog @semantic-release/git @semantic-release/github
|
|
65
65
|
|
|
66
66
|
# For Bitbucket or other providers (no provider-specific plugin)
|
|
67
|
-
|
|
67
|
+
yarn add --save-dev @semantic-release/changelog @semantic-release/git
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
## Usage
|
|
@@ -255,8 +255,8 @@ release:
|
|
|
255
255
|
only:
|
|
256
256
|
- main
|
|
257
257
|
script:
|
|
258
|
-
-
|
|
259
|
-
-
|
|
258
|
+
- yarn add
|
|
259
|
+
- yarn semantic-release
|
|
260
260
|
variables:
|
|
261
261
|
GL_TOKEN: $GL_TOKEN
|
|
262
262
|
NPM_TOKEN: $NPM_TOKEN
|
|
@@ -281,8 +281,8 @@ jobs:
|
|
|
281
281
|
- uses: actions/setup-node@v3
|
|
282
282
|
with:
|
|
283
283
|
node-version: '20'
|
|
284
|
-
- run:
|
|
285
|
-
- run:
|
|
284
|
+
- run: yarn add
|
|
285
|
+
- run: yarn semantic-release
|
|
286
286
|
env:
|
|
287
287
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
288
288
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -293,7 +293,7 @@ jobs:
|
|
|
293
293
|
Test your configuration without publishing:
|
|
294
294
|
|
|
295
295
|
```bash
|
|
296
|
-
|
|
296
|
+
yarn semantic-release --dry-run
|
|
297
297
|
```
|
|
298
298
|
|
|
299
299
|
## Workflow
|
|
@@ -370,7 +370,7 @@ semantic-release analyzes commits and:
|
|
|
370
370
|
|
|
371
371
|
1. Only release from CI/CD, never manually
|
|
372
372
|
2. Protect main branch to prevent direct pushes
|
|
373
|
-
3. Use `
|
|
373
|
+
3. Use `yarn release --dry-run` to test locally
|
|
374
374
|
|
|
375
375
|
### Monorepo Issues
|
|
376
376
|
|
|
@@ -16,24 +16,24 @@ stages:
|
|
|
16
16
|
cache:
|
|
17
17
|
key:
|
|
18
18
|
files:
|
|
19
|
-
-
|
|
19
|
+
- yarn.lock
|
|
20
20
|
paths:
|
|
21
21
|
- node_modules/
|
|
22
|
-
- .
|
|
22
|
+
- .yarn/cache/
|
|
23
23
|
|
|
24
24
|
# Default settings for all jobs
|
|
25
25
|
default:
|
|
26
26
|
image: node:22-alpine
|
|
27
27
|
before_script:
|
|
28
|
-
-
|
|
28
|
+
- yarn install --frozen-lockfile
|
|
29
29
|
|
|
30
30
|
# Lint job - runs ESLint, Prettier, Stylelint
|
|
31
31
|
lint:
|
|
32
32
|
stage: lint
|
|
33
33
|
script:
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
34
|
+
- yarn lint
|
|
35
|
+
- yarn prettier
|
|
36
|
+
- yarn style || true # Allow failure if no CSS files
|
|
37
37
|
only:
|
|
38
38
|
- branches
|
|
39
39
|
- merge_requests
|
|
@@ -42,7 +42,7 @@ lint:
|
|
|
42
42
|
test:
|
|
43
43
|
stage: test
|
|
44
44
|
script:
|
|
45
|
-
-
|
|
45
|
+
- yarn test:coverage
|
|
46
46
|
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
|
|
47
47
|
artifacts:
|
|
48
48
|
reports:
|
|
@@ -62,9 +62,9 @@ release:
|
|
|
62
62
|
before_script:
|
|
63
63
|
# Install git (required by semantic-release)
|
|
64
64
|
- apk add --no-cache git
|
|
65
|
-
-
|
|
65
|
+
- yarn install --frozen-lockfile
|
|
66
66
|
script:
|
|
67
|
-
-
|
|
67
|
+
- yarn release
|
|
68
68
|
only:
|
|
69
69
|
- main
|
|
70
70
|
except:
|
|
@@ -10,27 +10,27 @@ image: node:22
|
|
|
10
10
|
|
|
11
11
|
definitions:
|
|
12
12
|
caches:
|
|
13
|
-
|
|
13
|
+
yarn: ~/.yarn/cache
|
|
14
14
|
|
|
15
15
|
pipelines:
|
|
16
16
|
default:
|
|
17
17
|
- step:
|
|
18
18
|
name: Lint
|
|
19
19
|
caches:
|
|
20
|
-
-
|
|
20
|
+
- yarn
|
|
21
21
|
script:
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
22
|
+
- yarn install --frozen-lockfile
|
|
23
|
+
- yarn lint
|
|
24
|
+
- yarn prettier
|
|
25
|
+
- yarn style || true # Allow failure if no CSS files
|
|
26
26
|
|
|
27
27
|
- step:
|
|
28
28
|
name: Test
|
|
29
29
|
caches:
|
|
30
|
-
-
|
|
30
|
+
- yarn
|
|
31
31
|
script:
|
|
32
|
-
-
|
|
33
|
-
-
|
|
32
|
+
- yarn install --frozen-lockfile
|
|
33
|
+
- yarn test:coverage
|
|
34
34
|
artifacts:
|
|
35
35
|
- coverage/**
|
|
36
36
|
|
|
@@ -39,30 +39,30 @@ pipelines:
|
|
|
39
39
|
- step:
|
|
40
40
|
name: Lint
|
|
41
41
|
caches:
|
|
42
|
-
-
|
|
42
|
+
- yarn
|
|
43
43
|
script:
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
44
|
+
- yarn install --frozen-lockfile
|
|
45
|
+
- yarn lint
|
|
46
|
+
- yarn prettier
|
|
47
|
+
- yarn style || true
|
|
48
48
|
|
|
49
49
|
- step:
|
|
50
50
|
name: Test
|
|
51
51
|
caches:
|
|
52
|
-
-
|
|
52
|
+
- yarn
|
|
53
53
|
script:
|
|
54
|
-
-
|
|
55
|
-
-
|
|
54
|
+
- yarn install --frozen-lockfile
|
|
55
|
+
- yarn test:coverage
|
|
56
56
|
artifacts:
|
|
57
57
|
- coverage/**
|
|
58
58
|
|
|
59
59
|
- step:
|
|
60
60
|
name: Release
|
|
61
61
|
caches:
|
|
62
|
-
-
|
|
62
|
+
- yarn
|
|
63
63
|
script:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
64
|
+
- yarn install --frozen-lockfile
|
|
65
|
+
- yarn release
|
|
66
66
|
trigger: manual # Remove this line to make releases automatic
|
|
67
67
|
|
|
68
68
|
pull-requests:
|
|
@@ -70,13 +70,13 @@ pipelines:
|
|
|
70
70
|
- step:
|
|
71
71
|
name: Lint & Test
|
|
72
72
|
caches:
|
|
73
|
-
-
|
|
73
|
+
- yarn
|
|
74
74
|
script:
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
75
|
+
- yarn install --frozen-lockfile
|
|
76
|
+
- yarn lint
|
|
77
|
+
- yarn prettier
|
|
78
|
+
- yarn style || true
|
|
79
|
+
- yarn test
|
|
80
80
|
# Optional: Test on multiple Node versions
|
|
81
81
|
# definitions:
|
|
82
82
|
# services:
|
|
@@ -90,11 +90,11 @@ pipelines:
|
|
|
90
90
|
# name: Test (Node 20)
|
|
91
91
|
# image: node:20
|
|
92
92
|
# script:
|
|
93
|
-
# -
|
|
94
|
-
# -
|
|
93
|
+
# - yarn install --frozen-lockfile
|
|
94
|
+
# - yarn test
|
|
95
95
|
# - step:
|
|
96
96
|
# name: Test (Node 22)
|
|
97
97
|
# image: node:22
|
|
98
98
|
# script:
|
|
99
|
-
# -
|
|
100
|
-
# -
|
|
99
|
+
# - yarn install --frozen-lockfile
|
|
100
|
+
# - yarn test
|
|
@@ -27,19 +27,19 @@ jobs:
|
|
|
27
27
|
uses: actions/setup-node@v4
|
|
28
28
|
with:
|
|
29
29
|
node-version: '22'
|
|
30
|
-
cache: '
|
|
30
|
+
cache: 'yarn'
|
|
31
31
|
|
|
32
32
|
- name: Install dependencies
|
|
33
|
-
run:
|
|
33
|
+
run: yarn install --frozen-lockfile
|
|
34
34
|
|
|
35
35
|
- name: Run ESLint
|
|
36
|
-
run:
|
|
36
|
+
run: yarn lint
|
|
37
37
|
|
|
38
38
|
- name: Run Prettier
|
|
39
|
-
run:
|
|
39
|
+
run: yarn prettier
|
|
40
40
|
|
|
41
41
|
- name: Run Stylelint
|
|
42
|
-
run:
|
|
42
|
+
run: yarn style || true # Allow failure if no CSS files
|
|
43
43
|
|
|
44
44
|
test:
|
|
45
45
|
name: Test
|
|
@@ -51,13 +51,13 @@ jobs:
|
|
|
51
51
|
uses: actions/setup-node@v4
|
|
52
52
|
with:
|
|
53
53
|
node-version: '22'
|
|
54
|
-
cache: '
|
|
54
|
+
cache: 'yarn'
|
|
55
55
|
|
|
56
56
|
- name: Install dependencies
|
|
57
|
-
run:
|
|
57
|
+
run: yarn install --frozen-lockfile
|
|
58
58
|
|
|
59
59
|
- name: Run tests with coverage
|
|
60
|
-
run:
|
|
60
|
+
run: yarn test:coverage
|
|
61
61
|
|
|
62
62
|
- name: Upload coverage to Codecov
|
|
63
63
|
uses: codecov/codecov-action@v4
|
|
@@ -79,16 +79,16 @@ jobs:
|
|
|
79
79
|
uses: actions/setup-node@v4
|
|
80
80
|
with:
|
|
81
81
|
node-version: '22'
|
|
82
|
-
cache: '
|
|
82
|
+
cache: 'yarn'
|
|
83
83
|
|
|
84
84
|
- name: Install dependencies
|
|
85
|
-
run:
|
|
85
|
+
run: yarn install --frozen-lockfile
|
|
86
86
|
|
|
87
87
|
- name: Release
|
|
88
88
|
env:
|
|
89
89
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
90
90
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
91
|
-
run:
|
|
91
|
+
run: yarn release
|
|
92
92
|
# Optional: Test on multiple Node versions
|
|
93
93
|
# test-matrix:
|
|
94
94
|
# name: Test (Node ${{ matrix.node-version }})
|
|
@@ -102,6 +102,6 @@ jobs:
|
|
|
102
102
|
# uses: actions/setup-node@v4
|
|
103
103
|
# with:
|
|
104
104
|
# node-version: ${{ matrix.node-version }}
|
|
105
|
-
# cache: '
|
|
106
|
-
# - run:
|
|
107
|
-
# - run:
|
|
105
|
+
# cache: 'yarn'
|
|
106
|
+
# - run: yarn install --frozen-lockfile
|
|
107
|
+
# - run: yarn test
|
|
@@ -19,10 +19,10 @@ The Stylelint tool and core config are included as dependencies. For Vue project
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
# Vue projects only
|
|
22
|
-
|
|
22
|
+
yarn add --save-dev stylelint-config-standard-vue postcss-html
|
|
23
23
|
|
|
24
24
|
# Svelte projects need postcss-html for component parsing
|
|
25
|
-
|
|
25
|
+
yarn add --save-dev postcss-html
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
@@ -247,7 +247,7 @@ No conflicts! They work together perfectly:
|
|
|
247
247
|
Run them sequentially:
|
|
248
248
|
|
|
249
249
|
```bash
|
|
250
|
-
|
|
250
|
+
yarn style && yarn prettier:fix
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
### Stylelint + ESLint
|
|
@@ -320,7 +320,7 @@ export default createConfig('stylelint', {
|
|
|
320
320
|
**Vue projects only**: Install the optional peer dependency:
|
|
321
321
|
|
|
322
322
|
```bash
|
|
323
|
-
|
|
323
|
+
yarn add --save-dev stylelint-config-standard-vue postcss-html
|
|
324
324
|
```
|
|
325
325
|
|
|
326
326
|
### "Cannot find module 'postcss-html'"
|
|
@@ -328,7 +328,7 @@ npm install --save-dev stylelint-config-standard-vue postcss-html
|
|
|
328
328
|
**Vue/Svelte projects**: Install the parser:
|
|
329
329
|
|
|
330
330
|
```bash
|
|
331
|
-
|
|
331
|
+
yarn add --save-dev postcss-html
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
### Stylelint Not Linting .vue Files
|
|
@@ -363,7 +363,7 @@ This shouldn't happen! Our Stylelint config focuses on quality, not formatting.
|
|
|
363
363
|
Make sure you're using Stylelint 16+:
|
|
364
364
|
|
|
365
365
|
```bash
|
|
366
|
-
|
|
366
|
+
yarn add --save-dev stylelint@^16.0.0
|
|
367
367
|
```
|
|
368
368
|
|
|
369
369
|
## Rule Philosophy
|
|
@@ -14,19 +14,19 @@ Zero-config TypeScript type checking for modern JavaScript/TypeScript projects.
|
|
|
14
14
|
## Installation
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
|
|
17
|
+
yarn add --save-dev @dimensional-innovations/tool-config typescript
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
For modern performance with tsgo:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
|
|
23
|
+
yarn add --save-dev @typescript/native-preview
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
For Vue projects, also install:
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
|
|
29
|
+
yarn add --save-dev vue-tsc
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
## Quick Start
|
|
@@ -116,8 +116,8 @@ export default await createConfig('typescript', { framework: 'react' })
|
|
|
116
116
|
**Type checking:**
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
yarn add --save-dev @types/react @types/react-dom
|
|
120
|
+
yarn typecheck
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
### Vue
|
|
@@ -141,8 +141,8 @@ export default await createConfig('typescript', { framework: 'vue' })
|
|
|
141
141
|
**Type checking:**
|
|
142
142
|
|
|
143
143
|
```bash
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
yarn add --save-dev vue-tsc
|
|
145
|
+
yarn typecheck
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
**Note:** Vue projects should use `vue-tsc` instead of `tsc` for proper .vue file support.
|
|
@@ -165,8 +165,8 @@ export default await createConfig('typescript', { framework: 'svelte' })
|
|
|
165
165
|
**Type checking:**
|
|
166
166
|
|
|
167
167
|
```bash
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
yarn add --save-dev @sveltejs/vite-plugin-svelte
|
|
169
|
+
yarn typecheck
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
### Solid
|
|
@@ -237,8 +237,8 @@ export default await createConfig('typescript', { framework: 'node' })
|
|
|
237
237
|
**Type checking:**
|
|
238
238
|
|
|
239
239
|
```bash
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
yarn add --save-dev @types/node
|
|
241
|
+
yarn typecheck
|
|
242
242
|
```
|
|
243
243
|
|
|
244
244
|
### Vanilla JavaScript
|
|
@@ -271,13 +271,13 @@ tsgo is a Go port of the TypeScript compiler that is 10x faster than tsc.
|
|
|
271
271
|
**Installation:**
|
|
272
272
|
|
|
273
273
|
```bash
|
|
274
|
-
|
|
274
|
+
yarn add --save-dev @typescript/native-preview
|
|
275
275
|
```
|
|
276
276
|
|
|
277
277
|
**Usage:**
|
|
278
278
|
|
|
279
279
|
```bash
|
|
280
|
-
|
|
280
|
+
yarn tsgo --noEmit
|
|
281
281
|
```
|
|
282
282
|
|
|
283
283
|
The package will automatically detect tsgo and use it when available.
|
|
@@ -471,7 +471,7 @@ console.log(cmd) // 'tsgo --noEmit || vue-tsc --noEmit'
|
|
|
471
471
|
**Solution:** Install the @types package:
|
|
472
472
|
|
|
473
473
|
```bash
|
|
474
|
-
|
|
474
|
+
yarn add --save-dev @types/node @types/react @types/react-dom
|
|
475
475
|
```
|
|
476
476
|
|
|
477
477
|
### Vue .vue files not type checking
|
|
@@ -481,8 +481,8 @@ npm install --save-dev @types/node @types/react @types/react-dom
|
|
|
481
481
|
**Solution:** Install and use vue-tsc:
|
|
482
482
|
|
|
483
483
|
```bash
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
yarn add --save-dev vue-tsc
|
|
485
|
+
yarn vue-tsc --noEmit
|
|
486
486
|
```
|
|
487
487
|
|
|
488
488
|
### tsgo not found
|
|
@@ -492,7 +492,7 @@ npx vue-tsc --noEmit
|
|
|
492
492
|
**Solution:** Install @typescript/native-preview:
|
|
493
493
|
|
|
494
494
|
```bash
|
|
495
|
-
|
|
495
|
+
yarn add --save-dev @typescript/native-preview
|
|
496
496
|
```
|
|
497
497
|
|
|
498
498
|
### Slow type checking
|