Skip to content

Commit

Permalink
Merge commit 'e8c5e5068e50a486ed05f82d4988368b31468e04' into fix-sync…
Browse files Browse the repository at this point in the history
…-jest-and-vitest-compatible-rules
  • Loading branch information
Sysix committed Dec 3, 2024
2 parents e4eda3c + e8c5e50 commit 7e1e9e8
Show file tree
Hide file tree
Showing 32 changed files with 1,610 additions and 1,135 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Code generation

on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- 'pnpm-lock.yaml'
- 'scripts/**'
- '.github/workflows/generate.yml'
push:
branches:
- main
- 'renovate/**'
paths:
- 'pnpm-lock.yaml'
- 'scripts/**'
- '.github/workflows/generate.yml'

jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/pnpm

- name: Clone oxc_linter project
run: pnpm run clone

- name: Remove current generated code
run: rm -r ./src/generated/

- name: Generate from source code
run: pnpm run generate

- name: Format generated code
run: pnpm run format

- name: Check for git diff
run: git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: ./.github/actions/pnpm

- name: Run oxlint
run: npx oxlint --config=oxlint.json --tsconfig=tsconfig.json
run: npx oxlint --tsconfig=tsconfig.json

- name: Run eslint
run: npx eslint --flag unstable_ts_config
20 changes: 20 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Type Check

on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
- 'renovate/**'

jobs:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/pnpm

- name: Type Check
run: npx tsc --noEmit
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
pnpm = "9.12.3"
pnpm = "9.14.4"
File renamed without changes.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ And then you can add the following script to your `package.json`:

// turn eslint rules off by oxlint category
'flat/pedantic': { rules: [Object] },
'flat/nursery': { rules: [Object] },
'flat/style': { rules: [Object] },
'flat/correctness': { rules: [Object] },
'flat/restriction': { rules: [Object] },
Expand Down
8 changes: 8 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,13 @@ export default [
unicorn.configs['flat/recommended'],
...tseslint.configs.recommended,
eslintConfigPrettier,
{
rules: {
// https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2496
'unicorn/expiring-todo-comments': 'off',
// https://github.com/eslint/eslint/issues/19134
'@typescript-eslint/no-unused-expressions': 'off',
},
},
...oxlint.buildFromOxlintConfigFile('oxlint.json'),
];
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "eslint-plugin-oxlint",
"version": "0.11.1",
"version": "0.14.0",
"description": "Turn off all rules already supported by oxlint",
"type": "module",
"types": "./dist/index.d.ts",
"packageManager": "pnpm@9.12.3",
"packageManager": "pnpm@9.14.4",
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -41,8 +41,9 @@
"generate": "node --import @oxc-node/core/register ./scripts/generate.ts",
"clone": "node --import @oxc-node/core/register ./scripts/sparse-clone.ts",
"build": "vite build",
"lint": "npx oxlint --config=oxlint.json --tsconfig=tsconfig.json && npx eslint --flag unstable_ts_config",
"lint": "npx oxlint --tsconfig=tsconfig.json && npx eslint --flag unstable_ts_config",
"format": "npx prettier --write .",
"type-check": "tsc --noEmit",
"test": "vitest --reporter=verbose"
},
"keywords": [
Expand All @@ -54,6 +55,7 @@
"devDependencies": {
"@eslint/js": "^9.13.0",
"@oxc-node/core": "^0.0.15",
"@types/eslint-config-prettier": "^6.11.3",
"@types/node": "^22.7.7",
"@types/shelljs": "^0.8.15",
"@vitest/coverage-v8": "^2.1.3",
Expand All @@ -64,13 +66,13 @@
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"memfs": "^4.14.0",
"oxlint": "^0.11.1",
"oxlint": "^0.14.0",
"prettier": "^3.3.3",
"scule": "^1.3.0",
"shelljs": "^0.8.5",
"typescript": "^5.6.3",
"typescript-eslint": "^8.10.0",
"vite": "^5.4.9",
"vite": "^6.0.0",
"vite-plugin-dts": "^4.2.4",
"vitest": "^2.1.3"
},
Expand Down
Loading

0 comments on commit 7e1e9e8

Please sign in to comment.