Skip to content

Commit

Permalink
ESLint: Migrate to flat config, isolate Prettier, fix errors (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-ox authored Jun 14, 2024
1 parent ba3bb36 commit a9af475
Show file tree
Hide file tree
Showing 23 changed files with 1,802 additions and 3,093 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ updates:
groups:
dependencies:
patterns:
- "*"
- '*'
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
dependencies:
patterns:
- "*"
- '*'
2 changes: 1 addition & 1 deletion .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ changelog:
- dependencies
- title: 🤷🏻 Other changes
labels:
- "*"
- '*'
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,25 +216,25 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
cache: false
pixi-bin-path: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
- run: |
test -f custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
pixi --help
which pixi | grep -q custom-bin/pixi
# which pixi should be absolute
which pixi | grep -q "^/"
- uses: actions/checkout@v4
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
cache: false
pixi-bin-path: custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
- run: |
test -f custom-bin/pixi${{ matrix.os == 'windows-latest' && '.exe' || '' }}
pixi --help
which pixi | grep -q custom-bin/pixi
# which pixi should be absolute
which pixi | grep -q "^/"
existing-pixi-bin:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
ignore-reason: [ none, version, version-latest, url, bin-path]
ignore-reason: [none, version, version-latest, url, bin-path]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ lib/**/*

# Ignore jetbrains files
.idea

# ESBuild metafile
metafile*.json
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
```yml
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.23.0
pixi-version: v0.24.1
cache: true
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
Expand All @@ -49,7 +49,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
> groups:
> dependencies:
> patterns:
> - "*"
> - '*'
> ```

## Features
Expand Down Expand Up @@ -117,10 +117,10 @@ test:
matrix:
environment: [py311, py312]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
```

#### Install multiple environments in one job
Expand Down Expand Up @@ -216,6 +216,7 @@ You can even run Python scripts like this:
```

If you want to use PowerShell, you need to specify `-Command` as well.

```yml
- run: | # everything here will be run inside of the pixi environment
python --version | Select-String "3.11"
Expand Down Expand Up @@ -352,5 +353,5 @@ If you want to see more examples, you can take a look at the [GitHub Workflows o

1. Clone this repository.
2. Run `pnpm install` inside the repository (if you don't have [`pnpm`](https://github.com/pnpm/pnpm) installed, you can install it with `pixi global install pnpm`).
3. Run `pnpm dev` for live transpilation of the TypeScript source code.
3. Run `pnpm dev` for live transpilation of the TypeScript source code.
4. To test the action, you can run [`act`](https://github.com/nektos/act) (inside docker) or use :sparkles: CI driven development :sparkles:.
3 changes: 1 addition & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ inputs:
`$GITHUB_PATH`. If more than one environment is specified in `environments`, this must be the name of the
environment. Defaults to `false`. Requires at least pixi v0.21.0.
locked:
description:
Whether to use `pixi install --locked`. Defaults to `true` when the lockfile is present, otherwise `false`.
description: Whether to use `pixi install --locked`. Defaults to `true` when the lockfile is present, otherwise `false`.
frozen:
description: Whether to use `pixi install --frozen`. Defaults to `false`.
cache:
Expand Down
Loading

0 comments on commit a9af475

Please sign in to comment.