Skip to content

chore: enable no-void #9552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 16, 2024
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
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export default tseslint.config(
{ commentPattern: '.*intentional fallthrough.*' },
],
'no-useless-computed-key': 'error',
'no-void': ['error', { allowAsStatement: true }],
'one-var': ['error', 'never'],
'prefer-arrow-callback': 'error',

Expand Down
2 changes: 1 addition & 1 deletion packages/rule-tester/src/RuleTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,7 +971,7 @@ export class RuleTester extends TestFramework {
const expectsSuggestions = Array.isArray(error.suggestions)
? error.suggestions.length > 0
: Boolean(error.suggestions);
const hasSuggestions = message.suggestions !== void 0;
const hasSuggestions = message.suggestions !== undefined;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const messageSuggestions = message.suggestions!;

Expand Down
1 change: 0 additions & 1 deletion packages/website/src/hooks/useClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export function useClipboard(code: () => string): useClipboardResult {
const [copied, setCopied] = useDebouncedToggle(false);

const copy = useCallback(() => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
void navigator.clipboard.writeText(code()).then(() => {
setCopied(true);
});
Expand Down
Loading