Skip to content

Commit

Permalink
test: continue to use jest instead of vitest for now
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jan 1, 2024
1 parent cf077e5 commit 7bcb6c6
Show file tree
Hide file tree
Showing 14 changed files with 1,616 additions and 717 deletions.
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

21 changes: 0 additions & 21 deletions auto-imports.d.ts

This file was deleted.

33 changes: 27 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"release": "run-s build release:only",
"release:only": "changeset publish",
"version": "changeset version && yarn --no-immutable",
"test": "vitest run --coverage --passWithNoTests",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
"typecov": "type-coverage"
},
"devDependencies": {
Expand All @@ -34,21 +34,24 @@
"@types/acorn": "^6.0.0",
"@types/eslint": "^8.56.0",
"@types/eslint-plugin-markdown": "^2.0.2",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"@types/react": "^18.2.46",
"@types/unist": "^3.0.2",
"@vitest/coverage-istanbul": "^1.1.1",
"cross-env": "^7.0.3",
"eslint": "^8.56.0",
"jest": "^30.0.0-alpha.2",
"lint-staged": "^15.2.0",
"npm-run-all2": "^6.1.1",
"patch-package": "^8.0.0",
"prettier": "^3.1.1",
"react": "^18.2.0",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.2",
"type-coverage": "^2.27.1",
"typescript": "^5.3.3",
"unplugin-auto-import": "^0.17.3",
"vitest": "^1.1.1"
"typescript": "^5.3.3"
},
"resolutions": {
"@types/acorn": "^6.0.0",
Expand All @@ -75,10 +78,28 @@
"fixtures",
"lib",
"CHANGELOG.md",
"/auto-imports.d.ts",
"/test.*",
"!/.*.js"
],
"jest": {
"preset": "ts-jest",
"setupFiles": [
"<rootDir>/node_modules/eslint/lib/linter/linter.js"
],
"moduleNameMapper": {
"^eslint-mdx$": "<rootDir>/packages/eslint-mdx/src",
"^eslint-plugin-mdx$": "<rootDir>/packages/eslint-plugin-mdx/src"
},
"collectCoverage": true,
"coverageThreshold": {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
}
},
"prettier": "@1stg/prettier-config",
"remarkConfig": {
"plugins": [
Expand Down
3 changes: 0 additions & 3 deletions packages/eslint-mdx/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ export class Parser {
ignoreRemarkConfig,
})
} catch (err: unknown) {
if (process.argv.includes('--debug')) {
console.error(err)
}
const { message, line, column, place } = err as VFileMessage
const point = place && ('start' in place ? place.start : place)
throw Object.assign(
Expand Down
1 change: 1 addition & 0 deletions packages/eslint-plugin-mdx/src/configs/recommended.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const addPrettierRules = () => {
return
}

/* istanbul ignore next */
overrides.push(
{
files: '*.md',
Expand Down
Loading

0 comments on commit 7bcb6c6

Please sign in to comment.