Skip to content

Commit f4f3b9c

Browse files
committedJun 16, 2022
chore: remove eslint-plugin-prettier
1 parent 7a19a1f commit f4f3b9c

File tree

5 files changed

+31
-70
lines changed

5 files changed

+31
-70
lines changed
 

‎.eslintrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
extends: [
77
'eslint:recommended',
88
'plugin:@typescript-eslint/recommended',
9-
'plugin:prettier/recommended'
9+
'prettier'
1010
],
1111
rules: {
1212
'@typescript-eslint/consistent-type-imports': 'error'

‎.github/workflows/main.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,22 @@ jobs:
3636
run: npm ci
3737
- name: run lint
3838
run: npm run lint -- --max-warnings=0
39+
format:
40+
name: run format
41+
runs-on: ubuntu-latest
42+
needs: [packages]
43+
steps:
44+
- name: checkout
45+
uses: actions/checkout@v2
46+
- name: setup Node
47+
uses: actions/setup-node@v2
48+
with:
49+
node-version: '16.x'
50+
cache: npm
51+
- name: npm ci
52+
run: npm ci
53+
- name: run format
54+
run: npx prettier --check .
3955
type-check:
4056
name: run type-check
4157
runs-on: ubuntu-latest

‎README.md

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# vitest-github-actions-reporter
22

3-
[![npm version](https://badge.fury.io/js/vitest-github-actions-reporter.svg)](https://badge.fury.io/js/vitest-github-actions-reporter) ![CI](https://github.com/sapphi-red/vitest-github-actions-reporter/workflows/CI/badge.svg) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
3+
[![npm version](https://badge.fury.io/js/vitest-github-actions-reporter.svg)](https://badge.fury.io/js/vitest-github-actions-reporter) ![CI](https://github.com/sapphi-red/vitest-github-actions-reporter/workflows/CI/badge.svg) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
44

55
Vitest reporter to create annotations when running tests in GitHub Actions.
66

@@ -9,34 +9,43 @@ Vitest reporter to create annotations when running tests in GitHub Actions.
99
Thanks to [`jest-github-actions-reporter`](https://github.com/cschleiden/jest-github-actions-reporter) for ideas.
1010

1111
## Install
12+
1213
```shell
1314
npm i -D vitest-github-actions-reporter # yarn add -D vitest-github-actions-reporter
1415
```
1516

1617
## Usage
18+
1719
Add this reporter to `vite.config.js` / `vite.config.ts`.
20+
1821
```js
1922
// vite.config.js / vite.config.ts
2023
import GithubActionsReporter from 'vitest-github-actions-reporter'
2124

2225
export default {
2326
test: {
24-
reporters: process.env.GITHUB_ACTIONS ? new GithubActionsReporter() : 'default'
27+
reporters: process.env.GITHUB_ACTIONS
28+
? new GithubActionsReporter()
29+
: 'default'
2530
}
2631
}
2732
```
33+
2834
Then run `vitest` with GitHub Actions.
2935
That's all. GitHub Actions will do everything other.
3036

3137
## Options
38+
3239
### `trimRepositoryPrefix`
33-
*Default: `true`*
40+
41+
_Default: `true`_
3442
Trims `/home/runner/{repository name}` / `D:\a\{repository name}` in stacktrace.
3543
The image below is a preview when it is `false`.
3644
![image](https://user-images.githubusercontent.com/49056869/162126739-a3daf5a2-ff37-46c5-b128-bb890fbcf05a.png)
3745

3846
### `hideStackTrace`
39-
*Default: `false`*
47+
48+
_Default: `false`_
4049
Hides stacktrace in message.
4150
The image below is a preview when it is `true`.
4251
![image](https://user-images.githubusercontent.com/49056869/156354039-750a6194-eb76-4adb-bbd6-7c2b65ec80a4.png)

‎package-lock.json

-64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"build": "tsup",
2121
"test": "vitest",
2222
"lint": "eslint --cache .",
23+
"format": "prettier --write --cache .",
2324
"type-check": "tsc --noEmit"
2425
},
2526
"engines": {
@@ -48,7 +49,6 @@
4849
"@typescript-eslint/parser": "^5.28.0",
4950
"eslint": "^8.17.0",
5051
"eslint-config-prettier": "^8.5.0",
51-
"eslint-plugin-prettier": "^4.0.0",
5252
"execa": "^6.1.0",
5353
"prettier": "^2.7.0",
5454
"tsup": "^6.1.2",

0 commit comments

Comments
 (0)
Failed to load comments.