Skip to content

Commit

Permalink
turn valid-typeof as error (#2274)
Browse files Browse the repository at this point in the history
Co-authored-by: Rikki Schulte <[email protected]>
  • Loading branch information
Dimitri POSTOLOV and acao authored Apr 7, 2022
1 parent 1122ce2 commit 1295038
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/blue-baboons-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphiql/toolkit": patch
"graphiql": patch
---

turn `valid-typeof` as `error`, SSR fix
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ module.exports = {
'no-unsafe-negation': 1,
'use-isnan': 1,
'valid-jsdoc': 0,
'valid-typeof': 1,
'valid-typeof': 'error',

// Best Practices (http://eslint.org/docs/rules/#best-practices)
'accessor-pairs': 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
*/
export function createGraphiQLFetcher(options: CreateFetcherOptions): Fetcher {
let httpFetch;
if (typeof window !== null && window?.fetch) {
if (typeof window !== 'undefined' && window.fetch) {
httpFetch = window.fetch;
}
if (
Expand Down

0 comments on commit 1295038

Please sign in to comment.