Skip to content

Commit

Permalink
build: migration from eslint and prettier to biome (#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon authored Sep 3, 2024
1 parent 65fe449 commit 7e47d66
Show file tree
Hide file tree
Showing 70 changed files with 595 additions and 1,984 deletions.
291 changes: 0 additions & 291 deletions .eslintrc.js

This file was deleted.

4 changes: 3 additions & 1 deletion .github/linters/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"authproviders",
"behaviour",
"benchmarkjs",
"biomejs",
"brqh",
"cherfaoui",
"codeclimate",
Expand All @@ -42,7 +43,6 @@
"destructiveinclude",
"emailservices",
"emailservicesfunction",
"eslintcache",
"experiencebundle",
"firstsha",
"flexi",
Expand All @@ -66,6 +66,7 @@
"iife",
"indx",
"infile",
"instantiator",
"jwalton",
"knip",
"knip",
Expand All @@ -90,6 +91,7 @@
"myexperiencebundle",
"nimn",
"nonblock",
"nonoctal",
"notblank",
"notexist",
"notificationtypes",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-main-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Setup dependencies, cache and install
uses: ./.github/actions/install

- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2

- name: Build plugin
run: yarn pack
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
- name: Setup dependencies, cache and install
uses: ./.github/actions/install

- uses: google/wireit@setup-github-actions-caching/v1
- uses: google/wireit@setup-github-actions-caching/v2

- name: Lint plugin
run: yarn lint

- name: Build plugin
run: yarn pack
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ perf-result.txt

megalinter-reports/
.wireit
.eslintcache
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

yarn lint
yarn pack
yarn test
npm outdated || true
Expand Down
4 changes: 1 addition & 3 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"*.ts": ["eslint", "eslint --fix", "prettier --write"],
"*.js": ["eslint", "eslint --fix", "prettier --write"],
"*.md": ["prettier --write"]
"*{.ts, .js}": ["biome check --error-on-warnings --write"]
}
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ Configure your editor to use our lint and code style rules.

### Code formatting

[Prettier](https://prettier.io/) is a code formatter used to ensure consistent formatting across your code base. To use Prettier with Visual Studio Code, install [this extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) from the Visual Studio Code Marketplace.
This repository provide [.prettierignore](.prettierignore) and [.prettierrc](.prettierrc.json) files to control the behaviour of the Prettier formatter.
[Biome](https://biomejs.dev/) Format, lint, and more in a fraction of a second.

### Code linting

[ESLint](https://eslint.org/) is a popular JavaScript linting tool used to identify stylistic errors and erroneous constructs.
[Biome](https://biomejs.dev/) Format, lint, and more in a fraction of a second.

### Commit linting

Expand Down Expand Up @@ -186,7 +185,7 @@ yarn lint

The above command may display lint issues not related to your changes.
The recommended way to avoid lint issues is to [configure your
editor](http://eslint.org/docs/user-guide/integrations) to warn you in real time as you edit the file.
editor](https://biomejs.dev/guides/integrate-in-vcs/) to warn you in real time as you edit the file.

Fixing all existing lint issues is a tedious task so please pitch in by fixing
the ones related to the files you make changes to!
Expand Down
1 change: 0 additions & 1 deletion __tests__/functional/delta.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ const getFileLineNumber = async (path: string) => {
output: process.stdout,
terminal: false,
})
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
for await (const _ of rl) {
++linesCount
}
Expand Down
Loading

0 comments on commit 7e47d66

Please sign in to comment.