Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,28 @@ module.exports = {
'prefer-const': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
// The three rules `ban-types` was split into. Off for the same reason it is:
// `{}` and `Function` are used deliberately, mostly in type plumbing.
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
// Successor to `no-var-requires`, which this repo also leaves off (see the
// override below): config files and a few CJS interop points require by
// design.
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/prefer-as-const': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
// `caughtErrors` defaults to reporting, so a `catch` binding nothing reads
// has to be named or dropped. Left unreported: a caught error is often
// kept for the shape of the catch rather than to be used.
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
// Keep new code "erasable" so Node can run it via
// `--experimental-strip-types` (type-only syntax that vanishes when stripped).
Expand Down
8 changes: 7 additions & 1 deletion packages/ai-bot/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ module.exports = {
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
// `caughtErrors` defaults to reporting; a caught error is often kept for
// the shape of the catch rather than to be used.
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
'@typescript-eslint/parameter-properties': [
'error',
Expand Down
2 changes: 2 additions & 0 deletions packages/boxel-icons/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module.exports = {
curly: 'error',
'prefer-const': 'off',
'@typescript-eslint/no-empty-function': 'off',
// Successor to `no-var-requires`: the icon build scripts require by design.
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
Expand Down
6 changes: 6 additions & 0 deletions packages/boxel-ui/docs-app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ module.exports = {
'prefer-const': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
// The rules `ban-types` was split into, off for the same reason.
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
Expand Down Expand Up @@ -133,6 +137,8 @@ module.exports = {
rules: {
'n/no-unpublished-require': 'off',
'@typescript-eslint/no-var-requires': 'off',
// Successor to the rule above.
'@typescript-eslint/no-require-imports': 'off',
},
},
{
Expand Down
21 changes: 20 additions & 1 deletion packages/host/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,30 @@ const sharedBrowserConfig = {
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
// `caughtErrors` defaults to reporting, so a `catch` binding this code
// does not read has to be named or dropped. Left unreported: a caught
// error is often kept for the shape of the catch rather than to be used.
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrors: 'none',
},
],
'prefer-const': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-types': 'off',
// The three rules `ban-types` was split into. Off for the same reason it is:
// `{}` and `Function` are used deliberately here, mostly in type plumbing.
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
// Successor to `no-var-requires`, which this repo also leaves off: config
// files and a few CJS interop points require by design.
'@typescript-eslint/no-require-imports': 'off',
// A bare member expression is how a getter consumes a tracked property to
// register a reactive dependency, and `cond && doThing()` is used as a
// guard. Both read as unused expressions.
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-this-alias': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,10 @@ module(
// test can prove `consumingRealm` (and a derived
// `lockConsumingRealm`) flow through the model-level derivation
// rather than the context fallback.
let cardApi: typeof import('@cardstack/base/card-api') = await getService(
'loader-service',
).loader.import('@cardstack/base/card-api');
let _cardApi: typeof import('@cardstack/base/card-api') =
await getService('loader-service').loader.import(
'@cardstack/base/card-api',
);

await setupIntegrationTestRealm({
mockMatrixUtils,
Expand Down Expand Up @@ -403,7 +404,7 @@ module(
try {
await renderCard(
getService('loader-service').loader,
realmConfig as InstanceType<typeof cardApi.CardDef>,
realmConfig as InstanceType<typeof _cardApi.CardDef>,
'edit',
);
await waitFor('[data-test-add-new="instance"]');
Expand Down
4 changes: 2 additions & 2 deletions packages/host/tests/integration/field-configuration-test.gts
Original file line number Diff line number Diff line change
Expand Up @@ -423,9 +423,9 @@ module('Integration | field configuration', function (hooks) {

// Change the consumed field in the linked Theme card
let mod = await loader.import(`${testRealmURL}reactive`);
let ThemeCard = (mod as any).ThemeCard;
let _ThemeCard = (mod as any).ThemeCard;
let loadedTheme = customStore.getCard(themeRef) as InstanceType<
typeof ThemeCard
typeof _ThemeCard
>;
loadedTheme.palette = 'orange';
(parent as any).theme = loadedTheme;
Expand Down
Loading
Loading