pascal-vscode 0.0.2 → 0.1.0-beta.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/.prettierrc.mjs +6 -0
- package/.vscodeignore +5 -32
- package/CHANGELOG.md +25 -1
- package/README.md +10 -40
- package/assets/screenshots/default.jpg +0 -0
- package/dist/extension.js +1 -1
- package/dist/types/webview.d.js +0 -0
- package/dist/utils.js +1 -0
- package/dist/webviewController.js +1 -0
- package/dist/webviews/availableWebviews.js +1 -0
- package/dist/webviews/showChangelog.js +1 -0
- package/package.json +19 -22
- package/src/extension.ts +10 -4
- package/src/types/webview.d.ts +15 -0
- package/src/utils.ts +9 -0
- package/src/webviewController.ts +52 -0
- package/src/webviews/availableWebviews.ts +4 -0
- package/src/webviews/showChangelog.ts +20 -0
- package/themes/default.json +434 -289
- package/tsconfig.build.json +4 -0
- package/tsconfig.json +2 -22
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -12
- package/.changeset/pre.json +0 -10
- package/.changeset/wise-cows-feel.md +0 -5
- package/.editorconfig +0 -15
- package/.github/FUNDING.yml +0 -6
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -47
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -5
- package/.github/actions/setup-git-commiter/action.yml +0 -49
- package/.github/actions/setup-pnpm/action.yml +0 -42
- package/.github/issue_labeler.yml +0 -2
- package/.github/labeler.yml +0 -9
- package/.github/renovate.json5 +0 -48
- package/.github/workflows/check_merge.yml +0 -109
- package/.github/workflows/cleanup_cache.yml +0 -46
- package/.github/workflows/diff_dependencies.yml +0 -26
- package/.github/workflows/format.yml +0 -45
- package/.github/workflows/label_issue.yml +0 -18
- package/.github/workflows/label_pr.yml +0 -16
- package/.github/workflows/lint_pr_title.yml +0 -49
- package/.github/workflows/release.yml +0 -69
- package/.prettierignore +0 -25
- package/.vscode/extensions.json +0 -10
- package/.vscode/launch.json +0 -25
- package/.vscode/settings.json +0 -13
- package/.vscode/tasks.json +0 -17
- package/CODE_OF_CONDUCT.md +0 -65
- package/CONTRIBUTING.md +0 -86
- package/assets/icon.svg +0 -1
- package/assets/preview.png +0 -0
- package/biome.jsonc +0 -113
- package/eslint.config.js +0 -91
- package/pnpm-workspace.yaml +0 -4
- package/prettier.config.mjs +0 -17
- package/scripts/build.js +0 -107
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
name: Release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
release:
|
|
10
|
-
name: Changelog PR or Release
|
|
11
|
-
if: ${{ github.repository_owner == 'hadez8877' }}
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
permissions:
|
|
14
|
-
contents: write
|
|
15
|
-
id-token: write
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout
|
|
18
|
-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
19
|
-
with:
|
|
20
|
-
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: setup PNPM
|
|
24
|
-
uses: ./.github/actions/setup-pnpm
|
|
25
|
-
|
|
26
|
-
- name: Setup Node
|
|
27
|
-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
|
28
|
-
with:
|
|
29
|
-
node-version: 24.16.0
|
|
30
|
-
|
|
31
|
-
- name: Setup git commiter
|
|
32
|
-
id: commiter
|
|
33
|
-
uses: ./.github/actions/setup-git-commiter
|
|
34
|
-
with:
|
|
35
|
-
pascal-client-id: ${{ vars.PASCAL_CLIENT_ID }}
|
|
36
|
-
pascal-app-secret: ${{ secrets.PASCAL_APP_SECRET }}
|
|
37
|
-
|
|
38
|
-
- name: Build extension
|
|
39
|
-
run: pnpm run build
|
|
40
|
-
|
|
41
|
-
- name: Create Release Pull Request or Publish
|
|
42
|
-
id: changesets
|
|
43
|
-
uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0
|
|
44
|
-
with:
|
|
45
|
-
# Note: pnpm install after versioning is necessary to refresh lockfile
|
|
46
|
-
version: pnpm run version
|
|
47
|
-
publish: pnpm exec changeset publish
|
|
48
|
-
commit: '[ci] release'
|
|
49
|
-
title: '[ci] release'
|
|
50
|
-
env:
|
|
51
|
-
# Needs access to push to main
|
|
52
|
-
GITHUB_TOKEN: ${{ steps.commiter.outputs.token }}
|
|
53
|
-
# Use OIDC for npm authentication instead of NPM_TOKEN
|
|
54
|
-
NPM_TOKEN: '' # https://github.com/changesets/changesets/issues/1152#issuecomment-3190884868
|
|
55
|
-
|
|
56
|
-
- name: Check if pascal-vscode was published
|
|
57
|
-
id: vscode-published
|
|
58
|
-
if: steps.changesets.outputs.published == 'true'
|
|
59
|
-
run: |
|
|
60
|
-
if echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -e '.[] | select(.name == "pascal-vscode")' > /dev/null; then
|
|
61
|
-
echo "published=true" >> $GITHUB_OUTPUT
|
|
62
|
-
else
|
|
63
|
-
echo "published=false" >> $GITHUB_OUTPUT
|
|
64
|
-
fi
|
|
65
|
-
|
|
66
|
-
- name: Publish to OpenVSX
|
|
67
|
-
if: steps.vscode-published.outputs.published == 'true'
|
|
68
|
-
run: |
|
|
69
|
-
pnpm exec ovsx publish -p ${{ secrets.OVSX_TOKEN }}
|
package/.prettierignore
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Deep Directories
|
|
2
|
-
**/dist
|
|
3
|
-
**/node_modules
|
|
4
|
-
**/.vscode-test
|
|
5
|
-
|
|
6
|
-
# Directories
|
|
7
|
-
.github
|
|
8
|
-
.changeset
|
|
9
|
-
|
|
10
|
-
# Files
|
|
11
|
-
vitest.config.ts.timestamp*
|
|
12
|
-
pnpm-lock.yaml
|
|
13
|
-
|
|
14
|
-
# Formatted by Biome
|
|
15
|
-
**/*.json
|
|
16
|
-
**/*.jsonc
|
|
17
|
-
**/*.js
|
|
18
|
-
**/*.ts
|
|
19
|
-
**/*.tsx
|
|
20
|
-
**/*.jsx
|
|
21
|
-
**/*.mjs
|
|
22
|
-
**/*.cjs
|
|
23
|
-
**/*.css
|
|
24
|
-
|
|
25
|
-
CHANGELOG.md
|
package/.vscode/extensions.json
DELETED
package/.vscode/launch.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// A launch configuration that launches the extension inside a new window
|
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
|
3
|
-
// Hover to view descriptions of existing attributes.
|
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
-
{
|
|
6
|
-
"version": "0.2.0",
|
|
7
|
-
"configurations": [
|
|
8
|
-
{
|
|
9
|
-
"name": "Launch Theme",
|
|
10
|
-
"type": "extensionHost",
|
|
11
|
-
"request": "launch",
|
|
12
|
-
"runtimeExecutable": "${execPath}",
|
|
13
|
-
"preLaunchTask": "${defaultBuildTask}",
|
|
14
|
-
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "--disable-extensions", "${file}"]
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "Launch Theme (with extensions)",
|
|
18
|
-
"type": "extensionHost",
|
|
19
|
-
"request": "launch",
|
|
20
|
-
"runtimeExecutable": "${execPath}",
|
|
21
|
-
"preLaunchTask": "${defaultBuildTask}",
|
|
22
|
-
"args": ["--extensionDevelopmentPath=${workspaceFolder}", "${file}"]
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Place your settings in this file to overwrite default and user settings.
|
|
2
|
-
{
|
|
3
|
-
"files.exclude": {
|
|
4
|
-
"out": false, // set this to true to hide the "out" folder with the compiled JS files
|
|
5
|
-
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
|
|
6
|
-
},
|
|
7
|
-
"search.exclude": {
|
|
8
|
-
"out": true, // set this to false to include "out" folder in search results
|
|
9
|
-
"dist": true // set this to false to include "dist" folder in search results
|
|
10
|
-
},
|
|
11
|
-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
|
|
12
|
-
"typescript.tsc.autoDetect": "off"
|
|
13
|
-
}
|
package/.vscode/tasks.json
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "2.0.0",
|
|
3
|
-
"tasks": [
|
|
4
|
-
{
|
|
5
|
-
"type": "shell",
|
|
6
|
-
"command": "pnpm",
|
|
7
|
-
"args": ["run", "build"],
|
|
8
|
-
"group": {
|
|
9
|
-
"kind": "build",
|
|
10
|
-
"isDefault": true
|
|
11
|
-
},
|
|
12
|
-
"problemMatcher": [],
|
|
13
|
-
"label": "pnpm: build",
|
|
14
|
-
"detail": "pnpm run prebuild && tsdown"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
}
|
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and maintainers of OpenCLI pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
-
|
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
-
|
|
9
|
-
## Our Standards
|
|
10
|
-
|
|
11
|
-
Examples of behavior that contributes to a positive environment:
|
|
12
|
-
|
|
13
|
-
- Using welcoming and inclusive language.
|
|
14
|
-
- Being respectful of differing viewpoints and experiences.
|
|
15
|
-
- Giving and gracefully accepting constructive feedback.
|
|
16
|
-
- Focusing on what is best for the community.
|
|
17
|
-
- Showing empathy towards other community members.
|
|
18
|
-
|
|
19
|
-
Examples of unacceptable behavior:
|
|
20
|
-
|
|
21
|
-
- The use of sexualized language or imagery, and sexual attention or advances of any kind.
|
|
22
|
-
- Trolling, insulting or derogatory comments, and personal or political attacks.
|
|
23
|
-
- Public or private harassment.
|
|
24
|
-
- Publishing others' private information, such as a physical or email address, without their explicit permission.
|
|
25
|
-
- Other conduct which could reasonably be considered inappropriate in a professional setting.
|
|
26
|
-
|
|
27
|
-
## Enforcement Responsibilities
|
|
28
|
-
|
|
29
|
-
Maintainers are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
-
|
|
31
|
-
Maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
-
|
|
33
|
-
## Scope
|
|
34
|
-
|
|
35
|
-
This Code of Conduct applies within all community spaces, including the GitHub repository, issues, pull requests, discussions, and the Discord server. It also applies when an individual is officially representing the project in public spaces.
|
|
36
|
-
|
|
37
|
-
## Enforcement
|
|
38
|
-
|
|
39
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported — please [open a security advisory](https://github.com/hadez8877/pascal/security/advisories/new) or contact the maintainers directly through the Discord server. All complaints will be reviewed and investigated promptly and fairly. Maintainers are obligated to respect the privacy and security of the reporter.
|
|
40
|
-
|
|
41
|
-
## Enforcement Guidelines
|
|
42
|
-
|
|
43
|
-
Maintainers will follow these guidelines when determining consequences for any action in violation of this Code of Conduct:
|
|
44
|
-
|
|
45
|
-
**1. Correction**
|
|
46
|
-
A private, written warning from maintainers, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
47
|
-
|
|
48
|
-
**2. Warning**
|
|
49
|
-
A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time.
|
|
50
|
-
|
|
51
|
-
**3. Temporary Ban**
|
|
52
|
-
A temporary ban from any sort of interaction or public communication with the community for a specified period of time.
|
|
53
|
-
|
|
54
|
-
**4. Permanent Ban**
|
|
55
|
-
A permanent ban from any sort of public interaction within the community.
|
|
56
|
-
|
|
57
|
-
## Attribution
|
|
58
|
-
|
|
59
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
60
|
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
61
|
-
|
|
62
|
-
[homepage]: https://www.contributor-covenant.org
|
|
63
|
-
|
|
64
|
-
For answers to common questions about this code of conduct, see
|
|
65
|
-
https://www.contributor-covenant.org/faq
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Contributor Manual
|
|
2
|
-
|
|
3
|
-
Thank you for considering contributing to Pascal! Here's how you can help.
|
|
4
|
-
|
|
5
|
-
## Development Setup
|
|
6
|
-
|
|
7
|
-
```shell
|
|
8
|
-
# Clone the repository
|
|
9
|
-
git clone https://github.com/your-username/pascal.git
|
|
10
|
-
cd pascal
|
|
11
|
-
|
|
12
|
-
# Install dependencies and build
|
|
13
|
-
pnpm install
|
|
14
|
-
pnpm run build
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Press `F5` to launch an Extension Development Host window with the theme loaded.
|
|
18
|
-
|
|
19
|
-
## Making Changes
|
|
20
|
-
|
|
21
|
-
### Theme Colors
|
|
22
|
-
|
|
23
|
-
See the [VS Code Theme Documentation](https://code.visualstudio.com/api/extension-capabilities/theming) for available keys.
|
|
24
|
-
|
|
25
|
-
## Code Quality
|
|
26
|
-
|
|
27
|
-
All checks must pass before a pull request is merged:
|
|
28
|
-
|
|
29
|
-
```shell
|
|
30
|
-
pnpm run typecheck
|
|
31
|
-
pnpm run lint
|
|
32
|
-
pnpm run format
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
We use:
|
|
36
|
-
|
|
37
|
-
- **[Biome](https://biomejs.dev)** for linting and formatting (primary)
|
|
38
|
-
- **[Prettier](https://prettier.io)** for additional formatting (fallback)
|
|
39
|
-
- **[ESLint](https://eslint.org)** with typescript-eslint for deeper analysis
|
|
40
|
-
- **[TypeScript](https://www.typescriptlang.org)** with strict mode
|
|
41
|
-
|
|
42
|
-
### Linting
|
|
43
|
-
|
|
44
|
-
```shell
|
|
45
|
-
pnpm run lint
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### Formatting
|
|
49
|
-
|
|
50
|
-
```shell
|
|
51
|
-
pnpm run format
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## Versioning
|
|
55
|
-
|
|
56
|
-
This project uses [Changesets](https://github.com/changesets/changesets) for version management.
|
|
57
|
-
|
|
58
|
-
When your changes affect the published package, run:
|
|
59
|
-
|
|
60
|
-
```shell
|
|
61
|
-
pnpm changeset --empty
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
Add the generated file to your commit.
|
|
65
|
-
|
|
66
|
-
## Pull Request Process
|
|
67
|
-
|
|
68
|
-
1. Create a feature branch from `main`
|
|
69
|
-
2. Make your changes
|
|
70
|
-
3. Run all checks (`typecheck`, `lint`, `format`)
|
|
71
|
-
4. Add a changeset if needed
|
|
72
|
-
5. Open a pull request with a clear title and description
|
|
73
|
-
6. If your change affects the UI, include screenshots showing before and after
|
|
74
|
-
|
|
75
|
-
## Reporting Issues
|
|
76
|
-
|
|
77
|
-
Open an issue at [github.com/hadez8877/pascal/issues](https://github.com/hadez8877/pascal/issues) with:
|
|
78
|
-
|
|
79
|
-
- A clear description of the problem
|
|
80
|
-
- Steps to reproduce
|
|
81
|
-
- Screenshots if applicable
|
|
82
|
-
- Your environment (Extension version, OS)
|
|
83
|
-
|
|
84
|
-
## Code of Conduct
|
|
85
|
-
|
|
86
|
-
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.
|
package/assets/icon.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="-0 -0 256 256"><defs><linearGradient id="g" x2="0" y2="1"><stop stop-color="#111"/><stop offset="1" stop-color="#444"/></linearGradient></defs><path fill="#f7f7f7" stroke="url(#g)" stroke-linecap="round" stroke-linejoin="round" stroke-width="28" d="M141.56 31.47c.743-.01 1.49-.018 2.25-.027 2.45-.022 4.9-.015 7.35-.006q2.56-.008 5.12-.02 5.36-.014 10.72.01c4.58.017 9.15-.007 13.73-.042 3.52-.022 7.05-.02 10.57-.012q2.53 0 5.06-.02a416 416 0 0 1 7.8.02l2.1-.036c3.85.076 5.36.59 8.36 3.08 3.27 4.05 3.44 6.37 3.09 11.59-1.93 3.85-4.28 6.42-7.5 9.25l-2.69 2.36c-3.65 3.1-7.37 6.12-11.09 9.14-2.64 2.19-5.19 4.44-7.72 6.75-4.36 3.97-8.86 7.71-13.44 11.41-3.24 2.64-6.41 5.35-9.56 8.09.67 3.31 1.91 5.94 3.52 8.9.52.96 1.04 1.92 1.58 2.91l1.71 3.12 1.77 3.25c4.67 8.53 9.47 16.98 14.32 25.41 5.17 8.99 10.2 18.07 15.26 27.12q2.86 5.11 5.72 10.21l1.92 3.43 3.65 6.49a739 739 0 0 1 3.19 5.75 135 135 0 0 0 3.29 5.55c1.55 4.24 1.55 7.59.043 11.86-2.29 3.23-5.02 5.83-7.94 8.5l-2.25 2.16c-4.62 4.41-6.76 6.45-13.28 6.52l-3.52.048-3.88.036-4.08.05c-12.43.144-24.87.22-37.3.278-9.18.045-18.36.122-27.55.242-6.46.082-12.93.12-19.39.14-3.86.01-7.71.04-11.56.106-27.82.478-27.82.478-35.44-5.92A109 109 0 0 1 50 214a137 137 0 0 0-4.66-3.71 1893 1893 0 0 1-3.96-3.22l-2.06-1.67c-8.67-7.05-8.67-7.05-9.25-11.71-.295-3.62-.053-4.71 1.62-8.12 2.65-2.94 4.55-4.34 8.5-4.84l2.4-.04 2.73-.061 2.92-.035 3.01-.059c3.17-.06 6.34-.106 9.51-.152l6.45-.117q7.9-.143 15.8-.258l-1.42-1.39a3550 3550 0 0 1-14.65-14.41q-2.73-2.69-5.47-5.37c-2.63-2.57-5.25-5.16-7.86-7.75l-2.47-2.39c-8.29-8.29-9.52-14.35-9.58-25.97l.008-4.39-.015-4.56q-.013-4.76.003-9.53c.011-4.06-.009-8.12-.038-12.18-.018-3.14-.018-6.27-.012-9.41q0-2.24-.019-4.49c-.015-2.09-.004-4.19.013-6.28v-3.6C42.11 64.31 43.52 62.13 46 59c3.37-2.15 6.66-2.45 10.62-1.89 5.57 2.09 9.6 7.28 13.66 11.49q1.59 1.61 3.19 3.22c2.79 2.82 5.56 5.66 8.32 8.5 2.83 2.9 5.68 5.78 8.53 8.67A3680 3680 0 0 1 107 106c3.09-7.32 5.56-14.72 7.82-22.32l1.04-3.47q1.63-5.45 3.26-10.89 1.1-3.67 2.21-7.35 2.02-6.73 4.04-13.47l.88-2.9a84 84 0 0 0 1.24-4.75c1.77-7.74 6.71-9.45 14.07-9.38" paint-order="stroke fill"/></svg>
|
package/assets/preview.png
DELETED
|
Binary file
|
package/biome.jsonc
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/2.4.15/schema.json",
|
|
3
|
-
"files": {
|
|
4
|
-
"includes": ["**", "!!**/dist"]
|
|
5
|
-
},
|
|
6
|
-
"vcs": {
|
|
7
|
-
"enabled": true,
|
|
8
|
-
"clientKind": "git",
|
|
9
|
-
"useIgnoreFile": true
|
|
10
|
-
},
|
|
11
|
-
"formatter": {
|
|
12
|
-
"indentStyle": "tab",
|
|
13
|
-
"indentWidth": 2,
|
|
14
|
-
"lineWidth": 100,
|
|
15
|
-
"includes": ["**", "!**/.changeset", "!**/pnpm-lock.yaml"],
|
|
16
|
-
"expand": "auto"
|
|
17
|
-
},
|
|
18
|
-
"assist": {
|
|
19
|
-
"actions": {
|
|
20
|
-
"source": {
|
|
21
|
-
"organizeImports": "on"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
"linter": {
|
|
26
|
-
"enabled": true,
|
|
27
|
-
|
|
28
|
-
"domains": {
|
|
29
|
-
"test": "recommended"
|
|
30
|
-
},
|
|
31
|
-
"rules": {
|
|
32
|
-
"recommended": false,
|
|
33
|
-
"style": {
|
|
34
|
-
"useNodejsImportProtocol": "error",
|
|
35
|
-
// Enforce separate type imports for type-only imports to avoid bundling unneeded code
|
|
36
|
-
"useImportType": "error",
|
|
37
|
-
"useExportType": "error",
|
|
38
|
-
"useNumberNamespace": "warn",
|
|
39
|
-
"noInferrableTypes": "error"
|
|
40
|
-
},
|
|
41
|
-
"suspicious": {
|
|
42
|
-
// This one is specific to catch `console.log`. The rest of logs are permitted
|
|
43
|
-
"noConsole": {
|
|
44
|
-
"level": "warn",
|
|
45
|
-
"options": {
|
|
46
|
-
"allow": ["error", "warn", "info", "debug"]
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"noVar": "error",
|
|
50
|
-
"noDoubleEquals": "error",
|
|
51
|
-
"noDebugger": "error",
|
|
52
|
-
"noDuplicateCase": "error",
|
|
53
|
-
"noExplicitAny": "off",
|
|
54
|
-
// To enable later
|
|
55
|
-
"noImplicitAnyLet": "off",
|
|
56
|
-
"noSparseArray": "error"
|
|
57
|
-
},
|
|
58
|
-
"correctness": {
|
|
59
|
-
"noUnusedVariables": {
|
|
60
|
-
"level": "error",
|
|
61
|
-
"options": {
|
|
62
|
-
"ignoreRestSiblings": true
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"noUnusedFunctionParameters": "error",
|
|
66
|
-
"noUnusedImports": "error",
|
|
67
|
-
"noUnreachable": "error",
|
|
68
|
-
"noConstantCondition": "warn",
|
|
69
|
-
"noConstructorReturn": "error",
|
|
70
|
-
"noEmptyPattern": "error"
|
|
71
|
-
},
|
|
72
|
-
"complexity": {
|
|
73
|
-
// There are many violations which require manual check
|
|
74
|
-
"noForEach": "off",
|
|
75
|
-
"noUselessFragments": "warn",
|
|
76
|
-
"useFlatMap": "warn",
|
|
77
|
-
// To enable later, as there are many warnings
|
|
78
|
-
"useOptionalChain": "off"
|
|
79
|
-
},
|
|
80
|
-
"performance": {
|
|
81
|
-
"noAccumulatingSpread": "warn"
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"javascript": {
|
|
86
|
-
"formatter": {
|
|
87
|
-
"trailingCommas": "none",
|
|
88
|
-
"quoteStyle": "single",
|
|
89
|
-
"semicolons": "always"
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"json": {
|
|
93
|
-
"parser": {
|
|
94
|
-
"allowComments": true,
|
|
95
|
-
"allowTrailingCommas": false
|
|
96
|
-
},
|
|
97
|
-
"formatter": {
|
|
98
|
-
"indentStyle": "space",
|
|
99
|
-
"trailingCommas": "none"
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"overrides": [
|
|
103
|
-
{
|
|
104
|
-
// Workaround to format files like npm does
|
|
105
|
-
"includes": ["**/package.json"],
|
|
106
|
-
"json": {
|
|
107
|
-
"formatter": {
|
|
108
|
-
"expand": "always"
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
}
|
package/eslint.config.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { fileURLToPath } from 'node:url';
|
|
3
|
-
import { globalIgnores } from 'eslint/config';
|
|
4
|
-
// plugins
|
|
5
|
-
import regexpEslint from 'eslint-plugin-regexp';
|
|
6
|
-
import tseslint from 'typescript-eslint';
|
|
7
|
-
|
|
8
|
-
const typescriptEslint = tseslint.plugin;
|
|
9
|
-
|
|
10
|
-
// parsers
|
|
11
|
-
const typescriptParser = tseslint.parser;
|
|
12
|
-
|
|
13
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
14
|
-
const __dirname = path.dirname(__filename);
|
|
15
|
-
|
|
16
|
-
/** @type {import('eslint').Config[]} */
|
|
17
|
-
const config = [
|
|
18
|
-
// If ignores is used without any other keys in the configuration object, then the patterns act as global ignores.
|
|
19
|
-
// ref: https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
|
|
20
|
-
globalIgnores(['**/.*', '**/*.d.ts', 'dist/', 'scripts/', '.github/', '.changeset/']),
|
|
21
|
-
|
|
22
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
23
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
24
|
-
regexpEslint.configs['flat/recommended'],
|
|
25
|
-
{
|
|
26
|
-
languageOptions: {
|
|
27
|
-
parser: typescriptParser,
|
|
28
|
-
parserOptions: {
|
|
29
|
-
// See https://typescript-eslint.io/blog/project-service/
|
|
30
|
-
projectService: true,
|
|
31
|
-
tsconfigRootDir: __dirname
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
plugins: {
|
|
35
|
-
'@typescript-eslint': typescriptEslint,
|
|
36
|
-
regexp: regexpEslint
|
|
37
|
-
},
|
|
38
|
-
rules: {
|
|
39
|
-
// Type-aware rules that Biome cannot replace
|
|
40
|
-
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
41
|
-
'@typescript-eslint/no-shadow': 'error',
|
|
42
|
-
|
|
43
|
-
// Disable "no-floating-promises" rule for all source files until we have the bandwidth to address all the errors.
|
|
44
|
-
'@typescript-eslint/no-floating-promises': 'off',
|
|
45
|
-
|
|
46
|
-
// Disabled - now handled by Biome
|
|
47
|
-
'no-console': 'off', // Biome: suspicious.noConsole
|
|
48
|
-
'@typescript-eslint/no-unused-vars': 'off', // Biome: correctness.noUnusedVariables
|
|
49
|
-
'prefer-const': 'off', // Biome: style.useConst
|
|
50
|
-
'@typescript-eslint/consistent-type-imports': 'off', // Biome: style.useImportType
|
|
51
|
-
'@typescript-eslint/await-thenable': 'off',
|
|
52
|
-
'@typescript-eslint/array-type': 'off',
|
|
53
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
54
|
-
'@typescript-eslint/class-literal-property-style': 'off',
|
|
55
|
-
'@typescript-eslint/consistent-indexed-object-style': 'off',
|
|
56
|
-
'@typescript-eslint/consistent-type-definitions': 'off',
|
|
57
|
-
'@typescript-eslint/dot-notation': 'off',
|
|
58
|
-
'@typescript-eslint/no-inferrable-types': 'off',
|
|
59
|
-
'@typescript-eslint/no-base-to-string': 'off',
|
|
60
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
61
|
-
'@typescript-eslint/no-misused-promises': 'off',
|
|
62
|
-
'@typescript-eslint/no-redundant-type-constituents': 'off',
|
|
63
|
-
'@typescript-eslint/no-this-alias': 'off',
|
|
64
|
-
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
65
|
-
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
66
|
-
'@typescript-eslint/no-unsafe-call': 'off',
|
|
67
|
-
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
68
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
69
|
-
'@typescript-eslint/only-throw-error': 'off',
|
|
70
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
71
|
-
'@typescript-eslint/no-unnecessary-type-assertion': 'off',
|
|
72
|
-
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
|
73
|
-
'@typescript-eslint/prefer-optional-chain': 'off',
|
|
74
|
-
'@typescript-eslint/prefer-promise-reject-errors': 'off',
|
|
75
|
-
'@typescript-eslint/prefer-string-starts-ends-with': 'off',
|
|
76
|
-
'@typescript-eslint/require-await': 'off',
|
|
77
|
-
'@typescript-eslint/restrict-plus-operands': 'off',
|
|
78
|
-
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
79
|
-
'@typescript-eslint/sort-type-constituents': 'off',
|
|
80
|
-
'@typescript-eslint/unbound-method': 'off',
|
|
81
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
82
|
-
|
|
83
|
-
// Regex-specific rules (no Biome equivalent)
|
|
84
|
-
'regexp/use-ignore-case': 'off',
|
|
85
|
-
'regexp/prefer-regexp-exec': 'warn',
|
|
86
|
-
'regexp/prefer-regexp-test': 'warn'
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
|
-
|
|
91
|
-
export default config;
|
package/pnpm-workspace.yaml
DELETED
package/prettier.config.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** @type {import("prettier").Config} */
|
|
2
|
-
export default {
|
|
3
|
-
printWidth: 100,
|
|
4
|
-
semi: true,
|
|
5
|
-
singleQuote: true,
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
trailingComma: 'none',
|
|
8
|
-
useTabs: true,
|
|
9
|
-
overrides: [
|
|
10
|
-
{
|
|
11
|
-
files: ['.*', '*.md', '*.toml', '*.yml'],
|
|
12
|
-
options: {
|
|
13
|
-
useTabs: false
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
};
|
package/scripts/build.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs/promises';
|
|
2
|
-
import esbuild from 'esbuild';
|
|
3
|
-
import colors from 'piccolore';
|
|
4
|
-
import { glob } from 'tinyglobby';
|
|
5
|
-
|
|
6
|
-
/** @type {import('esbuild').BuildOptions} */
|
|
7
|
-
const defaultConfig = {
|
|
8
|
-
entryPoints: ['src/extension.ts', 'src/browser.ts'],
|
|
9
|
-
format: 'esm',
|
|
10
|
-
platform: 'node',
|
|
11
|
-
target: 'node20',
|
|
12
|
-
sourcemap: false,
|
|
13
|
-
sourcesContent: false
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const dt = new Intl.DateTimeFormat('en-us', {
|
|
17
|
-
hour: '2-digit',
|
|
18
|
-
minute: '2-digit'
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const [...args] = process.argv.slice(2);
|
|
22
|
-
|
|
23
|
-
export default async function build() {
|
|
24
|
-
const config = Object.assign({}, defaultConfig);
|
|
25
|
-
const isDev = args.slice(-1)[0] === 'IS_DEV';
|
|
26
|
-
|
|
27
|
-
const noClean = args.includes('--no-clean-dist');
|
|
28
|
-
const minify = args.includes('--minify');
|
|
29
|
-
const cleanDts = args.includes('--clean-dts');
|
|
30
|
-
const bundle = args.includes('--bundle');
|
|
31
|
-
const forceCJS = args.includes('--force-cjs');
|
|
32
|
-
|
|
33
|
-
const { type = 'module', dependencies = {} } = await readPackageJSON('./package.json');
|
|
34
|
-
|
|
35
|
-
const format = type === 'module' && !forceCJS ? 'esm' : 'cjs';
|
|
36
|
-
|
|
37
|
-
const outdir = 'dist';
|
|
38
|
-
|
|
39
|
-
if (!noClean) {
|
|
40
|
-
await clean(outdir, cleanDts);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (!isDev) {
|
|
44
|
-
await esbuild.build({
|
|
45
|
-
...config,
|
|
46
|
-
minify,
|
|
47
|
-
bundle,
|
|
48
|
-
external: bundle ? Object.keys(dependencies) : undefined,
|
|
49
|
-
outdir,
|
|
50
|
-
outExtension: forceCJS ? { '.js': '.cjs' } : {},
|
|
51
|
-
format
|
|
52
|
-
});
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const rebuildPlugin = {
|
|
57
|
-
name: 'pascal:rebuild',
|
|
58
|
-
setup(build) {
|
|
59
|
-
build.onEnd(async (result) => {
|
|
60
|
-
const date = dt.format(new Date());
|
|
61
|
-
if (result && result.errors.length) {
|
|
62
|
-
console.error(colors.dim(`[${date}] `) + colors.red(error || result.errors.join('\n')));
|
|
63
|
-
} else {
|
|
64
|
-
if (result.warnings.length) {
|
|
65
|
-
console.info(
|
|
66
|
-
colors.dim(`[${date}] `) +
|
|
67
|
-
colors.yellow('! updated with warnings:\n' + result.warnings.join('\n'))
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
console.info(colors.dim(`[${date}] `) + colors.green('√ updated'));
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const builder = await esbuild.context({
|
|
77
|
-
...config,
|
|
78
|
-
minify,
|
|
79
|
-
outdir,
|
|
80
|
-
format,
|
|
81
|
-
sourcemap: 'linked',
|
|
82
|
-
plugins: [rebuildPlugin]
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
await builder.watch();
|
|
86
|
-
|
|
87
|
-
process.on('beforeExit', () => {
|
|
88
|
-
builder.stop && builder.stop();
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async function clean(outdir, cleanDts) {
|
|
93
|
-
const files = await glob('**', {
|
|
94
|
-
cwd: outdir,
|
|
95
|
-
dot: true,
|
|
96
|
-
filesOnly: true,
|
|
97
|
-
ignore: cleanDts ? undefined : ['**/*.d.ts'],
|
|
98
|
-
absolute: true
|
|
99
|
-
});
|
|
100
|
-
await Promise.all(files.map((file) => fs.rm(file, { force: true })));
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function readPackageJSON(path) {
|
|
104
|
-
return await fs.readFile(path, { encoding: 'utf8' }).then((res) => JSON.parse(res));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
await build();
|