From 4c3a08b1a99e0933362a1c93340b613730c90aa4 Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 27 May 2023 23:33:02 +0200 Subject: [PATCH] [ESLint] enable `sonar/prefer-promise-shorthand` and `sonar/no-dead-store` rules (#3143) --- .changeset/grumpy-experts-speak.md | 6 + .changeset/hip-maps-study.md | 5 + .eslintrc.js | 292 +++++++++--------- package.json | 1 + packages/codemirror-graphql/README.md | 6 +- .../src/MessageProcessor.ts | 5 - packages/monaco-graphql/README.md | 14 +- packages/vscode-graphql-execution/README.md | 2 +- .../vscode-graphql-execution/src/extension.ts | 12 +- .../src/providers/exec-content.ts | 10 +- yarn.lock | 178 ++++++++++- 11 files changed, 355 insertions(+), 176 deletions(-) create mode 100644 .changeset/grumpy-experts-speak.md create mode 100644 .changeset/hip-maps-study.md diff --git a/.changeset/grumpy-experts-speak.md b/.changeset/grumpy-experts-speak.md new file mode 100644 index 00000000000..58899caac45 --- /dev/null +++ b/.changeset/grumpy-experts-speak.md @@ -0,0 +1,6 @@ +--- +'graphql-language-service-server': patch +'vscode-graphql-execution': patch +--- + +[ESLint] enable `sonar/prefer-promise-shorthand` and `sonar/no-dead-store` rules diff --git a/.changeset/hip-maps-study.md b/.changeset/hip-maps-study.md new file mode 100644 index 00000000000..03bae32e86b --- /dev/null +++ b/.changeset/hip-maps-study.md @@ -0,0 +1,5 @@ +--- +'vscode-graphql-execution': minor +--- + +`GraphQLContentProvider.getCurrentHtml` should not return `Promise` diff --git a/.eslintrc.js b/.eslintrc.js index 2c980a651c1..0cfd041459f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -52,75 +52,73 @@ module.exports = { rules: { '@arthurgeron/react-usememo/require-usememo': [ 'error', - { - checkHookCalls: false, - }, + { checkHookCalls: false }, ], // Possible Errors (http://eslint.org/docs/rules/#possible-errors) 'no-console': 'error', - 'no-constant-binary-expression': 2, - 'no-empty': [1, { allowEmptyCatch: true }], - 'no-extra-parens': 0, - 'no-template-curly-in-string': 0, - 'valid-jsdoc': 0, + 'no-constant-binary-expression': 'error', + 'no-empty': ['error', { allowEmptyCatch: true }], + 'no-extra-parens': 'off', + 'no-template-curly-in-string': 'off', + 'valid-jsdoc': 'off', // Best Practices (http://eslint.org/docs/rules/#best-practices) - 'accessor-pairs': 1, - 'array-callback-return': 0, - 'block-scoped-var': 0, - 'class-methods-use-this': 0, - complexity: 0, - 'consistent-return': 0, - curly: 1, - 'default-case': 0, - 'dot-notation': 1, - eqeqeq: [1, 'allow-null'], - 'guard-for-in': 0, + 'accessor-pairs': 'error', + 'array-callback-return': 'off', + 'block-scoped-var': 'off', + 'class-methods-use-this': 'off', + complexity: 'off', + 'consistent-return': 'off', + curly: 'error', + 'default-case': 'off', + 'dot-notation': 'error', + eqeqeq: ['error', 'allow-null'], + 'guard-for-in': 'off', 'no-alert': 'error', - 'no-await-in-loop': 1, - 'no-caller': 1, - 'no-case-declarations': 0, - 'no-div-regex': 1, + 'no-await-in-loop': 'error', + 'no-caller': 'error', + 'no-case-declarations': 'off', + 'no-div-regex': 'error', 'no-else-return': ['error', { allowElseIf: false }], - 'no-eq-null': 0, - 'no-eval': 1, - 'no-extend-native': 1, - 'no-extra-bind': 1, - 'no-extra-label': 1, - 'no-floating-decimal': 0, // prettier --list-different - 'no-implicit-coercion': 1, - 'no-implicit-globals': 0, - 'no-implied-eval': 1, - 'no-invalid-this': 0, - 'no-iterator': 1, - 'no-labels': 1, - 'no-lone-blocks': 1, - 'no-loop-func': 0, - 'no-magic-numbers': 0, - 'no-multi-str': 0, - 'no-new-func': 1, - 'no-new-wrappers': 1, + 'no-eq-null': 'off', + 'no-eval': 'error', + 'no-extend-native': 'error', + 'no-extra-bind': 'error', + 'no-extra-label': 'error', + 'no-floating-decimal': 'off', // prettier --list-different + 'no-implicit-coercion': 'error', + 'no-implicit-globals': 'off', + 'no-implied-eval': 'error', + 'no-invalid-this': 'off', + 'no-iterator': 'error', + 'no-labels': 'error', + 'no-lone-blocks': 'error', + 'no-loop-func': 'off', + 'no-magic-numbers': 'off', + 'no-multi-str': 'off', + 'no-new-func': 'error', + 'no-new-wrappers': 'error', 'no-new': 'error', - 'no-octal-escape': 1, - 'no-param-reassign': 1, - 'no-proto': 1, - 'no-restricted-properties': 0, - 'no-return-assign': 1, - 'no-return-await': 1, - 'no-script-url': 1, - 'no-self-compare': 1, - 'no-sequences': 1, + 'no-octal-escape': 'error', + 'no-param-reassign': 'error', + 'no-proto': 'error', + 'no-restricted-properties': 'off', + 'no-return-assign': 'error', + 'no-return-await': 'error', + 'no-script-url': 'error', + 'no-self-compare': 'error', + 'no-sequences': 'error', 'no-throw-literal': 'error', - 'no-unmodified-loop-condition': 0, - 'no-useless-call': 1, - 'no-useless-concat': 1, - 'no-useless-return': 0, + 'no-unmodified-loop-condition': 'off', + 'no-useless-call': 'error', + 'no-useless-concat': 'error', + 'no-useless-return': 'off', '@typescript-eslint/prefer-optional-chain': 'error', - 'no-warning-comments': 0, + 'no-warning-comments': 'off', radix: 'error', - 'require-await': 0, - 'vars-on-top': 0, - yoda: 1, + 'require-await': 'off', + 'vars-on-top': 'off', + yoda: 'error', 'unicorn/prefer-string-slice': 'error', 'sonarjs/no-identical-functions': 'error', 'sonarjs/no-unused-collection': 'error', @@ -128,17 +126,17 @@ module.exports = { 'unicorn/no-useless-undefined': 'error', 'no-var': 'error', // Strict Mode (http://eslint.org/docs/rules/#strict-mode) - strict: 0, + strict: 'off', // Variables (http://eslint.org/docs/rules/#variables) - 'init-declarations': 0, - 'no-catch-shadow': 1, - 'no-label-var': 1, - 'no-restricted-globals': 0, + 'init-declarations': 'off', + 'no-catch-shadow': 'error', + 'no-label-var': 'error', + 'no-restricted-globals': 'off', 'no-shadow': 'off', '@typescript-eslint/no-shadow': 'error', - 'no-undef-init': 0, - 'no-undefined': 0, + 'no-undef-init': 'off', + 'no-undefined': 'off', '@typescript-eslint/no-unused-vars': [ 'error', @@ -149,56 +147,56 @@ module.exports = { }, ], - 'no-use-before-define': 0, + 'no-use-before-define': 'off', 'unicorn/no-useless-switch-case': 'error', // Node.js and CommonJS (http://eslint.org/docs/rules/#nodejs-and-commonjs) - 'callback-return': 0, - 'global-require': 0, - 'handle-callback-err': 1, - 'no-mixed-requires': 1, - 'no-new-require': 1, - 'no-path-concat': 1, - 'no-process-env': 0, - 'no-process-exit': 0, - 'no-restricted-modules': 0, - 'no-sync': 0, + 'callback-return': 'off', + 'global-require': 'off', + 'handle-callback-err': 'error', + 'no-mixed-requires': 'error', + 'no-new-require': 'error', + 'no-path-concat': 'error', + 'no-process-env': 'off', + 'no-process-exit': 'off', + 'no-restricted-modules': 'off', + 'no-sync': 'off', // Stylistic Issues (http://eslint.org/docs/rules/#stylistic-issues) - camelcase: 0, - 'capitalized-comments': 0, - 'consistent-this': 0, - 'func-name-matching': 0, - 'func-names': 0, - 'func-style': 0, - 'id-blacklist': 0, - 'id-length': 0, - 'id-match': 0, - indent: 0, - 'line-comment-position': 0, - 'linebreak-style': 0, // prettier --list-different - 'lines-around-comment': 0, - 'lines-around-directive': 0, - 'max-depth': 0, - 'max-lines': 0, - 'max-nested-callbacks': 0, - 'max-params': 0, - 'max-statements-per-line': 0, - 'max-statements': 0, - 'multiline-ternary': 0, - 'new-cap': 0, - 'newline-after-var': 0, - 'newline-before-return': 0, - 'newline-per-chained-call': 0, - 'no-bitwise': 1, - 'no-continue': 0, - 'no-inline-comments': 0, - 'no-mixed-operators': 0, + camelcase: 'off', + 'capitalized-comments': 'off', + 'consistent-this': 'off', + 'func-name-matching': 'off', + 'func-names': 'off', + 'func-style': 'off', + 'id-blacklist': 'off', + 'id-length': 'off', + 'id-match': 'off', + indent: 'off', + 'line-comment-position': 'off', + 'linebreak-style': 'off', // prettier --list-different + 'lines-around-comment': 'off', + 'lines-around-directive': 'off', + 'max-depth': 'off', + 'max-lines': 'off', + 'max-nested-callbacks': 'off', + 'max-params': 'off', + 'max-statements-per-line': 'off', + 'max-statements': 'off', + 'multiline-ternary': 'off', + 'new-cap': 'off', + 'newline-after-var': 'off', + 'newline-before-return': 'off', + 'newline-per-chained-call': 'off', + 'no-bitwise': 'error', + 'no-continue': 'off', + 'no-inline-comments': 'off', + 'no-mixed-operators': 'off', 'no-negated-condition': 'off', 'unicorn/no-negated-condition': 'error', - 'no-nested-ternary': 0, - 'no-new-object': 1, - 'no-plusplus': 0, + 'no-nested-ternary': 'off', + 'no-new-object': 'error', + 'no-plusplus': 'off', 'no-restricted-syntax': [ 'error', { @@ -215,34 +213,34 @@ module.exports = { message: 'Use `.key` instead of `.keyCode`', }, ], - 'no-ternary': 0, - 'no-underscore-dangle': 0, - 'no-unneeded-ternary': 0, - 'object-curly-newline': 0, - 'object-property-newline': 0, - 'one-var-declaration-per-line': 0, - 'one-var': [1, 'never'], - 'operator-assignment': 1, - 'operator-linebreak': 0, - 'require-jsdoc': 0, - 'sort-keys': 0, - 'sort-vars': 0, + 'no-ternary': 'off', + 'no-underscore-dangle': 'off', + 'no-unneeded-ternary': 'off', + 'object-curly-newline': 'off', + 'object-property-newline': 'off', + 'one-var-declaration-per-line': 'off', + 'one-var': ['error', 'never'], + 'operator-assignment': 'error', + 'operator-linebreak': 'off', + 'require-jsdoc': 'off', + 'sort-keys': 'off', + 'sort-vars': 'off', 'spaced-comment': ['error', 'always', { markers: ['/'] }], - 'wrap-regex': 0, + 'wrap-regex': 'off', 'unicorn/prefer-dom-node-remove': 'error', // ECMAScript 6 (http://eslint.org/docs/rules/#ecmascript-6) - 'arrow-body-style': 0, - 'no-duplicate-imports': 0, - 'no-restricted-imports': 0, - 'no-useless-computed-key': 1, - 'no-useless-constructor': 0, - 'no-useless-rename': 1, - 'object-shorthand': 1, - 'prefer-arrow-callback': [0, { allowNamedFunctions: true }], // prettier --list-different - 'prefer-numeric-literals': 0, - 'prefer-template': 0, - 'sort-imports': 0, - 'symbol-description': 1, + 'arrow-body-style': 'off', + 'no-duplicate-imports': 'off', + 'no-restricted-imports': 'off', + 'no-useless-computed-key': 'error', + 'no-useless-constructor': 'off', + 'no-useless-rename': 'error', + 'object-shorthand': 'error', + 'prefer-arrow-callback': ['off', { allowNamedFunctions: true }], // prettier --list-different + 'prefer-numeric-literals': 'off', + 'prefer-template': 'off', + 'sort-imports': 'off', + 'symbol-description': 'error', 'sonarjs/no-ignored-return': 'error', 'unicorn/no-array-push-push': 'error', @@ -258,7 +256,7 @@ module.exports = { 'react/jsx-pascal-case': 'error', 'react/no-did-mount-set-state': 'error', 'react/no-did-update-set-state': 'error', - 'react/prop-types': 0, + 'react/prop-types': 'off', 'react/prefer-es6-class': 'error', 'react/prefer-stateless-function': 'error', 'react/self-closing-comp': 'error', @@ -298,6 +296,8 @@ module.exports = { '@typescript-eslint/no-unused-expressions': 'error', 'sonarjs/no-small-switch': 'error', 'sonarjs/no-duplicated-branches': 'error', + 'sonar/prefer-promise-shorthand': 'error', + 'sonar/no-dead-store': 'error', 'unicorn/prefer-node-protocol': 'error', 'import/no-unresolved': ['error', { ignore: ['^node:'] }], 'unicorn/prefer-string-replace-all': 'error', @@ -307,17 +307,16 @@ module.exports = { 'unicorn/prefer-switch': 'error', 'unicorn/prefer-dom-node-text-content': 'error', // TODO: Fix all errors for the following rules included in recommended config - '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/triple-slash-reference': 'off', - '@typescript-eslint/no-namespace': 'off', }, - plugins: ['promise', 'sonarjs', 'unicorn', '@arthurgeron/react-usememo'], + plugins: [ + 'promise', + 'sonarjs', + 'unicorn', + '@arthurgeron/react-usememo', + 'sonar', + ], }, { // Rules that requires type information @@ -328,6 +327,14 @@ module.exports = { '@typescript-eslint/no-unnecessary-type-assertion': 'error', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/non-nullable-type-assertion-style': 'error', + // TODO: Fix all errors for the following rules included in recommended config + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/ban-types': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/triple-slash-reference': 'off', + '@typescript-eslint/no-namespace': 'off', }, parserOptions: { project: [ @@ -426,6 +433,7 @@ module.exports = { 'react/jsx-no-undef': 'off', 'react-hooks/rules-of-hooks': 'off', '@arthurgeron/react-usememo/require-usememo': 'off', + 'sonar/no-dead-store': 'off', }, }, ], diff --git a/package.json b/package.json index 7b598e63875..0925dd80c83 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.31.11", "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-sonar": "^0.11.1", "eslint-plugin-sonarjs": "^0.17.0", "eslint-plugin-unicorn": "^45.0.1", "execa": "^6.0.0", diff --git a/packages/codemirror-graphql/README.md b/packages/codemirror-graphql/README.md index 6fdfd349c37..ac0ef31d5be 100644 --- a/packages/codemirror-graphql/README.md +++ b/packages/codemirror-graphql/README.md @@ -21,7 +21,7 @@ npm install --save codemirror-graphql CodeMirror helpers install themselves to the global CodeMirror when they are imported. -```js +```ts import type { ValidationContext, SDLValidationContext } from 'graphql'; import CodeMirror from 'codemirror'; @@ -56,7 +56,7 @@ import 'codemirror-graphql/hint'; import 'codemirror-graphql/lint'; import 'codemirror-graphql/mode'; -const externalFragments = ` +const externalFragments = /* GraphQL */ ` fragment MyFragment on Example { id: ID! name: String! @@ -86,7 +86,7 @@ CodeMirror.fromTextArea(myTextarea, { If you want to show custom validation, you can do that too! It uses the `ValidationRule` interface. -```js +```ts import type { ValidationRule } from 'graphql'; import CodeMirror from 'codemirror'; diff --git a/packages/graphql-language-service-server/src/MessageProcessor.ts b/packages/graphql-language-service-server/src/MessageProcessor.ts index c44eb28efce..e2e46fb949e 100644 --- a/packages/graphql-language-service-server/src/MessageProcessor.ts +++ b/packages/graphql-language-service-server/src/MessageProcessor.ts @@ -353,11 +353,6 @@ export class MessageProcessor { await this._updateGraphQLConfig(); return { uri, diagnostics: [] }; } - // update graphql config only when graphql config is saved! - const cachedDocument = this._getCachedDocument(uri); - if (cachedDocument) { - contents = cachedDocument.contents; - } return null; } if (!this._graphQLCache) { diff --git a/packages/monaco-graphql/README.md b/packages/monaco-graphql/README.md index db8f5307e2c..67d39e143df 100644 --- a/packages/monaco-graphql/README.md +++ b/packages/monaco-graphql/README.md @@ -44,7 +44,7 @@ nicely with the official `graphql` language ID. To use with webpack, here is an example to get you started: -```shell +```sh yarn add monaco-graphql ``` @@ -442,7 +442,7 @@ config such as `schemaLoader` to `createData`: ```ts import type { worker as WorkerNamespace } from 'monaco-editor'; -// @ts-ignore +// @ts-expect-error - ignore missing types import * as worker from 'monaco-editor/esm/vs/editor/editor.worker'; import { GraphQLWorker } from 'monaco-graphql/esm/GraphQLWorker'; @@ -472,10 +472,7 @@ import GraphQLWorker from 'worker-loader!./my-graphql.worker'; window.MonacoEnvironment = { getWorker(_workerId: string, label: string) { - if (label === 'graphql') { - return new GraphQLWorker(); - } - return new EditorWorker(); + return label === 'graphql' ? new GraphQLWorker() : new EditorWorker(); }, }; ``` @@ -485,10 +482,7 @@ or, if you have webpack configured for it: ```ts window.MonacoEnvironment = { getWorkerUrl(_workerId: string, label: string) { - if (label === 'graphql') { - return 'my-graphql.worker.js'; - } - return 'editor.worker.js'; + return label === 'graphql' ? 'my-graphql.worker.js' : 'editor.worker.js'; }, }; ``` diff --git a/packages/vscode-graphql-execution/README.md b/packages/vscode-graphql-execution/README.md index 5c00f5d357a..5a0345c25ca 100644 --- a/packages/vscode-graphql-execution/README.md +++ b/packages/vscode-graphql-execution/README.md @@ -13,7 +13,7 @@ inline in your code for: the operation. 2. (If variables are specified in the operation), a dialog will prompt for these variables -3. Then, the results or network error should appear, voila! +3. Then, the results or network error should appear, voilĂ ! 4. If no endpoints are configured, it will exit early and tell you to define them. diff --git a/packages/vscode-graphql-execution/src/extension.ts b/packages/vscode-graphql-execution/src/extension.ts index f2ea4cd3d6e..9a06daea5ff 100644 --- a/packages/vscode-graphql-execution/src/extension.ts +++ b/packages/vscode-graphql-execution/src/extension.ts @@ -13,12 +13,11 @@ import { import { GraphQLContentProvider } from './providers/exec-content'; import { GraphQLCodeLensProvider } from './providers/exec-codelens'; import { ExtractedTemplateLiteral } from './helpers/source'; -// import { CustomInitializationFailedHandler } from "./CustomInitializationFailedHandler" function getConfig() { return workspace.getConfiguration( 'vscode-graphql-execution', - window.activeTextEditor ? window.activeTextEditor.document.uri : null, + window.activeTextEditor?.document.uri, ); } @@ -27,9 +26,8 @@ export function activate(context: ExtensionContext) { 'GraphQL Operation Execution', ); const config = getConfig(); - const { debug } = config; - if (debug) { + if (config.debug) { // eslint-disable-next-line no-console console.log('Extension "vscode-graphql" is now active!'); } @@ -72,7 +70,7 @@ export function activate(context: ExtensionContext) { const commandContentProvider = commands.registerCommand( 'vscode-graphql-execution.contentProvider', - async (literal: ExtractedTemplateLiteral) => { + (literal: ExtractedTemplateLiteral) => { const uri = Uri.parse('graphql://authority/graphql'); const panel = window.createWebviewPanel( @@ -93,9 +91,7 @@ export function activate(context: ExtensionContext) { contentProvider, ); context.subscriptions.push(registration); - - const html = await contentProvider.getCurrentHtml(); - panel.webview.html = html; + panel.webview.html = contentProvider.getCurrentHtml(); }, ); context.subscriptions.push(commandContentProvider); diff --git a/packages/vscode-graphql-execution/src/providers/exec-content.ts b/packages/vscode-graphql-execution/src/providers/exec-content.ts index 4e8421bbf3f..670f70f781d 100644 --- a/packages/vscode-graphql-execution/src/providers/exec-content.ts +++ b/packages/vscode-graphql-execution/src/providers/exec-content.ts @@ -37,10 +37,8 @@ export class GraphQLContentProvider implements TextDocumentContentProvider { timeout = (ms: number) => new Promise(res => setTimeout(res, ms)); - getCurrentHtml(): Promise { - return new Promise(resolve => { - resolve(this.html); - }); + getCurrentHtml(): string { + return this.html; } updatePanel() { @@ -57,11 +55,11 @@ export class GraphQLContentProvider implements TextDocumentContentProvider { this.sourceHelper.getTypeForVariableDefinitionNode(node); variables = { ...variables, - [`${node.variable.name.value}`]: this.sourceHelper.typeCast( + [node.variable.name.value]: this.sourceHelper.typeCast( (await window.showInputBox({ ignoreFocusOut: true, placeHolder: `Please enter the value for ${node.variable.name.value}`, - validateInput: async (value: string) => + validateInput: (value: string) => this.sourceHelper.validate(value, variableType), }))!, variableType, diff --git a/yarn.lock b/yarn.lock index 9fbe70569fe..ddb6539a568 100644 --- a/yarn.lock +++ b/yarn.lock @@ -201,6 +201,15 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/eslint-parser@^7.21.3": + version "7.21.3" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.21.3.tgz#d79e822050f2de65d7f368a076846e7184234af7" + integrity sha512-kfhmPimwo6k4P8zxNs8+T7yR44q1LdpsZdE1NkCsVlfiuTPRfnGgjaF8Qgug9q9Pou17u6wneYF0lDCZJATMFg== + dependencies: + "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" + eslint-visitor-keys "^2.1.0" + semver "^6.3.0" + "@babel/generator@^7.13.9": version "7.13.9" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39" @@ -3250,6 +3259,13 @@ resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ== +"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": + version "5.1.1-v1" + resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" + integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== + dependencies: + eslint-scope "5.1.1" + "@nodelib/fs.scandir@2.1.4": version "2.1.4" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.4.tgz#d4b3549a5db5de2683e0c1071ab4f140904bbf69" @@ -4483,6 +4499,22 @@ dependencies: "@types/node" "*" +"@typescript-eslint/eslint-plugin@^5.57.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz#c0e10eeb936debe5d1c3433cf36206a95befefd0" + integrity sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.59.0" + "@typescript-eslint/type-utils" "5.59.0" + "@typescript-eslint/utils" "5.59.0" + debug "^4.3.4" + grapheme-splitter "^1.0.4" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/eslint-plugin@rc-v6": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.0.0-alpha.99.tgz#e1e8de454e25742ec9567b1e171d72bc07571806" @@ -4518,6 +4550,14 @@ "@typescript-eslint/types" "5.27.0" "@typescript-eslint/visitor-keys" "5.27.0" +"@typescript-eslint/scope-manager@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz#86501d7a17885710b6716a23be2e93fc54a4fe8c" + integrity sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ== + dependencies: + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/visitor-keys" "5.59.0" + "@typescript-eslint/scope-manager@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.0.0-alpha.99.tgz#182641c4c45d28c694a297bd88661097ded143e2" @@ -4526,6 +4566,16 @@ "@typescript-eslint/types" "6.0.0-alpha.99+f84bf4af9" "@typescript-eslint/visitor-keys" "6.0.0-alpha.99+f84bf4af9" +"@typescript-eslint/type-utils@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz#8e8d1420fc2265989fa3a0d897bde37f3851e8c9" + integrity sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA== + dependencies: + "@typescript-eslint/typescript-estree" "5.59.0" + "@typescript-eslint/utils" "5.59.0" + debug "^4.3.4" + tsutils "^3.21.0" + "@typescript-eslint/type-utils@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.0.0-alpha.99.tgz#f641ef290c583f8ae7586f09212b08ec4dd4546d" @@ -4541,6 +4591,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.27.0.tgz#c3f44b9dda6177a9554f94a74745ca495ba9c001" integrity sha512-lY6C7oGm9a/GWhmUDOs3xAVRz4ty/XKlQ2fOLr8GAIryGn0+UBOoJDWyHer3UgrHkenorwvBnphhP+zPmzmw0A== +"@typescript-eslint/types@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32" + integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA== + "@typescript-eslint/types@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.0.0-alpha.99.tgz#bdc3ab6600f169aef2f0f978d5731d9ffc7aa580" @@ -4559,6 +4614,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz#8869156ee1dcfc5a95be3ed0e2809969ea28e965" + integrity sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg== + dependencies: + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/visitor-keys" "5.59.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/typescript-estree@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.0.0-alpha.99.tgz#1542c2b0342e5c97b1cd682c6fdbc3499011016a" @@ -4572,6 +4640,20 @@ semver "^7.3.7" ts-api-utils "^0.0.39" +"@typescript-eslint/utils@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.0.tgz#063d066b3bc4850c18872649ed0da9ee72d833d5" + integrity sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@types/json-schema" "^7.0.9" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.59.0" + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/typescript-estree" "5.59.0" + eslint-scope "^5.1.1" + semver "^7.3.7" + "@typescript-eslint/utils@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.0.0-alpha.99.tgz#3c245b694d28b383032c4f54042b86bd3b25f1ac" @@ -4606,6 +4688,14 @@ "@typescript-eslint/types" "5.27.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz#a59913f2bf0baeb61b5cfcb6135d3926c3854365" + integrity sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA== + dependencies: + "@typescript-eslint/types" "5.59.0" + eslint-visitor-keys "^3.3.0" + "@typescript-eslint/visitor-keys@6.0.0-alpha.99+f84bf4af9": version "6.0.0-alpha.99" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.0.0-alpha.99.tgz#16a04d93e62fad7ccf6415e456644e4f3ae1f109" @@ -5877,7 +5967,7 @@ bytes@3.1.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== -bytes@3.1.2: +bytes@3.1.2, bytes@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== @@ -8356,11 +8446,54 @@ eslint-plugin-react@^7.31.11: semver "^6.3.0" string.prototype.matchall "^4.0.8" +eslint-plugin-react@^7.32.2: + version "7.32.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz#e71f21c7c265ebce01bcbc9d0955170c55571f10" + integrity sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg== + dependencies: + array-includes "^3.1.6" + array.prototype.flatmap "^1.3.1" + array.prototype.tosorted "^1.1.1" + doctrine "^2.1.0" + estraverse "^5.3.0" + jsx-ast-utils "^2.4.1 || ^3.0.0" + minimatch "^3.1.2" + object.entries "^1.1.6" + object.fromentries "^2.0.6" + object.hasown "^1.1.2" + object.values "^1.1.6" + prop-types "^15.8.1" + resolve "^2.0.0-next.4" + semver "^6.3.0" + string.prototype.matchall "^4.0.8" + +eslint-plugin-sonar@^0.11.1: + version "0.11.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-sonar/-/eslint-plugin-sonar-0.11.1.tgz#0f9fc7d6ea4dbe1a1f8fc441a2f5122edd96541f" + integrity sha512-KBBmC9ifQHHbHElMRVECURrbUvVd15F7kzujKoKNqQyZoxgnQFym0Wzzgd/kbsGgO4yKAjqIJksR8pwwb6B0rg== + dependencies: + "@babel/eslint-parser" "^7.21.3" + "@typescript-eslint/eslint-plugin" "^5.57.0" + builtin-modules "^3.3.0" + bytes "^3.1.2" + eslint-plugin-react "^7.32.2" + eslint-plugin-react-hooks "^4.6.0" + eslint-plugin-sonarjs "^0.19.0" + functional-red-black-tree "^1.0.1" + regexpp "^3.2.0" + scslre "^0.1.6" + tmp "^0.2.1" + eslint-plugin-sonarjs@^0.17.0: version "0.17.0" resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.17.0.tgz#e026065809e35d286f576ddea094727eeb9cdadd" integrity sha512-jtGtxI49UbJJeJj7CVRLI3+LLH+y+hkR3GOOwM7vBbci9DEFIRGCWvEd2BJScrzltZ6D6iubukTAfc9cyG7sdw== +eslint-plugin-sonarjs@^0.19.0: + version "0.19.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-0.19.0.tgz#6654bc1c6d24c2183891b8bfe1175004dbba1e3c" + integrity sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw== + eslint-plugin-unicorn@^45.0.1: version "45.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-45.0.1.tgz#2307f4620502fd955c819733ce1276bed705b736" @@ -8411,6 +8544,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint-visitor-keys@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + eslint-visitor-keys@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" @@ -9428,6 +9566,11 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== + functions-have-names@^1.2.2: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -14953,6 +15096,13 @@ redent@^3.0.0: indent-string "^4.0.0" strip-indent "^3.0.0" +refa@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/refa/-/refa-0.9.1.tgz#12731fce378d235731b1f73182b20083c8a75ca8" + integrity sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA== + dependencies: + regexpp "^3.2.0" + regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" @@ -15006,6 +15156,14 @@ regex-cache@^0.4.2: dependencies: is-equal-shallow "^0.1.3" +regexp-ast-analysis@^0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.2.4.tgz#a497a7c8bfbba51438693821e4b0e3ed43e20f1b" + integrity sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg== + dependencies: + refa "^0.9.0" + regexpp "^3.2.0" + regexp-tree@^0.1.24, regexp-tree@~0.1.1: version "0.1.24" resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.24.tgz#3d6fa238450a4d66e5bc9c4c14bb720e2196829d" @@ -15271,6 +15429,15 @@ resolve@^2.0.0-next.3: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^2.0.0-next.4: + version "2.0.0-next.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -15503,6 +15670,15 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" +scslre@^0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/scslre/-/scslre-0.1.6.tgz#71a2832e4bf3a9254973a04fbed90aec94f75757" + integrity sha512-JORxVRlQTfjvlOAaiQKebgFElyAm5/W8b50lgaZ0OkEnKnagJW2ufDh3xRfU75UD9z3FGIu1gL1IyR3Poa6Qmw== + dependencies: + refa "^0.9.0" + regexp-ast-analysis "^0.2.3" + regexpp "^3.2.0" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"