Skip to content

Commit

Permalink
Adapt jest to module syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ruihildt committed Oct 21, 2024
1 parent 3234555 commit dae9b19
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
'*.{js,ts,vue}': ['eslint', 'prettier --write'],
'*.{ts,vue}': [() => 'tsc --noEmit'],
'*.{css,scss,vue}': 'stylelint',
Expand Down
3 changes: 1 addition & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
testEnvironmentOptions: {
Expand Down
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"devDependencies": {
"@babel/preset-env": "^7.25.8",
"@ffflorian/jszip-cli": "^3.7.2",
"@jest/types": "^29.6.3",
"@types/eslint__js": "^8.42.3",
"@types/eslint-config-prettier": "^6.11.3",
"@types/firefox-webext-browser": "^120.0.4",
Expand Down Expand Up @@ -95,7 +96,8 @@
"naive-ui": "^2.40.1",
"tlds": "^1.255.0",
"uuid": "^10.0.0",
"vue-query": "^1.26.0"
"vue-query": "^1.26.0",
"windicss": "^3.5.6"
},
"type": "module"
}
6 changes: 5 additions & 1 deletion windi.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { resolve } from 'path';
import { fileURLToPath } from 'url';
import { dirname, resolve } from 'path';
import { defineConfig } from 'windicss/helpers';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

export default defineConfig({
darkMode: 'class',
// https://windicss.org/posts/v30.html#attributify-mode
Expand Down

0 comments on commit dae9b19

Please sign in to comment.