-
-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(intellij): Use node interpreter to run commands (#416)
- Loading branch information
1 parent
240aa9a
commit a75a9b7
Showing
31 changed files
with
785 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Jobs run on pull request for intellij | ||
name: Pull request Intellij | ||
on: | ||
workflow_dispatch: ~ | ||
|
||
jobs: | ||
test-ui: | ||
name: Test UI | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
runIde: | | ||
export DISPLAY=:99.0 | ||
Xvfb -ac :99 -screen 0 1920x1080x24 & | ||
sleep 10 | ||
mkdir -p editors/intellij/build/reports | ||
./gradlew :runIdeForUiTests > editors/intellij/build/reports/idea.log & | ||
runTests: | | ||
export DISPLAY=:99.0 | ||
./gradlew :test | ||
reportName: ui-test-fails-report-linux | ||
- os: windows-latest | ||
runIde: start gradlew.bat :runIdeForUiTests | ||
runTests: ./gradlew :test | ||
reportName: ui-test-fails-report-windows | ||
- os: macos-latest | ||
runIde: ./gradlew :runIdeForUiTests & | ||
runTests: ./gradlew :test | ||
reportName: ui-test-fails-report-mac | ||
|
||
steps: | ||
|
||
- name: Fetch Sources | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/action-setup@v2.2.4 | ||
with: | ||
version: 8 | ||
|
||
- name: Install basic project fixture dependencies | ||
working-directory: editors/intellij/src/test/testData/basic-project | ||
run: pnpm i | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
|
||
- name: Run IDE | ||
working-directory: editors/intellij | ||
run: ${{ matrix.runIde }} | ||
|
||
# Wait for IDEA to be started | ||
- name: Health Check | ||
uses: jtalk/url-health-check-action@v3 | ||
with: | ||
url: http://127.0.0.1:8082 | ||
max-attempts: 15 | ||
retry-delay: 30s | ||
|
||
- name: Run | ||
working-directory: editors/intellij | ||
run: ${{ matrix.runTests }} | ||
|
||
- name: Copy logs | ||
if: ${{ failure() }} | ||
run: mv editors/intellij/build/idea-sandbox/system/log/ editors/intellij/build/reports | ||
|
||
- name: Save fails report | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.reportName }} | ||
path: | | ||
editors/intellij/build/reports | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,55 @@ | ||
# Biome JetBrains IDEs Plugin | ||
|
||
https://biomejs.dev plugin for JetBrains IDEs. | ||
[Biome](https://biomejs.dev/) is a powerful tool designed to enhance your development experience. This plugin integrates seamlessly with many [JetBrains IDE's](#Supported IDEs) to provide some capabilities: | ||
|
||
## features | ||
- See lints while you type | ||
- Apply code fixes (from mouse-over, <kbd title="Option">⌥</kbd>+<kbd title="Enter">⏎</kbd> or <kbd title="Alt">Alt</kbd>+<kbd title="Enter">Enter</kbd>) | ||
- Reformat your code with <kbd>⌥⇧</kbd>+<kbd title="Cmd">⌘</kbd>+<kbd title="L">L</kbd> or <kbd title="Ctrl">Ctrl</kbd>+<kbd title="Alt">Alt</kbd>+<kbd title="L">L</kbd> (You can also format your [code on save](https://www.jetbrains.com/help/webstorm/reformat-and-rearrange-code.html#reformat-on-save)) | ||
|
||
- Linting | ||
- Quickfix | ||
- Formatting | ||
However, please note the following limitations: | ||
|
||
--- | ||
- Automatically applying code fixes on save | ||
|
||
## Installation | ||
|
||
To install the Biome IntelliJ Plugin, Head over to [official plugin page](https://plugins.jetbrains.com/plugin/22761-biome) or follow these steps: | ||
|
||
### From JetBrains IDEs | ||
|
||
- Press `⌘Сmd,` to open the IDE settings and then select Plugins. | ||
![Plugins](https://resources.jetbrains.com/help/img/idea/2023.2/ws_plugins_settings.png) | ||
- Search for Biome and click `install` | ||
1. Open IntelliJ IDEA. | ||
2. Go to **Settings/Preferences**. | ||
3. Select **Plugins** from the left-hand menu. | ||
4. Click on the **Marketplace** tab. | ||
5. Search for "Biome" and click **Install**. | ||
6. Restart the IDE to activate the plugin. | ||
|
||
### From disk | ||
|
||
- Download the plugin .zip from releases tab. | ||
- Press `⌘Сmd,` to open the IDE settings and then select Plugins. | ||
- On the Plugins page, click The Settings button and then click Install Plugin from Disk…. | ||
1. Download the plugin .zip from releases tab. | ||
2. Press `⌘Сmd,` to open the IDE settings and then select Plugins. | ||
3. On the Plugins page, click The Settings button and then click Install Plugin from Disk…. | ||
|
||
## Biome Resolution | ||
|
||
The Plugin tries to use Biome from your project’s local dependencies (`node_modules/.bin/biome`). We recommend adding Biome as a project dependency to ensure that NPM scripts and the extension use the same Biome version. | ||
|
||
You can also explicitly specify the `Biome` binary the extension should use by configuring the `Biome CLI Path` in `Settings`->`Language & Frameworks`->`Biome Settings`. | ||
|
||
## Plugin settings | ||
|
||
## Building and running the plugin | ||
### `Biome CLI Path` | ||
|
||
Build and run the plugin requires: | ||
This setting overrides the Biome binary used by the plugin. | ||
|
||
- Java development kit 17+ | ||
- IntelliJ IDEA (Ultimate edition or community edition) | ||
## Supported IDEs | ||
|
||
### Running the plugin on IDEA | ||
This plugin is currently supported in the following IDEs: | ||
|
||
```shell | ||
./gradlew runIde | ||
``` | ||
- IntelliJ IDEA Ultimate >2023.2.2 | ||
- WebStorm >2023.2.2 | ||
- AppCode >2023.2.2 | ||
- PhpStorm >2023.2.2 | ||
- RubyMine >2023.2.2 | ||
|
||
### Build the plugin | ||
## Contributing | ||
|
||
```shell | ||
./gradlew buildPlugin | ||
``` | ||
We welcome contributions to the Biome IntelliJ Plugin. If you encounter any issues or have suggestions for improvements, please open an issue on our [GitHub repository](https://github.com/biomejs/biome/issues/new/choose). We also have a [Discord community](https://discord.gg/BypW39g6Yc) where you can discuss the plugin, ask questions, and connect with other Biome's developers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.