Dimitri POSTOLOV
Dimitri POSTOLOV
Currently `next-themes` generate code that can be simplified when `defaultSystem` is `true` => `if (e==='system' || !e)` when `defaultSystem` is `false` => `if (e==='system')` (no need to check always evaluates...
## Overview ```sh Oops! Something went wrong! :( ESLint: 8.43.0 TypeError: Cannot read properties of undefined (reading 'type') Occurred while linting /Users/dmytro/Desktop/GUILD/graphiql/packages/graphql-language-service-server/src/MessageProcessor.ts:88 Rule: "@shopify/prefer-class-properties" at isSimpleLiteral (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:28:14) at isSimpleLiteralProperty (/Users/dmytro/Desktop/GUILD/graphiql/node_modules/@shopify/eslint-plugin/lib/rules/prefer-class-properties.js:23:32)...
Currently, your rule doesn't catch a lot of cases and I use builtin `no-restricted-syntax` to forbid `.keyCode` ```ts function handleKeyDown(event: KeyboardEvent) { if (event.metaKey && event.keyCode === 75 && inputRef.current)...
the below cases currently not reported ```js if ( uri.match(/unicorn/).length || uri.match(/unicorn/).length > 0 || uri.match(/unicorn/)?.length || uri.match(/unicorn/)?.length > 0 ) { } ```
### Description similar to https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-instanceof-array.md ### Fail ```js foo instanceof Function ``` ### Pass ```js typeof foo === 'function' ``` ### Additional Info _No response_
fixes https://github.com/graphql/graphql-js/issues/3918 https://github.com/graphql/graphql-js/issues/3925 `globalThis.process` and `globalThis.window` is a syntax that doesn't eliminated by webpack ## Input ```js function TRY() { if (process.env.NODE_ENV !== 'production') { // is dev console.log(111) //...
after https://github.com/graphql/graphql-js/pull/3923 and https://github.com/graphql/graphql-js/pull/3501 dead code from [instanceOf](https://github.com/graphql/graphql-js/blob/main/src/jsutils/instanceOf.ts) is no longer tree shaked for browsers @IvanGoncharov wrote > Bundlers incorrectly replace (probably RegExp) process.env.NODE_ENV with "development" resulting in: > ```...
related https://github.com/graphql/graphiql/issues/2326 [PREVIEW](https://deploy-preview-3234--graphiql-test.netlify.app/?query=%23%20Welcome%20to%20GraphiQL%0A%23%0A%23%20GraphiQL%20is%20an%20in-browser%20tool%20for%20writing%2C%20validating%2C%20and%0A%23%20testing%20GraphQL%20queries.%0A%23%0A%23%20Type%20queries%20into%20this%20side%20of%20the%20screen%2C%20and%20you%20will%20see%20intelligent%0A%23%20typeaheads%20aware%20of%20the%20current%20GraphQL%20type%20schema%20and%20live%20syntax%20and%0A%23%20validation%20errors%20highlighted%20within%20the%20text.%0A%23%0A%23%20GraphQL%20queries%20typically%20start%20with%20a%20%22%7B%22%20character.%20Lines%20that%20start%0A%23%20with%20a%20%23%20are%20ignored.%0A%23%0A%23%20An%20example%20GraphQL%20query%20might%20look%20like%3A%0A%23%0A%23%20%20%20%20%20%7B%0A%23%20%20%20%20%20%20%20field(arg%3A%20%22value%22)%20%7B%0A%23%20%20%20%20%20%20%20%20%20subField%0A%23%20%20%20%20%20%20%20%7D%0A%23%20%20%20%20%20%7D%0A%23%0A%23%20Keyboard%20shortcuts%3A%0A%23%0A%23%20%20%20Prettify%20query%3A%20%20Shift-Ctrl-P%20(or%20press%20the%20prettify%20button)%0A%23%0A%23%20%20Merge%20fragments%3A%20%20Shift-Ctrl-M%20(or%20press%20the%20merge%20button)%0A%23%0A%23%20%20%20%20%20%20%20%20Run%20Query%3A%20%20Ctrl-Enter%20(or%20press%20the%20play%20button)%0A%23%0A%23%20%20%20%20Auto%20Complete%3A%20%20Ctrl-Space%20(or%20just%20start%20typing)%0A%23%0A%7B%0A%20%20test%0A%7D%0A%0A) I didn't tested a lot, so some actual feature could be missing TODO: - [x] Migrate `codemirror` editors `monaco-editor` - [x] Support `monaco-graphql` - [x] Resize works...
fixes https://github.com/graphql/graphiql/issues/986 - [ ] remove import from `graphiql` package and add cypress tests