Skip to content

Commit eb917d6

Browse files
test: migrate test to eslint-vitest-rule-tester
1 parent fe31948 commit eb917d6

File tree

132 files changed

+10637
-10407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+10637
-10407
lines changed

.github/workflows/test-js.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,12 @@ jobs:
1818
- "20"
1919
- "latest"
2020
ts_version:
21-
- "next"
21+
# - "next"
2222
- "latest"
23-
- "4.7.4"
23+
# - "4.7.4"
2424
# - "JS"
2525
runs-on: ${{ matrix.os }}
2626
continue-on-error: ${{ matrix.ts_version == 'next' }}
27-
env:
28-
REPORT_COVERAGE: ${{ fromJSON('["false", "true"]')[matrix.node_version == 'latest' && matrix.os == 'ubuntu-latest'] }}
2927
steps:
3028
- uses: actions/checkout@v4
3129
- uses: ./.github/actions/prepare
@@ -48,12 +46,16 @@ jobs:
4846
if: matrix.ts_version != 'JS'
4947
run: pnpm add -D typescript@"${{ matrix.ts_version }}"
5048

49+
# - name: Run Tests
50+
# if: matrix.ts_version != 'latest'
51+
# run: pnpm test-compiled # TODO: Figure out how to get proper coverage of this.
52+
5153
- name: Run Tests
52-
run: pnpm test-compiled
54+
if: matrix.ts_version == 'latest'
55+
run: pnpm test-uncompiled
5356

5457
- name: Report coverage
5558
uses: codecov/codecov-action@v4.1.1
56-
if: env.REPORT_COVERAGE == 'true'
59+
if: matrix.ts_version == 'latest' && matrix.node_version == 'latest'
5760
with:
5861
file: coverage/lcov.info
59-
flags: ${{ matrix.ts_version }}

knip.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"@types/eslint",
1010
"@typescript-eslint/eslint-plugin",
1111
"@vitest/coverage-istanbul",
12+
"@vitest/coverage-v8",
1213
"eslint-config-prettier",
1314
"eslint-flat-config-utils",
1415
"eslint-import-resolver-typescript",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"files": ["lib/", "package.json", "LICENSE", "README.md"],
4444
"scripts": {
4545
"build": "pnpm run build:node && pnpm run build:docs",
46-
"build-tests": "rimraf tests-compiled && tsc -p tsconfig.tests-compiled.json && tsc-alias -p tsconfig.tests-compiled.json",
46+
"build-tests": "rimraf tests-compiled && tsc -p tsconfig.tests-compiled.json && tsc-alias -p tsconfig.tests-compiled.json && cp tests/tsconfig.test.json tests-compiled/tests/tsconfig.test.json",
4747
"build:docs": "eslint-doc-generator",
4848
"build:node": "rimraf lib && rollup -c rollup.config.ts --configPlugin rollup-plugin-ts",
4949
"cz": "git-cz",
@@ -68,7 +68,8 @@
6868
"prepare": "husky",
6969
"release": "semantic-release",
7070
"test": "pnpm run test:js",
71-
"test-compiled": "USE_COMPILED_TESTS=1 vitest run --coverage",
71+
"test-compiled": "USE_COMPILED_TESTS=1 vitest run",
72+
"test-uncompiled": "vitest run --coverage",
7273
"test-work": "vitest",
7374
"test:js": "vitest --coverage",
7475
"type-check": "tsc -p tsconfig.build.json --noEmit",
@@ -100,7 +101,6 @@
100101
"@types/rollup-plugin-auto-external": "2.0.5",
101102
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.54",
102103
"@typescript-eslint/parser": "8.0.0-alpha.54",
103-
"@typescript-eslint/rule-tester": "8.0.0-alpha.54",
104104
"@vitest/coverage-istanbul": "2.0.4",
105105
"@vitest/coverage-v8": "2.0.4",
106106
"chalk": "4.1.2",
@@ -132,7 +132,7 @@
132132
"eslint-plugin-unicorn": "55.0.0",
133133
"eslint-plugin-vitest": "0.5.4",
134134
"eslint-plugin-yml": "1.14.0",
135-
"espree": "10.1.0",
135+
"eslint-vitest-rule-tester": "0.3.3",
136136
"husky": "9.1.2",
137137
"jsonc-eslint-parser": "2.4.0",
138138
"knip": "5.27.0",

pnpm-lock.yaml

Lines changed: 90 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

project-dictionary.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ deassert
33
declarator
44
declarators
55
deepmerge
6-
espree
76
IIFE
87
jonaskello
98
Kello
@@ -19,3 +18,4 @@ rulesets
1918
sonarjs
2019
treeshake
2120
TSES
21+
uncompiled

0 commit comments

Comments
 (0)