Skip to content

Commit

Permalink
chore: bump typescript-eslint from 7.18.0 to 8.0.0 (#3493)
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jason Dent <[email protected]>
  • Loading branch information
dependabot[bot] and Jason3S authored Aug 2, 2024
1 parent b0633ff commit 352da92
Show file tree
Hide file tree
Showing 26 changed files with 115 additions and 110 deletions.
8 changes: 4 additions & 4 deletions docs/_scripts/extract-config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ function beautifyJSON(json, width) {
continue;
}
if (line.length + text.length > width) {
line && lines.push(line);
if (line) lines.push(line);
line = '';
}
line += text;
Expand All @@ -401,7 +401,7 @@ function beautifyJSON(json, width) {
addToLine('\n', '}');
}

line && lines.push(line);
if (line) lines.push(line);

// console.error('%o', lines);

Expand Down Expand Up @@ -432,7 +432,7 @@ function beautifyType(dataType, width) {
continue;
}
if (line.length + text.length > width) {
line && lines.push(line);
if (line) lines.push(line);
line = '';
}
line += text;
Expand All @@ -443,7 +443,7 @@ function beautifyType(dataType, width) {
const fixed = items.map((item, index) => item + (index === items.length - 1 ? '' : ' |'));

addToLine(...fixed);
line && lines.push(line);
if (line) lines.push(line);

// console.error('%o', lines);

Expand Down
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,10 @@ export default tsEslint.config(
'no-undef': 'off',
},
},
{
files: ['**/*.json'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
},
},
);
130 changes: 62 additions & 68 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4033,7 +4033,7 @@
"rollup-plugin-dts": "^6.1.1",
"shx": "^0.3.4",
"typescript": "^5.5.4",
"typescript-eslint": "^7.18.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.3.5",
"vitest": "^2.0.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/__utils/src/EventEmitter/operators/debounce.mts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function debounce<T>(waitMs: number): EventOperator<T, T> {
function handleTimer() {
const value = pendingValue;
clear();
value !== symbolNotSet && fire(value);
if (value !== symbolNotSet) fire(value);
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/__utils/src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
function getTypeOf(t: unknown) {
function _getTypeOf(t: unknown) {
return typeof t;
}
type TypeOfTypes = ReturnType<typeof getTypeOf>;
type TypeOfTypes = ReturnType<typeof _getTypeOf>;

type AllowedTypes = Partial<Record<TypeOfTypes, true>>;

Expand Down
1 change: 1 addition & 0 deletions packages/_integrationTests/src/extension.test.mts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-expressions */
import { createRequire } from 'node:module';

import { expect } from 'chai';
Expand Down
4 changes: 2 additions & 2 deletions packages/_server/src/codeActions.mts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class CodeActionHandler {
if (isSpellingIssue && word && spellCheckerDiags.length) {
const wConfig = await pWorkspaceConfig;
const targets = await calculateConfigTargets(docSetting, wConfig);
debugTargets && logTargets(targets);
if (debugTargets) logTargets(targets);

if (!docSetting.hideAddToDictionaryCodeActions) {
actions.push(...generateTargetActions(textDocument, spellCheckerDiags, word, targets));
Expand Down Expand Up @@ -216,7 +216,7 @@ class CodeActionHandler {
if (word && eslintSpellCheckerDiags.length) {
const wConfig = await pWorkspaceConfig;
const targets = await calculateConfigTargets(docSetting, wConfig);
debugTargets && logTargets(targets);
if (debugTargets) logTargets(targets);

if (!docSetting.hideAddToDictionaryCodeActions) {
actions.push(...generateTargetActions(textDocument, eslintSpellCheckerDiags, word, targets));
Expand Down
2 changes: 1 addition & 1 deletion packages/_server/src/config/cspellConfig/cspellConfig.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { FileTypesAndSchemeSettings } from './FileTypesAndSchemeSettings.mj
import type { PrefixWithCspell } from './Generics.mjs';
import type { SpellCheckerBehaviorSettings, SpellCheckerSettings } from './SpellCheckerSettings.mjs';

interface InternalSettings {}
type InternalSettings = object;

export interface CSpellUserSettings extends SpellCheckerSettings, CSpellSettingsPackageProperties, InternalSettings {}

Expand Down
1 change: 1 addition & 0 deletions packages/_server/src/test/mock-node-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { vi } from 'vitest';

// declare function watch(pathName: PathName): Watcher;
// declare function watch(pathName: PathName, options: Options): Watcher;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare function watch(pathName: PathName, callback: Callback): Watcher;
// declare function watch(pathName: PathName, options: Options, callback: Callback): Watcher;

Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/Subscribables/operators/debounce.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function debounce<T>(waitMs: number): OperatorFn<T, T> {
const value = pendingValue;
pendingValue = symbolNotSet;
timer = undefined;
value !== symbolNotSet && notify(value);
if (value !== symbolNotSet) notify(value);
}
});
subscribable.onEvent('onStop', () => clearTimeout(timer));
Expand Down
Loading

0 comments on commit 352da92

Please sign in to comment.