From 0be445e22d39a5cb584bb1ccd1d8d48517409330 Mon Sep 17 00:00:00 2001 From: Santosh Shinde Date: Thu, 20 Jun 2024 21:49:25 +0530 Subject: [PATCH] Added eslint config for hadling import sort --- .gitignore | 2 +- .yarn/sdks/eslint/bin/eslint.js | 20 -- .yarn/sdks/eslint/lib/api.js | 20 -- .yarn/sdks/eslint/lib/unsupported-api.js | 20 -- .yarn/sdks/eslint/package.json | 14 -- .yarn/sdks/integrations.yml | 5 - .yarn/sdks/prettier/bin/prettier.cjs | 20 -- .yarn/sdks/prettier/index.cjs | 20 -- .yarn/sdks/prettier/package.json | 7 - .yarn/sdks/typescript/bin/tsc | 20 -- .yarn/sdks/typescript/bin/tsserver | 20 -- .yarn/sdks/typescript/lib/tsc.js | 20 -- .yarn/sdks/typescript/lib/tsserver.js | 232 ------------------- .yarn/sdks/typescript/lib/tsserverlibrary.js | 232 ------------------- .yarn/sdks/typescript/lib/typescript.js | 20 -- .yarn/sdks/typescript/package.json | 10 - eslint.config.mjs | 43 ++-- package.json | 5 +- script/build.mjs | 19 +- script/common/config.mjs | 3 +- script/common/file.mjs | 4 +- script/plugin/env-plugin.mjs | 4 +- script/plugin/meta-plugin.mjs | 1 + script/serve.mjs | 3 +- src/App.test.tsx | 3 +- src/App.tsx | 6 +- src/index.tsx | 4 +- wiki/faq.md | 5 +- yarn.lock | 139 ++++++----- 29 files changed, 140 insertions(+), 781 deletions(-) delete mode 100755 .yarn/sdks/eslint/bin/eslint.js delete mode 100644 .yarn/sdks/eslint/lib/api.js delete mode 100644 .yarn/sdks/eslint/lib/unsupported-api.js delete mode 100644 .yarn/sdks/eslint/package.json delete mode 100644 .yarn/sdks/integrations.yml delete mode 100755 .yarn/sdks/prettier/bin/prettier.cjs delete mode 100644 .yarn/sdks/prettier/index.cjs delete mode 100644 .yarn/sdks/prettier/package.json delete mode 100755 .yarn/sdks/typescript/bin/tsc delete mode 100755 .yarn/sdks/typescript/bin/tsserver delete mode 100644 .yarn/sdks/typescript/lib/tsc.js delete mode 100644 .yarn/sdks/typescript/lib/tsserver.js delete mode 100644 .yarn/sdks/typescript/lib/tsserverlibrary.js delete mode 100644 .yarn/sdks/typescript/lib/typescript.js delete mode 100644 .yarn/sdks/typescript/package.json diff --git a/.gitignore b/.gitignore index d3f855e..df48c23 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ !.yarn/releases !.yarn/sdks !.yarn/versions - +.yarn .env.* # Swap the comments on the following lines if you wish to use zero-installs diff --git a/.yarn/sdks/eslint/bin/eslint.js b/.yarn/sdks/eslint/bin/eslint.js deleted file mode 100755 index 9ef98e4..0000000 --- a/.yarn/sdks/eslint/bin/eslint.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint/bin/eslint.js - require(absPnpApiPath).setup(); - } -} - -// Defer to the real eslint/bin/eslint.js your application uses -module.exports = absRequire(`eslint/bin/eslint.js`); diff --git a/.yarn/sdks/eslint/lib/api.js b/.yarn/sdks/eslint/lib/api.js deleted file mode 100644 index 653b22b..0000000 --- a/.yarn/sdks/eslint/lib/api.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint - require(absPnpApiPath).setup(); - } -} - -// Defer to the real eslint your application uses -module.exports = absRequire(`eslint`); diff --git a/.yarn/sdks/eslint/lib/unsupported-api.js b/.yarn/sdks/eslint/lib/unsupported-api.js deleted file mode 100644 index 30fdf15..0000000 --- a/.yarn/sdks/eslint/lib/unsupported-api.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require eslint/use-at-your-own-risk - require(absPnpApiPath).setup(); - } -} - -// Defer to the real eslint/use-at-your-own-risk your application uses -module.exports = absRequire(`eslint/use-at-your-own-risk`); diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json deleted file mode 100644 index 2930eec..0000000 --- a/.yarn/sdks/eslint/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "eslint", - "version": "9.4.0-sdk", - "main": "./lib/api.js", - "type": "commonjs", - "bin": { - "eslint": "./bin/eslint.js" - }, - "exports": { - "./package.json": "./package.json", - ".": "./lib/api.js", - "./use-at-your-own-risk": "./lib/unsupported-api.js" - } -} diff --git a/.yarn/sdks/integrations.yml b/.yarn/sdks/integrations.yml deleted file mode 100644 index aa9d0d0..0000000 --- a/.yarn/sdks/integrations.yml +++ /dev/null @@ -1,5 +0,0 @@ -# This file is automatically generated by @yarnpkg/sdks. -# Manual changes might be lost! - -integrations: - - vscode diff --git a/.yarn/sdks/prettier/bin/prettier.cjs b/.yarn/sdks/prettier/bin/prettier.cjs deleted file mode 100755 index 5efad68..0000000 --- a/.yarn/sdks/prettier/bin/prettier.cjs +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier/bin/prettier.cjs - require(absPnpApiPath).setup(); - } -} - -// Defer to the real prettier/bin/prettier.cjs your application uses -module.exports = absRequire(`prettier/bin/prettier.cjs`); diff --git a/.yarn/sdks/prettier/index.cjs b/.yarn/sdks/prettier/index.cjs deleted file mode 100644 index 8758e36..0000000 --- a/.yarn/sdks/prettier/index.cjs +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier - require(absPnpApiPath).setup(); - } -} - -// Defer to the real prettier your application uses -module.exports = absRequire(`prettier`); diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json deleted file mode 100644 index 46ed7a2..0000000 --- a/.yarn/sdks/prettier/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "prettier", - "version": "3.3.1-sdk", - "main": "./index.cjs", - "type": "commonjs", - "bin": "./bin/prettier.cjs" -} diff --git a/.yarn/sdks/typescript/bin/tsc b/.yarn/sdks/typescript/bin/tsc deleted file mode 100755 index 454b950..0000000 --- a/.yarn/sdks/typescript/bin/tsc +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/bin/tsc - require(absPnpApiPath).setup(); - } -} - -// Defer to the real typescript/bin/tsc your application uses -module.exports = absRequire(`typescript/bin/tsc`); diff --git a/.yarn/sdks/typescript/bin/tsserver b/.yarn/sdks/typescript/bin/tsserver deleted file mode 100755 index d7a6056..0000000 --- a/.yarn/sdks/typescript/bin/tsserver +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/bin/tsserver - require(absPnpApiPath).setup(); - } -} - -// Defer to the real typescript/bin/tsserver your application uses -module.exports = absRequire(`typescript/bin/tsserver`); diff --git a/.yarn/sdks/typescript/lib/tsc.js b/.yarn/sdks/typescript/lib/tsc.js deleted file mode 100644 index 2f62fc9..0000000 --- a/.yarn/sdks/typescript/lib/tsc.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/lib/tsc.js - require(absPnpApiPath).setup(); - } -} - -// Defer to the real typescript/lib/tsc.js your application uses -module.exports = absRequire(`typescript/lib/tsc.js`); diff --git a/.yarn/sdks/typescript/lib/tsserver.js b/.yarn/sdks/typescript/lib/tsserver.js deleted file mode 100644 index ed80075..0000000 --- a/.yarn/sdks/typescript/lib/tsserver.js +++ /dev/null @@ -1,232 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/lib/tsserver.js - require(absPnpApiPath).setup(); - } -} - -const moduleWrapper = tsserver => { - if (!process.versions.pnp) { - return tsserver; - } - - const {isAbsolute} = require(`path`); - const pnpApi = require(`pnpapi`); - - const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//); - const isPortal = str => str.startsWith("portal:/"); - const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`); - - const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => { - return `${locator.name}@${locator.reference}`; - })); - - // VSCode sends the zip paths to TS using the "zip://" prefix, that TS - // doesn't understand. This layer makes sure to remove the protocol - // before forwarding it to TS, and to add it back on all returned paths. - - function toEditorPath(str) { - // We add the `zip:` prefix to both `.zip/` paths and virtual paths - if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) { - // We also take the opportunity to turn virtual paths into physical ones; - // this makes it much easier to work with workspaces that list peer - // dependencies, since otherwise Ctrl+Click would bring us to the virtual - // file instances instead of the real ones. - // - // We only do this to modules owned by the the dependency tree roots. - // This avoids breaking the resolution when jumping inside a vendor - // with peer dep (otherwise jumping into react-dom would show resolution - // errors on react). - // - const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str; - if (resolved) { - const locator = pnpApi.findPackageLocator(resolved); - if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) { - str = resolved; - } - } - - str = normalize(str); - - if (str.match(/\.zip\//)) { - switch (hostInfo) { - // Absolute VSCode `Uri.fsPath`s need to start with a slash. - // VSCode only adds it automatically for supported schemes, - // so we have to do it manually for the `zip` scheme. - // The path needs to start with a caret otherwise VSCode doesn't handle the protocol - // - // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910 - // - // 2021-10-08: VSCode changed the format in 1.61. - // Before | ^zip:/c:/foo/bar.zip/package.json - // After | ^/zip//c:/foo/bar.zip/package.json - // - // 2022-04-06: VSCode changed the format in 1.66. - // Before | ^/zip//c:/foo/bar.zip/package.json - // After | ^/zip/c:/foo/bar.zip/package.json - // - // 2022-05-06: VSCode changed the format in 1.68 - // Before | ^/zip/c:/foo/bar.zip/package.json - // After | ^/zip//c:/foo/bar.zip/package.json - // - case `vscode <1.61`: { - str = `^zip:${str}`; - } break; - - case `vscode <1.66`: { - str = `^/zip/${str}`; - } break; - - case `vscode <1.68`: { - str = `^/zip${str}`; - } break; - - case `vscode`: { - str = `^/zip/${str}`; - } break; - - // To make "go to definition" work, - // We have to resolve the actual file system path from virtual path - // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip) - case `coc-nvim`: { - str = normalize(resolved).replace(/\.zip\//, `.zip::`); - str = resolve(`zipfile:${str}`); - } break; - - // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server) - // We have to resolve the actual file system path from virtual path, - // everything else is up to neovim - case `neovim`: { - str = normalize(resolved).replace(/\.zip\//, `.zip::`); - str = `zipfile://${str}`; - } break; - - default: { - str = `zip:${str}`; - } break; - } - } else { - str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`); - } - } - - return str; - } - - function fromEditorPath(str) { - switch (hostInfo) { - case `coc-nvim`: { - str = str.replace(/\.zip::/, `.zip/`); - // The path for coc-nvim is in format of //zipfile://.yarn/... - // So in order to convert it back, we use .* to match all the thing - // before `zipfile:` - return process.platform === `win32` - ? str.replace(/^.*zipfile:\//, ``) - : str.replace(/^.*zipfile:/, ``); - } break; - - case `neovim`: { - str = str.replace(/\.zip::/, `.zip/`); - // The path for neovim is in format of zipfile:////.yarn/... - return str.replace(/^zipfile:\/\//, ``); - } break; - - case `vscode`: - default: { - return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`) - } break; - } - } - - // Force enable 'allowLocalPluginLoads' - // TypeScript tries to resolve plugins using a path relative to itself - // which doesn't work when using the global cache - // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238 - // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but - // TypeScript already does local loads and if this code is running the user trusts the workspace - // https://github.com/microsoft/vscode/issues/45856 - const ConfiguredProject = tsserver.server.ConfiguredProject; - const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype; - ConfiguredProject.prototype.enablePluginsWithOptions = function() { - this.projectService.allowLocalPluginLoads = true; - return originalEnablePluginsWithOptions.apply(this, arguments); - }; - - // And here is the point where we hijack the VSCode <-> TS communications - // by adding ourselves in the middle. We locate everything that looks - // like an absolute path of ours and normalize it. - - const Session = tsserver.server.Session; - const {onMessage: originalOnMessage, send: originalSend} = Session.prototype; - let hostInfo = `unknown`; - - Object.assign(Session.prototype, { - onMessage(/** @type {string | object} */ message) { - const isStringMessage = typeof message === 'string'; - const parsedMessage = isStringMessage ? JSON.parse(message) : message; - - if ( - parsedMessage != null && - typeof parsedMessage === `object` && - parsedMessage.arguments && - typeof parsedMessage.arguments.hostInfo === `string` - ) { - hostInfo = parsedMessage.arguments.hostInfo; - if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) { - const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match( - // The RegExp from https://semver.org/ but without the caret at the start - /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/ - ) ?? []).map(Number) - - if (major === 1) { - if (minor < 61) { - hostInfo += ` <1.61`; - } else if (minor < 66) { - hostInfo += ` <1.66`; - } else if (minor < 68) { - hostInfo += ` <1.68`; - } - } - } - } - - const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => { - return typeof value === 'string' ? fromEditorPath(value) : value; - }); - - return originalOnMessage.call( - this, - isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON) - ); - }, - - send(/** @type {any} */ msg) { - return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => { - return typeof value === `string` ? toEditorPath(value) : value; - }))); - } - }); - - return tsserver; -}; - -const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10)); -// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well. -// Ref https://github.com/microsoft/TypeScript/pull/55326 -if (major > 5 || (major === 5 && minor >= 5)) { - moduleWrapper(absRequire(`typescript`)); -} - -// Defer to the real typescript/lib/tsserver.js your application uses -module.exports = moduleWrapper(absRequire(`typescript/lib/tsserver.js`)); diff --git a/.yarn/sdks/typescript/lib/tsserverlibrary.js b/.yarn/sdks/typescript/lib/tsserverlibrary.js deleted file mode 100644 index 4d99766..0000000 --- a/.yarn/sdks/typescript/lib/tsserverlibrary.js +++ /dev/null @@ -1,232 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/lib/tsserverlibrary.js - require(absPnpApiPath).setup(); - } -} - -const moduleWrapper = tsserver => { - if (!process.versions.pnp) { - return tsserver; - } - - const {isAbsolute} = require(`path`); - const pnpApi = require(`pnpapi`); - - const isVirtual = str => str.match(/\/(\$\$virtual|__virtual__)\//); - const isPortal = str => str.startsWith("portal:/"); - const normalize = str => str.replace(/\\/g, `/`).replace(/^\/?/, `/`); - - const dependencyTreeRoots = new Set(pnpApi.getDependencyTreeRoots().map(locator => { - return `${locator.name}@${locator.reference}`; - })); - - // VSCode sends the zip paths to TS using the "zip://" prefix, that TS - // doesn't understand. This layer makes sure to remove the protocol - // before forwarding it to TS, and to add it back on all returned paths. - - function toEditorPath(str) { - // We add the `zip:` prefix to both `.zip/` paths and virtual paths - if (isAbsolute(str) && !str.match(/^\^?(zip:|\/zip\/)/) && (str.match(/\.zip\//) || isVirtual(str))) { - // We also take the opportunity to turn virtual paths into physical ones; - // this makes it much easier to work with workspaces that list peer - // dependencies, since otherwise Ctrl+Click would bring us to the virtual - // file instances instead of the real ones. - // - // We only do this to modules owned by the the dependency tree roots. - // This avoids breaking the resolution when jumping inside a vendor - // with peer dep (otherwise jumping into react-dom would show resolution - // errors on react). - // - const resolved = isVirtual(str) ? pnpApi.resolveVirtual(str) : str; - if (resolved) { - const locator = pnpApi.findPackageLocator(resolved); - if (locator && (dependencyTreeRoots.has(`${locator.name}@${locator.reference}`) || isPortal(locator.reference))) { - str = resolved; - } - } - - str = normalize(str); - - if (str.match(/\.zip\//)) { - switch (hostInfo) { - // Absolute VSCode `Uri.fsPath`s need to start with a slash. - // VSCode only adds it automatically for supported schemes, - // so we have to do it manually for the `zip` scheme. - // The path needs to start with a caret otherwise VSCode doesn't handle the protocol - // - // Ref: https://github.com/microsoft/vscode/issues/105014#issuecomment-686760910 - // - // 2021-10-08: VSCode changed the format in 1.61. - // Before | ^zip:/c:/foo/bar.zip/package.json - // After | ^/zip//c:/foo/bar.zip/package.json - // - // 2022-04-06: VSCode changed the format in 1.66. - // Before | ^/zip//c:/foo/bar.zip/package.json - // After | ^/zip/c:/foo/bar.zip/package.json - // - // 2022-05-06: VSCode changed the format in 1.68 - // Before | ^/zip/c:/foo/bar.zip/package.json - // After | ^/zip//c:/foo/bar.zip/package.json - // - case `vscode <1.61`: { - str = `^zip:${str}`; - } break; - - case `vscode <1.66`: { - str = `^/zip/${str}`; - } break; - - case `vscode <1.68`: { - str = `^/zip${str}`; - } break; - - case `vscode`: { - str = `^/zip/${str}`; - } break; - - // To make "go to definition" work, - // We have to resolve the actual file system path from virtual path - // and convert scheme to supported by [vim-rzip](https://github.com/lbrayner/vim-rzip) - case `coc-nvim`: { - str = normalize(resolved).replace(/\.zip\//, `.zip::`); - str = resolve(`zipfile:${str}`); - } break; - - // Support neovim native LSP and [typescript-language-server](https://github.com/theia-ide/typescript-language-server) - // We have to resolve the actual file system path from virtual path, - // everything else is up to neovim - case `neovim`: { - str = normalize(resolved).replace(/\.zip\//, `.zip::`); - str = `zipfile://${str}`; - } break; - - default: { - str = `zip:${str}`; - } break; - } - } else { - str = str.replace(/^\/?/, process.platform === `win32` ? `` : `/`); - } - } - - return str; - } - - function fromEditorPath(str) { - switch (hostInfo) { - case `coc-nvim`: { - str = str.replace(/\.zip::/, `.zip/`); - // The path for coc-nvim is in format of //zipfile://.yarn/... - // So in order to convert it back, we use .* to match all the thing - // before `zipfile:` - return process.platform === `win32` - ? str.replace(/^.*zipfile:\//, ``) - : str.replace(/^.*zipfile:/, ``); - } break; - - case `neovim`: { - str = str.replace(/\.zip::/, `.zip/`); - // The path for neovim is in format of zipfile:////.yarn/... - return str.replace(/^zipfile:\/\//, ``); - } break; - - case `vscode`: - default: { - return str.replace(/^\^?(zip:|\/zip(\/ts-nul-authority)?)\/+/, process.platform === `win32` ? `` : `/`) - } break; - } - } - - // Force enable 'allowLocalPluginLoads' - // TypeScript tries to resolve plugins using a path relative to itself - // which doesn't work when using the global cache - // https://github.com/microsoft/TypeScript/blob/1b57a0395e0bff191581c9606aab92832001de62/src/server/project.ts#L2238 - // VSCode doesn't want to enable 'allowLocalPluginLoads' due to security concerns but - // TypeScript already does local loads and if this code is running the user trusts the workspace - // https://github.com/microsoft/vscode/issues/45856 - const ConfiguredProject = tsserver.server.ConfiguredProject; - const {enablePluginsWithOptions: originalEnablePluginsWithOptions} = ConfiguredProject.prototype; - ConfiguredProject.prototype.enablePluginsWithOptions = function() { - this.projectService.allowLocalPluginLoads = true; - return originalEnablePluginsWithOptions.apply(this, arguments); - }; - - // And here is the point where we hijack the VSCode <-> TS communications - // by adding ourselves in the middle. We locate everything that looks - // like an absolute path of ours and normalize it. - - const Session = tsserver.server.Session; - const {onMessage: originalOnMessage, send: originalSend} = Session.prototype; - let hostInfo = `unknown`; - - Object.assign(Session.prototype, { - onMessage(/** @type {string | object} */ message) { - const isStringMessage = typeof message === 'string'; - const parsedMessage = isStringMessage ? JSON.parse(message) : message; - - if ( - parsedMessage != null && - typeof parsedMessage === `object` && - parsedMessage.arguments && - typeof parsedMessage.arguments.hostInfo === `string` - ) { - hostInfo = parsedMessage.arguments.hostInfo; - if (hostInfo === `vscode` && process.env.VSCODE_IPC_HOOK) { - const [, major, minor] = (process.env.VSCODE_IPC_HOOK.match( - // The RegExp from https://semver.org/ but without the caret at the start - /(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/ - ) ?? []).map(Number) - - if (major === 1) { - if (minor < 61) { - hostInfo += ` <1.61`; - } else if (minor < 66) { - hostInfo += ` <1.66`; - } else if (minor < 68) { - hostInfo += ` <1.68`; - } - } - } - } - - const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => { - return typeof value === 'string' ? fromEditorPath(value) : value; - }); - - return originalOnMessage.call( - this, - isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON) - ); - }, - - send(/** @type {any} */ msg) { - return originalSend.call(this, JSON.parse(JSON.stringify(msg, (key, value) => { - return typeof value === `string` ? toEditorPath(value) : value; - }))); - } - }); - - return tsserver; -}; - -const [major, minor] = absRequire(`typescript/package.json`).version.split(`.`, 2).map(value => parseInt(value, 10)); -// In TypeScript@>=5.5 the tsserver uses the public TypeScript API so that needs to be patched as well. -// Ref https://github.com/microsoft/TypeScript/pull/55326 -if (major > 5 || (major === 5 && minor >= 5)) { - moduleWrapper(absRequire(`typescript`)); -} - -// Defer to the real typescript/lib/tsserverlibrary.js your application uses -module.exports = moduleWrapper(absRequire(`typescript/lib/tsserverlibrary.js`)); diff --git a/.yarn/sdks/typescript/lib/typescript.js b/.yarn/sdks/typescript/lib/typescript.js deleted file mode 100644 index b5f4db2..0000000 --- a/.yarn/sdks/typescript/lib/typescript.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require typescript - require(absPnpApiPath).setup(); - } -} - -// Defer to the real typescript your application uses -module.exports = absRequire(`typescript`); diff --git a/.yarn/sdks/typescript/package.json b/.yarn/sdks/typescript/package.json deleted file mode 100644 index 9f487d3..0000000 --- a/.yarn/sdks/typescript/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "typescript", - "version": "5.4.5-sdk", - "main": "./lib/typescript.js", - "type": "commonjs", - "bin": { - "tsc": "./bin/tsc", - "tsserver": "./bin/tsserver" - } -} diff --git a/eslint.config.mjs b/eslint.config.mjs index 4435619..fd4f466 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,25 +1,10 @@ import eslint from "@eslint/js"; -import tseslint from "typescript-eslint"; import prettierConfig from "eslint-config-prettier"; +import simpleImportSort from "eslint-plugin-simple-import-sort"; import globals from "globals"; +import tseslint from "typescript-eslint"; export default tseslint.config( - { - // config with just ignores is the replacement for `.eslintignore` - ignores: [ - ".pnp.cjs", - ".yarn", - "**/.yarn/**", - ".node_modules", - "dist", - "**/dist/**", - "**/build/**", - "**/dist/**", - "coverage", - "docker", - ] - }, - { languageOptions: { globals: { @@ -38,5 +23,27 @@ export default tseslint.config( ...tseslint.configs.strict, // stylistic: additional rules that enforce consistent styling without significantly catching bugs or changing logic. - ...tseslint.configs.stylistic + ...tseslint.configs.stylistic, + + { + ignores: [ + 'node_modules', + '*.d.ts', + ".pnp.cjs", + ".yarn/*", + ".node_modules", + "dist/*", + "coverage", + "docker", + ] + }, + { + plugins: { + "simple-import-sort": simpleImportSort, + }, + rules: { + "simple-import-sort/imports": "error", + "simple-import-sort/exports": "error", + }, + } ); diff --git a/package.json b/package.json index 35be37b..b8fc8af 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@testing-library/user-event": "^14.5.2", "@types/eslint__js": "^8.42.3", "@types/jest": "^29.5.12", - "@types/node": "^20.14.2", + "@types/node": "^20.14.6", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@yarnpkg/esbuild-plugin-pnp": "^3.0.0-rc.15", @@ -38,6 +38,7 @@ "esbuild-plugin-svgr": "^2.1.0", "eslint": "^9.5.0", "eslint-config-prettier": "^9.1.0", + "eslint-plugin-simple-import-sort": "^12.1.0", "globals": "^15.6.0", "husky": "^9.0.11", "jest": "^29.7.0", @@ -47,6 +48,6 @@ "ts-jest": "^29.1.5", "ts-node": "^10.9.2", "typescript": "^5.4.5", - "typescript-eslint": "^7.13.0" + "typescript-eslint": "^7.13.1" } } diff --git a/script/build.mjs b/script/build.mjs index 39c90db..91d945e 100644 --- a/script/build.mjs +++ b/script/build.mjs @@ -1,17 +1,18 @@ import * as esbuild from "esbuild"; + +import { analyze } from "./common/args.mjs"; import { - updateIndexHtml, - deleteFolder, - copyFolder, - createDirectoryIfNotExist, -} from "./common/file.mjs"; -import { - sharedEsbuildConfig, + analyzerdir, outdir, publicdir, - analyzerdir, + sharedEsbuildConfig, } from "./common/config.mjs"; -import { analyze } from "./common/args.mjs"; +import { + copyFolder, + createDirectoryIfNotExist, + deleteFolder, + updateIndexHtml, +} from "./common/file.mjs"; import { metaPlugin } from "./plugin/meta-plugin.mjs"; const esbuildConfig = { diff --git a/script/common/config.mjs b/script/common/config.mjs index 80dac45..668bc2a 100644 --- a/script/common/config.mjs +++ b/script/common/config.mjs @@ -1,5 +1,6 @@ import { pnpPlugin } from "@yarnpkg/esbuild-plugin-pnp"; import svgPlugin from "esbuild-plugin-svgr"; + import envPlugin from "../plugin/env-plugin.mjs"; const outdir = "./dist"; @@ -46,4 +47,4 @@ const sharedEsbuildConfig = { plugins: [envPlugin({}), pnpPlugin(), svgPlugin()], }; -export { sharedEsbuildConfig, outdir, publicdir, analyzerdir }; +export { analyzerdir, outdir, publicdir, sharedEsbuildConfig }; diff --git a/script/common/file.mjs b/script/common/file.mjs index 742a878..4957a84 100644 --- a/script/common/file.mjs +++ b/script/common/file.mjs @@ -1,7 +1,7 @@ import { - promises as fs, existsSync, mkdirSync, + promises as fs, readFileSync, writeFileSync, } from "fs"; @@ -78,4 +78,4 @@ function createDirectoryIfNotExist(directoryPath) { } } -export { copyFolder, deleteFolder, updateIndexHtml, createDirectoryIfNotExist }; +export { copyFolder, createDirectoryIfNotExist, deleteFolder, updateIndexHtml }; diff --git a/script/plugin/env-plugin.mjs b/script/plugin/env-plugin.mjs index f9f2071..1f4c47e 100644 --- a/script/plugin/env-plugin.mjs +++ b/script/plugin/env-plugin.mjs @@ -1,6 +1,6 @@ -import { promises as fs, existsSync } from "fs"; -import path from "path"; import { parse } from "dotenv"; +import { existsSync, promises as fs } from "fs"; +import path from "path"; const envPlugin = (inputs = {}) => { const options = { diff --git a/script/plugin/meta-plugin.mjs b/script/plugin/meta-plugin.mjs index 950c334..687716d 100644 --- a/script/plugin/meta-plugin.mjs +++ b/script/plugin/meta-plugin.mjs @@ -1,4 +1,5 @@ import { writeFile } from "fs/promises"; + import { analyzerdir } from "../common/config.mjs"; // Custom plugin to generate meta file diff --git a/script/serve.mjs b/script/serve.mjs index 4c5d55a..eabf665 100644 --- a/script/serve.mjs +++ b/script/serve.mjs @@ -1,6 +1,7 @@ import esbuild from "esbuild"; + +import { outdir, publicdir, sharedEsbuildConfig } from "./common/config.mjs"; import { copyFolder } from "./common/file.mjs"; -import { sharedEsbuildConfig, outdir, publicdir } from "./common/config.mjs"; const esbuildConfig = { ...sharedEsbuildConfig, diff --git a/src/App.test.tsx b/src/App.test.tsx index d76787e..1947135 100644 --- a/src/App.test.tsx +++ b/src/App.test.tsx @@ -1,5 +1,6 @@ -import React from "react"; import { render, screen } from "@testing-library/react"; +import React from "react"; + import App from "./App"; test("renders learn react link", () => { diff --git a/src/App.tsx b/src/App.tsx index 4a93b22..6094593 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,9 @@ -import React from "react"; -import logo from "./logo.svg"; import "./App.css"; + +import React from "react"; + import { env } from "./config"; +import logo from "./logo.svg"; function App() { return ( diff --git a/src/index.tsx b/src/index.tsx index e36f828..e7506a3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,8 @@ +import "./index.css"; + import React from "react"; import ReactDOM from "react-dom/client"; -import "./index.css"; + import App from "./App"; const root = ReactDOM.createRoot( diff --git a/wiki/faq.md b/wiki/faq.md index a4f6d51..7e52e99 100644 --- a/wiki/faq.md +++ b/wiki/faq.md @@ -33,4 +33,7 @@ ``` - That is because the typescript eslint version is not supporting the eslint 9 version, and they have some breaking changes. You can check this thread for details. After the upgrade, we must update the typescript eslint version. - [ESLint v9 Support](https://github.com/typescript-eslint/typescript-eslint/issues/8211) - - [Eslint 9 doesn't work with typescript?](https://www.reddit.com/r/typescript/comments/1cjbjis/eslint_9_doesnt_work_with_typescript/) \ No newline at end of file + - [Eslint 9 doesn't work with typescript?](https://www.reddit.com/r/typescript/comments/1cjbjis/eslint_9_doesnt_work_with_typescript/) + +- How do you update outdated yarn packages? + - `yarn upgrade-interactive` \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9163566..83dfed0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1445,7 +1445,7 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^20.14.2": +"@types/node@npm:*": version: 20.14.2 resolution: "@types/node@npm:20.14.2" dependencies: @@ -1454,6 +1454,15 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:^20.14.6": + version: 20.14.6 + resolution: "@types/node@npm:20.14.6" + dependencies: + undici-types: "npm:~5.26.4" + checksum: 10c0/22640f0eb2a955872e4529a93be1b719f67b527b80fdab51419756d20e21b5ce0f4ccbee9a3e2ff20e5def647f77baf77b4b0434ff8896791c102165ec0c3e48 + languageName: node + linkType: hard + "@types/prop-types@npm:*": version: 15.7.12 resolution: "@types/prop-types@npm:15.7.12" @@ -1510,15 +1519,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/eslint-plugin@npm:7.13.0" +"@typescript-eslint/eslint-plugin@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/eslint-plugin@npm:7.13.1" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:7.13.0" - "@typescript-eslint/type-utils": "npm:7.13.0" - "@typescript-eslint/utils": "npm:7.13.0" - "@typescript-eslint/visitor-keys": "npm:7.13.0" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/type-utils": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -1529,44 +1538,44 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/00a69d029713252c03490e0a9c49c9136d99c9c1888dd3570b1e044c9a740b59c2e488849beda654d6fc0a69e2549445c16d443bcf5832c66b7a4472b42826ae + checksum: 10c0/6677f9c090a25978e4e20c24d67365ad89ca1208ebd2bb103d3f1e15a7deea22dea538e9f61f3a3d4f03a741179acf58c02ad7d03f805aceabb78929a8dc1908 languageName: node linkType: hard -"@typescript-eslint/parser@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/parser@npm:7.13.0" +"@typescript-eslint/parser@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/parser@npm:7.13.1" dependencies: - "@typescript-eslint/scope-manager": "npm:7.13.0" - "@typescript-eslint/types": "npm:7.13.0" - "@typescript-eslint/typescript-estree": "npm:7.13.0" - "@typescript-eslint/visitor-keys": "npm:7.13.0" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/typescript-estree": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/8cf58116d6577c9459db3e3047e337dc41d914bf222a33b20e149515d037e09e6171fbac5af02b66aa6fbad81dd492fa5b7bcd44aaf659d4e9b02ab23100f955 + checksum: 10c0/455d067bfb81fa3d133c75ebc4d8d7f2de5001441585f5b58dc8b0d4380d7397dc3745e11a9299d596dfa581265fdcdea6c28b2ddd2d3b542869c851ecd52fcd languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/scope-manager@npm:7.13.0" +"@typescript-eslint/scope-manager@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/scope-manager@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:7.13.0" - "@typescript-eslint/visitor-keys": "npm:7.13.0" - checksum: 10c0/0f5c75578ee8cb3c31b9c4e222f4787ea4621fde639f3ac0a467e56250f3cc48bf69304c33b2b8cc8ba5ec69f3977b6c463b8d9e791806af9a8c6a2233505432 + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" + checksum: 10c0/3d8770bf9c89e7a07e54efbc3dac6df02c0ce49d49575076111ac663566c90cbb852f06c94a311db7c0aec1fab0417f3ef6e601b3852aa30bed75c65f4f076f4 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/type-utils@npm:7.13.0" +"@typescript-eslint/type-utils@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/type-utils@npm:7.13.1" dependencies: - "@typescript-eslint/typescript-estree": "npm:7.13.0" - "@typescript-eslint/utils": "npm:7.13.0" + "@typescript-eslint/typescript-estree": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependencies: @@ -1574,23 +1583,23 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/240e9b34e8602444cd234b84c9e3e52c565e3141a4942751f597c38cee48f7cb43c42a093d219ac6404dca2e74b54d2a8121fe66cbc59f404cb0ec2adecd8520 + checksum: 10c0/c02305dccb0b2c7dcc9249230078c83e851ee589f93e08eb6cdc0b4c38d78d85ef4996631ac427836ee9d0a868ac031417feb74a6e4d0600096f41ca3c0e99a0 languageName: node linkType: hard -"@typescript-eslint/types@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/types@npm:7.13.0" - checksum: 10c0/73dc59d4b0d0f0fed9f4b9b55f143185259ced5f0ca8ad9efa881eea1ff1cc9ccc1f175af2e2069f7b92a69c9f64f9be29d160c932b8f70a129af6b738b23be0 +"@typescript-eslint/types@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/types@npm:7.13.1" + checksum: 10c0/38a01004e11259e457ae2fd02300ef362a3268a8fc70addfbf1508e2edcaca72da2f0f8771e42c1cb9f191c1f754af583cdcaebd830c8e3c3f796dcf30d3c3a8 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/typescript-estree@npm:7.13.0" +"@typescript-eslint/typescript-estree@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/typescript-estree@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:7.13.0" - "@typescript-eslint/visitor-keys": "npm:7.13.0" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/visitor-keys": "npm:7.13.1" debug: "npm:^4.3.4" globby: "npm:^11.1.0" is-glob: "npm:^4.0.3" @@ -1600,31 +1609,31 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/75b09384bc14afa3d3623507432d19d8ca91c4e936b1d2c1cfe4654a9c07179f1bc04aa99d1b541e84e40a01536862b23058f462d61b4a797c27d02f64b8aa51 + checksum: 10c0/bd5c8951ae79e8eacd05ff100def02926c633045a1a54426f98f20b4ca31c485968af3226dd7939934dfaf36a6b5fcb3386948e2a7d763ddee2db905ac187ebc languageName: node linkType: hard -"@typescript-eslint/utils@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/utils@npm:7.13.0" +"@typescript-eslint/utils@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/utils@npm:7.13.1" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:7.13.0" - "@typescript-eslint/types": "npm:7.13.0" - "@typescript-eslint/typescript-estree": "npm:7.13.0" + "@typescript-eslint/scope-manager": "npm:7.13.1" + "@typescript-eslint/types": "npm:7.13.1" + "@typescript-eslint/typescript-estree": "npm:7.13.1" peerDependencies: eslint: ^8.56.0 - checksum: 10c0/5391f628775dec1a7033d954a066b77eeb03ac04c0a94690e60d8ebe351b57fdbda51b90cf785c901bcdf68b88ca3bcb5533ac59276b8b626b73eb18ac3280b6 + checksum: 10c0/d2f6be42a80608ed265b34a5f6a0c97dc0b627d53b91e83d87c7d67541cb5b3c038e7320026b4ad8dfafe1ac07a0554efa8fe7673f54d74b68c253d6f9519bb6 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:7.13.0": - version: 7.13.0 - resolution: "@typescript-eslint/visitor-keys@npm:7.13.0" +"@typescript-eslint/visitor-keys@npm:7.13.1": + version: 7.13.1 + resolution: "@typescript-eslint/visitor-keys@npm:7.13.1" dependencies: - "@typescript-eslint/types": "npm:7.13.0" + "@typescript-eslint/types": "npm:7.13.1" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/5daa45c3358aeab41495c4419cc26fbbe54a42bb18c6f0f70f0ac31cb7bc5890ec6478a1a6bb00b0b8522663fe5466ee0fd2972bd4235b07140918875797f4eb + checksum: 10c0/23c1bb896173cadfb33e3801420a70aa2f0481384caa3b534b04f7920acdb9d8f7d635fcaf1f8c7fc78ebce71b8f2435391608d120091761ad2e2c00eb870832 languageName: node linkType: hard @@ -2805,6 +2814,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-simple-import-sort@npm:^12.1.0": + version: 12.1.0 + resolution: "eslint-plugin-simple-import-sort@npm:12.1.0" + peerDependencies: + eslint: ">=5.0.0" + checksum: 10c0/11e963683216e190b09bb6834b6978ca71d438d9413c52495e92493b0a68fc10268d7fd5815814496ab02fe7c018e4d5fd82866bf3ed5f95cff69628ca741102 + languageName: node + linkType: hard + "eslint-scope@npm:^8.0.1": version: 8.0.1 resolution: "eslint-scope@npm:8.0.1" @@ -5441,7 +5459,7 @@ __metadata: "@testing-library/user-event": "npm:^14.5.2" "@types/eslint__js": "npm:^8.42.3" "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^20.14.2" + "@types/node": "npm:^20.14.6" "@types/react": "npm:^18.3.3" "@types/react-dom": "npm:^18.3.0" "@yarnpkg/esbuild-plugin-pnp": "npm:^3.0.0-rc.15" @@ -5450,6 +5468,7 @@ __metadata: esbuild-plugin-svgr: "npm:^2.1.0" eslint: "npm:^9.5.0" eslint-config-prettier: "npm:^9.1.0" + eslint-plugin-simple-import-sort: "npm:^12.1.0" globals: "npm:^15.6.0" husky: "npm:^9.0.11" jest: "npm:^29.7.0" @@ -5461,7 +5480,7 @@ __metadata: ts-jest: "npm:^29.1.5" ts-node: "npm:^10.9.2" typescript: "npm:^5.4.5" - typescript-eslint: "npm:^7.13.0" + typescript-eslint: "npm:^7.13.1" languageName: unknown linkType: soft @@ -5828,19 +5847,19 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^7.13.0": - version: 7.13.0 - resolution: "typescript-eslint@npm:7.13.0" +"typescript-eslint@npm:^7.13.1": + version: 7.13.1 + resolution: "typescript-eslint@npm:7.13.1" dependencies: - "@typescript-eslint/eslint-plugin": "npm:7.13.0" - "@typescript-eslint/parser": "npm:7.13.0" - "@typescript-eslint/utils": "npm:7.13.0" + "@typescript-eslint/eslint-plugin": "npm:7.13.1" + "@typescript-eslint/parser": "npm:7.13.1" + "@typescript-eslint/utils": "npm:7.13.1" peerDependencies: eslint: ^8.56.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/ad067868ede764d411f4933285faca0d41c7e3ca439d7aac032ed78db7703e9842f5bbad4344004fa876a3577cda3c56b0716897f94a0d1aec00a90d6c0d3990 + checksum: 10c0/b929e865cdbf2b8b5dd417d40a6af2d76bb87a8ad3879dcde9a0f66b478906247ec3378aa7ab4c0659ddae73ba4bb15167053ff20a552e192f352797e94bee46 languageName: node linkType: hard