Skip to content

Commit

Permalink
Merge pull request #1456 from glimmerjs/use-real-qunit-types
Browse files Browse the repository at this point in the history
Can we use the real @types/qunit?
  • Loading branch information
NullVoxPopuli authored Oct 24, 2023
2 parents ac36624 + c9be694 commit 2b6952e
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 947 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,16 @@ module.exports = {
'n/no-extraneous-import': 'warn',
},
},

// QUnit is a weird package, and there are some issues open about fixing it
// - https://github.com/qunitjs/qunit/issues/1729
// - https://github.com/qunitjs/qunit/issues/1727
// - https://github.com/qunitjs/qunit/issues/1724
{
files: ['**/*-test.ts', '**/{test,integration-tests}/**/*.ts'],
rules: {
'@typescript-eslint/unbound-method': 'off',
},
},
],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@types/eslint": "^8.37.0",
"@types/node": "^18.16.6",
"@types/preval.macro": "^3.0.0",
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@typescript-eslint/eslint-plugin": "^5.59.5",
"@typescript-eslint/parser": "^5.59.5",
"amd-name-resolver": "^1.3.1",
Expand Down
10 changes: 10 additions & 0 deletions packages/@glimmer-workspace/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@ module.exports = {
plugins: ['@glimmer-workspace'],
extends: ['plugin:@glimmer-workspace/recommended'],
},
// QUnit is a weird package, and there are some issues open about fixing it
// - https://github.com/qunitjs/qunit/issues/1729
// - https://github.com/qunitjs/qunit/issues/1727
// - https://github.com/qunitjs/qunit/issues/1724
{
files: ['**/*-test.ts', '**/{test,integration-tests}/**/*.ts'],
rules: {
'@typescript-eslint/unbound-method': 'off',
},
},
],
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function setupQunit() {
await import('qunit/qunit/qunit.css');

const runner = autoRegister();
// @ts-expect-error qunit types don't expose "reporters"
const tap = qunit.reporters.tap;
tap.init(runner, { log: console.info });

Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer-workspace/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"devDependencies": {
"@glimmer/local-debug-flags": "workspace:^",
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@types/js-reporters": "workspace:^"
},
"scripts": {
Expand Down
10 changes: 10 additions & 0 deletions packages/@glimmer/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,15 @@ module.exports = {
plugins: ['@glimmer-workspace'],
extends: ['plugin:@glimmer-workspace/recommended'],
},
// QUnit is a weird package, and there are some issues open about fixing it
// - https://github.com/qunitjs/qunit/issues/1729
// - https://github.com/qunitjs/qunit/issues/1727
// - https://github.com/qunitjs/qunit/issues/1724
{
files: ['**/*-test.ts', '**/{test,integration-tests}/**/*.ts'],
rules: {
'@typescript-eslint/unbound-method': 'off',
},
},
],
};
4 changes: 2 additions & 2 deletions packages/@glimmer/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@simple-dom/document": "^1.4.0"
},
"devDependencies": {
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@glimmer/compiler": "workspace:^",
"@glimmer-workspace/build-support": "workspace:^"
},
Expand All @@ -30,4 +30,4 @@
"default": "./dist/index.js"
}
}
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@glimmer/local-debug-flags": "workspace:^",
"@glimmer/opcode-compiler": "workspace:^",
"@glimmer/debug": "workspace:^",
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@glimmer-workspace/build-support": "workspace:^"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer/syntax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@glimmer/local-debug-flags": "workspace:^",
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@glimmer-workspace/build-support": "workspace:^"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@glimmer/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@glimmer/local-debug-flags": "workspace:^",
"@types/qunit": "workspace:^",
"@types/qunit": "^2.19.7",
"@glimmer-workspace/build-support": "workspace:^"
},
"main": "index.ts",
Expand Down
Loading

0 comments on commit 2b6952e

Please # to comment.