Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Use bun on CI #15

Merged
merged 1 commit into from
Jun 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run test
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun run lint
- run: bun run test
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules
/yarn.lock
/package-lock.json
/pnpm-lock.yaml
/pnpm-lock.yaml
/bun.lockb
14 changes: 6 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,19 @@
"type": "git",
"url": "https://github.com/bfanger/eslint-plugin-only-warn.git"
},
"engines": {
"node": ">=18"
},
"type": "commonjs",
"main": "src/only-warn.js",
"prettier": {},
"scripts": {
"lint": "prettier --check src tests && eslint src tests",
"format": "eslint --fix src tests && prettier --write src tests",
"lint": "prettier --check . && eslint .",
"format": "eslint --fix . && prettier --write .",
"test": "vitest run",
"test:watch": "vitest"
},
"devDependencies": {
"eslint": "^9.0.0",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.4",
"vitest": "^1.2.1"
"prettier": "^3.2.5",
"vitest": "^1.6.0"
}
}
2 changes: 1 addition & 1 deletion tests/only-warn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("eslint-plugin-only-warn", () => {
expect(messages[0].severity).toBe(2);
});

it("can be temporarly disabled", () => {
it("can be temporally disabled", () => {
disable();
const messages1 = linter.verify(sourceCode, config);
expect(messages1[0].severity).toBe(2);
Expand Down