Skip to content

Commit 060f779

Browse files
committed
chore:use codemod Mocha/Vitest/Recipe
1 parent 26d99fd commit 060f779

29 files changed

+51
-14
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
"scripts": {
88
"new": "node tools/new-rule.js",
99
"start": "npm run test:base -- --watch --growl",
10-
"test:base": "mocha \"tests/lib/**/*.js\" --reporter dot",
11-
"test": "nyc npm run test:base -- \"tests/integrations/*.js\" --timeout 60000",
12-
"test:integrations": "mocha \"tests/integrations/*.js\" --timeout 60000",
13-
"debug": "mocha --inspect \"tests/lib/**/*.js\" --reporter dot --timeout 60000",
10+
"test": "vitest run",
1411
"cover": "npm run cover:test && npm run cover:report",
1512
"cover:test": "nyc npm run test:base -- --timeout 60000",
1613
"cover:report": "nyc report --reporter=html",
@@ -27,7 +24,9 @@
2724
"docs:build": "vitepress build docs",
2825
"generate:version": "env-cmd -e version npm run update && npm run lint -- --fix",
2926
"changeset:version": "changeset version && npm run generate:version && git add --all",
30-
"changeset:publish": "npm run typegen && changeset publish"
27+
"changeset:publish": "npm run typegen && changeset publish",
28+
"test:watch": "vitest watch",
29+
"coverage": "vitest run --coverage"
3130
},
3231
"files": [
3332
"lib"
@@ -106,13 +105,14 @@
106105
"globals": "^15.14.0",
107106
"jsdom": "^22.0.0",
108107
"markdownlint-cli": "^0.42.0",
109-
"mocha": "^10.7.3",
110108
"nyc": "^17.1.0",
111109
"pathe": "^1.1.2",
112110
"prettier": "^3.3.3",
113111
"typescript": "^5.7.2",
114112
"vite-plugin-eslint4b": "^0.5.1",
115113
"vitepress": "^1.4.1",
116-
"vue-eslint-parser": "^10.0.0"
114+
"vue-eslint-parser": "^10.0.0",
115+
"vitest": "^1.0.1",
116+
"@vitest/coverage-v8": "^1.0.1"
117117
}
118-
}
118+
}

tests/fixtures/typescript/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"strict": true,
44
"skipLibCheck": true
55
}
6-
}
6+
}

tests/integrations/eslint-plugin-import.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
/**
23
* @author Toru Nagashima <https://github.com/mysticatea>
34
* @copyright 2017 Toru Nagashima. All rights reserved.

tests/integrations/eslint-plugin-import/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
"eslint-plugin-import": "~2.23.4",
1313
"eslint-plugin-vue": "file:../../.."
1414
}
15-
}
15+
}

tests/integrations/flat-config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
'use strict'
23

34
const { strict: assert } = require('assert')

tests/integrations/flat-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"eslint": "^9.0.0-0",
1111
"eslint-plugin-vue": "file:../../.."
1212
}
13-
}
13+
}

tests/lib/autofix.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
/**
23
* @author Yosuke Ota <https://github.com/ota-meshi>
34
* See LICENSE file in root directory for full license.

tests/lib/configs/eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
'use strict'
23

34
const { ESLint } = require('../../eslint-compat')

tests/lib/configs/flat.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
/**
23
* @fileoverview flat configs test
34
* @author 唯然<weiran.zsd@outlook.com>

tests/lib/meta.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { describe, it } from "vitest";
12
'use strict'
23

34
const assert = require('assert')

0 commit comments

Comments
 (0)