mirror of
https://github.com/luxexchange/biome-config.git
synced 2026-10-30 18:13:49 +00:00
3361 lines
150 KiB
JSON
3361 lines
150 KiB
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
|
|
"vcs": {
|
|
"enabled": true,
|
|
"clientKind": "git",
|
|
"useIgnoreFile": true
|
|
},
|
|
"files": {
|
|
"ignoreUnknown": false,
|
|
"includes": [
|
|
"**/*.ts",
|
|
"**/*.tsx",
|
|
"**/*.js",
|
|
"**/*.jsx",
|
|
"**/*.json",
|
|
"**/*.jsonc",
|
|
"!.vscode/settings.json",
|
|
"!.vscode/extensions.json",
|
|
"!tools/lx-nx/src/generators"
|
|
],
|
|
"experimentalScannerIgnores": [
|
|
"*.tsbuildinfo",
|
|
"__generated__/**",
|
|
"__mocks__/**",
|
|
".bun/**",
|
|
".detoxrc.js",
|
|
".gui/**",
|
|
"@types/**",
|
|
"*.graphql",
|
|
"*.html",
|
|
"*.inc",
|
|
"*.json",
|
|
"*.jsonc",
|
|
"*.md",
|
|
"*.yml",
|
|
"craco.config.cjs",
|
|
"jest-setup.js",
|
|
"jest.config.js",
|
|
"metro.config.js",
|
|
"types/**",
|
|
"**/lcov-report/**",
|
|
"**/coverage/**",
|
|
"apps/extension/.storybook/storybook.requires.ts",
|
|
"apps/extension/.maestro/**",
|
|
"apps/extension/dev/**",
|
|
"apps/mobile/.storybook/storybook.requires.ts",
|
|
"apps/mobile/.maestro/**",
|
|
"apps/web/playwright/**",
|
|
"apps/web/cypress/**",
|
|
"apps/web/public/**",
|
|
"apps/web/functions/**",
|
|
"apps/web/vite/**",
|
|
"apps/web/scripts/**",
|
|
"apps/web/twist-configs/**",
|
|
"apps/web/test-results/**",
|
|
"apps/web/**/*.native.*",
|
|
"apps/web/**/*.ios.*",
|
|
"apps/web/**/*.android.*",
|
|
"apps/web/**/*.mts"
|
|
]
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"formatWithErrors": false,
|
|
"indentStyle": "space",
|
|
"indentWidth": 2,
|
|
"lineEnding": "lf",
|
|
"lineWidth": 120,
|
|
"attributePosition": "auto",
|
|
"bracketSameLine": false,
|
|
"bracketSpacing": true,
|
|
"expand": "auto",
|
|
"useEditorconfig": true,
|
|
"includes": [
|
|
"**",
|
|
"!**/*.tsbuildinfo",
|
|
"!**/__generated__",
|
|
"!**/__mocks__",
|
|
"!**/.bun",
|
|
"!**/.detoxrc.js",
|
|
"!**/.gui",
|
|
"!**/@types",
|
|
"!**/*.graphql",
|
|
"!**/*.html",
|
|
"!**/*.inc",
|
|
"!**/*.md",
|
|
"!**/*.yml",
|
|
"!**/craco.config.cjs",
|
|
"!**/jest-setup.js",
|
|
"!**/jest.config.js",
|
|
"!**/metro.config.js",
|
|
"!**/types",
|
|
"!**/lcov-report",
|
|
"!**/coverage",
|
|
"!apps/mobile/ios/**",
|
|
"!apps/mobile/android/**",
|
|
"!apps/mobile/.storybook/storybook.requires.ts",
|
|
"!apps/mobile/**/metro.config.js",
|
|
"!apps/web/playwright/**",
|
|
"!apps/web/cypress/**",
|
|
"!apps/web/public/**",
|
|
"!apps/web/functions/**",
|
|
"!apps/web/scripts/**",
|
|
"!apps/web/twist-configs/**",
|
|
"!apps/web/test-results/**"
|
|
]
|
|
},
|
|
"linter": {
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": false,
|
|
"complexity": {
|
|
"noAdjacentSpacesInRegex": "warn",
|
|
"noArguments": "error",
|
|
"noBannedTypes": "error",
|
|
"noCommaOperator": "warn",
|
|
"noExtraBooleanCast": "warn",
|
|
"noUselessCatch": "error",
|
|
"noUselessEscapeInRegex": "warn",
|
|
"noUselessLoneBlockStatements": "warn",
|
|
"noUselessTypeConstraint": "error",
|
|
"noUselessUndefinedInitialization": "warn",
|
|
"noVoid": "warn",
|
|
"useLiteralKeys": "off"
|
|
},
|
|
"correctness": {
|
|
"noChildrenProp": "error",
|
|
"noEmptyCharacterClassInRegex": "warn",
|
|
"noEmptyPattern": "error",
|
|
"noNonoctalDecimalEscape": "error",
|
|
"noPrecisionLoss": "error",
|
|
"noRestrictedElements": {
|
|
"level": "error",
|
|
"options": {
|
|
"elements": {
|
|
"div": "Please avoid using div when possible, even in web code! Use `Flex` or Fragments (`<>`)"
|
|
}
|
|
}
|
|
},
|
|
"noSelfAssign": "error",
|
|
"noSwitchDeclarations": "error",
|
|
"noUnsafeFinally": "error",
|
|
"noUnsafeOptionalChaining": "error",
|
|
"noUnusedImports": {
|
|
"level": "error",
|
|
"fix": "safe"
|
|
},
|
|
"noUnusedLabels": "error",
|
|
"noUnusedVariables": "error",
|
|
"useExhaustiveDependencies": {
|
|
"level": "error",
|
|
"options": {
|
|
"hooks": [
|
|
{
|
|
"name": "useSharedValue",
|
|
"stableResult": true
|
|
},
|
|
{
|
|
"name": "useDerivedValue",
|
|
"stableResult": true
|
|
},
|
|
{
|
|
"name": "useAnimatedRef",
|
|
"stableResult": true
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"useHookAtTopLevel": "error",
|
|
"useIsNan": "warn",
|
|
"useJsxKeyInIterable": "error",
|
|
"useValidForDirection": "error",
|
|
"useValidTypeof": "warn",
|
|
"useYield": "error"
|
|
},
|
|
"security": {
|
|
"noDangerouslySetInnerHtml": "error",
|
|
"noDangerouslySetInnerHtmlWithChildren": "error",
|
|
"noGlobalEval": "error"
|
|
},
|
|
"style": {
|
|
"noDoneCallback": "error",
|
|
"noNamespace": "error",
|
|
"noNonNullAssertion": "error",
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"noRestrictedGlobals": {
|
|
"level": "error",
|
|
"options": {
|
|
"deniedGlobals": {
|
|
"defaultStatus": "Use of this global variable is restricted.",
|
|
"status": "Use of this global variable is restricted.",
|
|
"scroll": "Use of this global variable is restricted.",
|
|
"outerHeight": "Use of this global variable is restricted.",
|
|
"screenX": "Use of this global variable is restricted.",
|
|
"opener": "Use of this global variable is restricted.",
|
|
"onfocus": "Use of this global variable is restricted.",
|
|
"pageYOffset": "Use of this global variable is restricted.",
|
|
"addEventListener": "Use of this global variable is restricted.",
|
|
"defaultstatus": "Use of this global variable is restricted.",
|
|
"history": "Use of this global variable is restricted.",
|
|
"frames": "Use of this global variable is restricted.",
|
|
"screenY": "Use of this global variable is restricted.",
|
|
"focus": "Use of this global variable is restricted.",
|
|
"outerWidth": "Use of this global variable is restricted.",
|
|
"opera": "Use of this global variable is restricted.",
|
|
"external": "Use of this global variable is restricted.",
|
|
"innerHeight": "Use of this global variable is restricted.",
|
|
"closed": "Use of this global variable is restricted.",
|
|
"frameElement": "Use of this global variable is restricted.",
|
|
"scrollY": "Use of this global variable is restricted.",
|
|
"self": "Use of this global variable is restricted.",
|
|
"chrome": "Direct `chrome` access is restricted to prevent accidental usage in the wrong context. Use `getChrome()` or `getChromeWithThrow()` instead.",
|
|
"onblur": "Use of this global variable is restricted.",
|
|
"find": "Use of this global variable is restricted.",
|
|
"parent": "Use of this global variable is restricted.",
|
|
"top": "Use of this global variable is restricted.",
|
|
"moveBy": "Use of this global variable is restricted.",
|
|
"menubar": "Use of this global variable is restricted.",
|
|
"length": "Use of this global variable is restricted.",
|
|
"onerror": "Use of this global variable is restricted.",
|
|
"onresize": "Use of this global variable is restricted.",
|
|
"removeEventListener": "Use of this global variable is restricted.",
|
|
"onload": "Use of this global variable is restricted.",
|
|
"scrollTo": "Use of this global variable is restricted.",
|
|
"moveTo": "Use of this global variable is restricted.",
|
|
"scrollX": "Use of this global variable is restricted.",
|
|
"name": "Use of this global variable is restricted.",
|
|
"toolbar": "Use of this global variable is restricted.",
|
|
"innerWidth": "Use of this global variable is restricted.",
|
|
"location": "Use of this global variable is restricted.",
|
|
"locationbar": "Use of this global variable is restricted.",
|
|
"scrollBy": "Use of this global variable is restricted.",
|
|
"resizeTo": "Use of this global variable is restricted.",
|
|
"stop": "Use of this global variable is restricted.",
|
|
"scrollbars": "Use of this global variable is restricted.",
|
|
"blur": "Use of this global variable is restricted.",
|
|
"screenTop": "Use of this global variable is restricted.",
|
|
"confirm": "Use of this global variable is restricted.",
|
|
"screen": "Use of this global variable is restricted.",
|
|
"screenLeft": "Use of this global variable is restricted.",
|
|
"event": "Use of this global variable is restricted.",
|
|
"onunload": "Use of this global variable is restricted.",
|
|
"pageXOffset": "Use of this global variable is restricted.",
|
|
"resizeBy": "Use of this global variable is restricted.",
|
|
"statusbar": "Use of this global variable is restricted.",
|
|
"close": "Use of this global variable is restricted.",
|
|
"open": "Use of this global variable is restricted.",
|
|
"print": "Use of this global variable is restricted."
|
|
}
|
|
}
|
|
},
|
|
"noYodaExpression": "warn",
|
|
"useArrayLiterals": "error",
|
|
"useAsConstAssertion": "error",
|
|
"useBlockStatements": "warn",
|
|
"useConst": "error",
|
|
"useEnumInitializers": "error"
|
|
},
|
|
"suspicious": {
|
|
"noAlert": "warn",
|
|
"noAsyncPromiseExecutor": "error",
|
|
"noBitwiseOperators": "warn",
|
|
"noCatchAssign": "warn",
|
|
"noClassAssign": "error",
|
|
"noCommentText": "error",
|
|
"noCompareNegZero": "error",
|
|
"noConsole": "error",
|
|
"noControlCharactersInRegex": "warn",
|
|
"noDebugger": "warn",
|
|
"noDoubleEquals": "warn",
|
|
"noDuplicateCase": "error",
|
|
"noDuplicateElseIf": "error",
|
|
"noDuplicateJsxProps": "error",
|
|
"noEmptyInterface": "error",
|
|
"noExplicitAny": "error",
|
|
"noExtraNonNullAssertion": "error",
|
|
"noFallthroughSwitchClause": "warn",
|
|
"noGlobalAssign": "error",
|
|
"noIrregularWhitespace": "error",
|
|
"noLabelVar": "warn",
|
|
"noMisleadingCharacterClass": "error",
|
|
"noMisleadingInstantiator": "error",
|
|
"noOctalEscape": "warn",
|
|
"noPrototypeBuiltins": "error",
|
|
"noSelfCompare": "warn",
|
|
"noShadowRestrictedNames": "warn",
|
|
"noSparseArray": "warn",
|
|
"noUnsafeDeclarationMerging": "error",
|
|
"noUselessRegexBackrefs": "error",
|
|
"noVar": "error",
|
|
"noWith": "warn"
|
|
}
|
|
},
|
|
"includes": [
|
|
"**",
|
|
"!**/.eslintrc.js",
|
|
"!**/babel.config.js",
|
|
"!**/jest.config.js",
|
|
"!**/metro.config.js",
|
|
"!**/node_modules",
|
|
"!**/storybook-static",
|
|
"!**/coverage",
|
|
"!.maestro/scripts/dist",
|
|
"!.maestro/scripts/performance/dist",
|
|
"!.maestro/scripts/performance/**/*.js",
|
|
"!**/__mocks__/**",
|
|
"!scripts/**",
|
|
"!.vscode/extensions.json"
|
|
]
|
|
},
|
|
"javascript": {
|
|
"formatter": {
|
|
"jsxQuoteStyle": "double",
|
|
"quoteProperties": "asNeeded",
|
|
"trailingCommas": "all",
|
|
"semicolons": "asNeeded",
|
|
"arrowParentheses": "always",
|
|
"bracketSameLine": false,
|
|
"quoteStyle": "single",
|
|
"attributePosition": "auto",
|
|
"bracketSpacing": true
|
|
}
|
|
},
|
|
"json": {
|
|
"formatter": {
|
|
"trailingCommas": "none"
|
|
}
|
|
},
|
|
"html": {
|
|
"formatter": {
|
|
"selfCloseVoidElements": "always"
|
|
}
|
|
},
|
|
"assist": {
|
|
"enabled": true,
|
|
"actions": {
|
|
"source": {
|
|
"organizeImports": {
|
|
"level": "on",
|
|
"options": {
|
|
"identifierOrder": "natural"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"overrides": [
|
|
{
|
|
"includes": [
|
|
"pkgs/eslint-config/**",
|
|
"!pkgs/eslint-config/.eslintrc.js",
|
|
"!pkgs/eslint-config/**/__generated__/**",
|
|
"!pkgs/eslint-config/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/notifications/**",
|
|
"!pkgs/notifications/.eslintrc.js",
|
|
"!pkgs/notifications/**/__generated__/**",
|
|
"!pkgs/notifications/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/biome-config/**",
|
|
"!pkgs/biome-config/.eslintrc.js",
|
|
"!pkgs/biome-config/**/__generated__/**",
|
|
"!pkgs/biome-config/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/utilities/**",
|
|
"!pkgs/utilities/.eslintrc.js",
|
|
"!pkgs/utilities/**/__generated__/**",
|
|
"!pkgs/utilities/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/exchange/**",
|
|
"!pkgs/exchange/.eslintrc.js",
|
|
"!pkgs/exchange/**/__generated__/**",
|
|
"!pkgs/exchange/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/sessions/**",
|
|
"!pkgs/sessions/.eslintrc.js",
|
|
"!pkgs/sessions/**/__generated__/**",
|
|
"!pkgs/sessions/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/config/**",
|
|
"!pkgs/config/.eslintrc.js",
|
|
"!pkgs/config/**/__generated__/**",
|
|
"!pkgs/config/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/gating/**",
|
|
"!pkgs/gating/.eslintrc.js",
|
|
"!pkgs/gating/**/__generated__/**",
|
|
"!pkgs/gating/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/wallet/**",
|
|
"!pkgs/wallet/.eslintrc.js",
|
|
"!pkgs/wallet/**/__generated__/**",
|
|
"!pkgs/wallet/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/api/**",
|
|
"!pkgs/api/.eslintrc.js",
|
|
"!pkgs/api/**/__generated__/**",
|
|
"!pkgs/api/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/dex/**",
|
|
"!pkgs/dex/.eslintrc.js",
|
|
"!pkgs/dex/**/__generated__/**",
|
|
"!pkgs/dex/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/ui/**",
|
|
"!pkgs/ui/.eslintrc.js",
|
|
"!pkgs/ui/**/__generated__/**",
|
|
"!pkgs/ui/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/prices/src/index.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"**/*.test.ts",
|
|
"**/*.test.tsx",
|
|
"**/test/**",
|
|
"**/tests/**",
|
|
"**/*.spec.ts",
|
|
"**/*.spec.tsx"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"correctness": {
|
|
"noRestrictedElements": "off",
|
|
"noUnusedVariables": "off",
|
|
"noUnusedImports": "off",
|
|
"useExhaustiveDependencies": "off"
|
|
},
|
|
"style": {
|
|
"useEnumInitializers": "off",
|
|
"noNonNullAssertion": "off",
|
|
"noRestrictedImports": "off",
|
|
"noRestrictedGlobals": "off"
|
|
},
|
|
"suspicious": {
|
|
"noEmptyInterface": "off",
|
|
"noExplicitAny": "off",
|
|
"noShadowRestrictedNames": "off",
|
|
"noConsole": "off"
|
|
},
|
|
"complexity": {
|
|
"noUselessLoneBlockStatements": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"**/*.js",
|
|
"**/*.jsx"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noConsole": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/ui/**",
|
|
"!pkgs/ui/**/*.test.ts",
|
|
"!pkgs/ui/**/*.test.tsx",
|
|
"!pkgs/ui/**/test/**",
|
|
"!pkgs/ui/**/tests/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"ui/src": {
|
|
"message": "Avoid importing directly from ui/src from within the ui package which causes circular imports."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/utilities/**",
|
|
"!pkgs/utilities/**/*.test.ts",
|
|
"!pkgs/utilities/**/*.test.tsx",
|
|
"!pkgs/utilities/**/test/**",
|
|
"!pkgs/utilities/**/tests/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"utilities/src": {
|
|
"message": "Avoid importing directly from utilities/src from within the utilities package which causes circular imports."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/utilities/src/index.ts",
|
|
"pkgs/utilities/src/platform/*",
|
|
"pkgs/utilities/src/addresses/*",
|
|
"pkgs/utilities/src/errors/*"
|
|
],
|
|
"linter": {
|
|
"rules": {}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/lx/**",
|
|
"!pkgs/lx/**/*.test.ts",
|
|
"!pkgs/lx/**/*.test.tsx",
|
|
"!pkgs/lx/**/test/**",
|
|
"!pkgs/lx/**/tests/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"lx/src": {
|
|
"message": "Avoid importing directly from lx/src from within the lx package which causes circular imports."
|
|
},
|
|
"@luxamm/sdk-core": {
|
|
"importNames": [
|
|
"ChainId"
|
|
],
|
|
"message": "Don't use ChainId from @luxamm/sdk-core. Use the UniverseChainId from universe/lx."
|
|
},
|
|
"lx/src/features/chains/hooks/useOrderedChainIds": {
|
|
"importNames": [
|
|
"useOrderedChainIds"
|
|
],
|
|
"message": "Use `useEnabledChains` instead, which returns the ordered chains that are currently enabled."
|
|
},
|
|
"lx/src/features/settings/selectors": {
|
|
"importNames": [
|
|
"selectIsTestnetModeEnabled"
|
|
],
|
|
"message": "Use `useEnabledChains` instead."
|
|
},
|
|
"lx/src/features/chains/chainInfo": {
|
|
"importNames": [
|
|
"UNIVERSE_CHAIN_INFO"
|
|
],
|
|
"message": "Use useChainInfo or helpers in pkgs/lx/src/features/chains/utils.ts when possible!"
|
|
},
|
|
"lx/src/data/graphql/lx-data-api/__generated__/react-hooks": {
|
|
"importNames": [
|
|
"useAccountListQuery"
|
|
],
|
|
"message": "Use `useAccountListData` instead."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/lx/src/index.ts",
|
|
"pkgs/lx/src/features/telemetry/constants/index.ts",
|
|
"pkgs/lx/src/features/telemetry/constants/trace/index.ts",
|
|
"pkgs/lx/src/i18n/index.ts",
|
|
"pkgs/lx/src/state/index.ts",
|
|
"pkgs/lx/src/test/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/lx/src/data/**/__generated__/**",
|
|
"pkgs/lx/src/abis/types/**"
|
|
],
|
|
"linter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/lx/vite/**"
|
|
],
|
|
"linter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/api/.eslintrc.js",
|
|
"pkgs/api/codegen.ts",
|
|
"pkgs/api/scripts/**",
|
|
"pkgs/api/src/**/__generated__/**"
|
|
],
|
|
"linter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/api/src/clients/trading/api.json"
|
|
],
|
|
"formatter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/docker-image-builder/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noConsole": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/extension/**",
|
|
"!apps/extension/**/*.test.ts",
|
|
"!apps/extension/**/*.test.tsx",
|
|
"!apps/extension/**/test/**",
|
|
"!apps/extension/**/tests/**",
|
|
"!apps/extension/jest-setup.js",
|
|
"!apps/extension/scripts/**",
|
|
"!apps/extension/ReactotronConfig.ts",
|
|
"!apps/extension/index.js"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedGlobals": "off",
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"ethers": {
|
|
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"javascript": {
|
|
"jsxRuntime": "reactClassic"
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/extension/**/contentScript/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedGlobals": {
|
|
"level": "error",
|
|
"options": {
|
|
"deniedGlobals": {
|
|
"chrome": "Direct `chrome` access is restricted to prevent accidental usage in the wrong context. Use `getChrome()` or `getChromeWithThrow()` instead."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/extension/**/extensionMigrations.ts",
|
|
"apps/extension/**/extensionMigrationsTests.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"useEnumInitializers": "off",
|
|
"noNonNullAssertion": "off"
|
|
},
|
|
"suspicious": {
|
|
"noEmptyInterface": "off",
|
|
"noExplicitAny": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/**",
|
|
"!apps/mobile/**/*.test.ts",
|
|
"!apps/mobile/**/*.test.tsx",
|
|
"!apps/mobile/**/test/**",
|
|
"!apps/mobile/**/tests/**",
|
|
"!apps/mobile/ios/**",
|
|
"!apps/mobile/android/**",
|
|
"!apps/mobile/.storybook/storybook.requires.ts",
|
|
"!apps/mobile/scripts/**",
|
|
"!apps/mobile/ReactotronConfig.ts",
|
|
"!apps/mobile/index.js"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"react-router": {
|
|
"message": "Do not import react-router in native code. Use react-navigation instead."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"javascript": {
|
|
"jsxRuntime": "reactClassic"
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/**/utils/haptics/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"expo-haptics": "Allow expo-haptics in haptics utility files"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/.maestro/scripts/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": "off",
|
|
"useBlockStatements": "off"
|
|
},
|
|
"suspicious": {
|
|
"noConsole": "off"
|
|
},
|
|
"complexity": {
|
|
"noUselessLoneBlockStatements": "off"
|
|
},
|
|
"correctness": {
|
|
"noSwitchDeclarations": "off",
|
|
"noUnusedVariables": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/scripts/**",
|
|
"apps/mobile/ReactotronConfig.ts",
|
|
"apps/mobile/index.js"
|
|
],
|
|
"linter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/migrations.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"useEnumInitializers": "off",
|
|
"noNonNullAssertion": "off"
|
|
},
|
|
"suspicious": {
|
|
"noEmptyInterface": "off",
|
|
"noExplicitAny": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/mobile/**/*saga*.ts",
|
|
"apps/mobile/**/*Saga.ts",
|
|
"apps/mobile/**/handleDeepLink.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"useEnumInitializers": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/web/.storybook/**",
|
|
"apps/web/functions/**",
|
|
"apps/web/vite/**",
|
|
"apps/web/**/*.config.*",
|
|
"apps/web/**/*.d.ts"
|
|
],
|
|
"linter": {
|
|
"enabled": false
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/web/src/**",
|
|
"!apps/web/src/**/*.test.ts",
|
|
"!apps/web/src/**/*.test.tsx",
|
|
"!apps/web/src/**/test/**",
|
|
"!apps/web/src/**/tests/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noExplicitAny": "off",
|
|
"noBitwiseOperators": "off"
|
|
},
|
|
"style": {
|
|
"noNonNullAssertion": "off",
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"src/nft/components/icons": {
|
|
"message": "Please import icons from nft/components/iconExports instead of directly from icons.tsx"
|
|
},
|
|
"nft/components/icons": {
|
|
"message": "Please import icons from nft/components/iconExports instead of directly from icons.tsx"
|
|
},
|
|
"@playwright/test": {
|
|
"message": "Import test and expect from playwright/fixtures instead."
|
|
},
|
|
"styled-components": {
|
|
"message": "Styled components is deprecated, please use Flex or styled from \"ui/src\" instead."
|
|
},
|
|
"ethers": {
|
|
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
|
|
},
|
|
"ui/src/components/icons": {
|
|
"message": "Please import icons directly from their respective files, e.g. `ui/src/components/icons/SpecificIcon`. This is to avoid importing the entire icons folder when only some icons are needed, which increases bundle size"
|
|
},
|
|
"utilities/src/platform": {
|
|
"importNames": [
|
|
"isIOS",
|
|
"isAndroid"
|
|
],
|
|
"message": "Importing isIOS and isAndroid from platform is not allowed. Use isWebIOS and isWebAndroid instead."
|
|
},
|
|
"src/test-utils": {
|
|
"message": "test-utils should not be imported in non-test files"
|
|
},
|
|
"wagmi": {
|
|
"importNames": [
|
|
"useChainId",
|
|
"useAccount",
|
|
"useConnect",
|
|
"useDisconnect",
|
|
"useBlockNumber",
|
|
"useWatchBlockNumber"
|
|
],
|
|
"message": "Import wrapped utilities from internal hooks instead: useAccount from `hooks/useAccount`, useConnect from `hooks/useConnect`, useDisconnect from `hooks/useDisconnect`, useBlockNumber from `hooks/useBlockNumber`."
|
|
},
|
|
"lx/src/features/chains/chainInfo": {
|
|
"importNames": [
|
|
"UNIVERSE_CHAIN_INFO"
|
|
],
|
|
"message": "Use useChainInfo or helpers in pkgs/lx/src/features/chains/utils.ts when possible!"
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"javascript": {
|
|
"jsxRuntime": "reactClassic"
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/web/src/playwright/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noConsole": "off"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/web/src/**/*.e2e.test.ts",
|
|
"!apps/web/src/**/*.anvil.e2e.test.ts"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"**/playwright/anvil/**",
|
|
"**/playwright/fixtures/anvil"
|
|
],
|
|
"message": "Anvil imports must only be used in *.anvil.e2e.test.ts files."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/wallet/**",
|
|
"!pkgs/wallet/**/*.test.ts",
|
|
"!pkgs/wallet/**/*.test.tsx",
|
|
"!pkgs/wallet/**/test/**",
|
|
"!pkgs/wallet/**/tests/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
},
|
|
"wallet/src": {
|
|
"message": "Avoid importing directly from wallet/src from within the wallet package which causes circular imports."
|
|
},
|
|
"lx/src/features/dataApi/balances/balancesRest": {
|
|
"importNames": [
|
|
"useRESTPortfolioTotalValue"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `useRESTPortfolioTotalValue` directly."
|
|
},
|
|
"wallet/src/components/ErrorBoundary/restart": {
|
|
"message": "Use `wallet/src/components/ErrorBoundary/restartApp` instead."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"pkgs/wallet/src/components/landing/elements/index.tsx",
|
|
"pkgs/wallet/src/index.ts",
|
|
"pkgs/wallet/src/state/index.ts",
|
|
"pkgs/wallet/src/test/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"style": {
|
|
"noRestrictedImports": {
|
|
"level": "error",
|
|
"options": {
|
|
"paths": {
|
|
"utilities/src/telemetry/analytics/analytics": {
|
|
"message": "Please only use this for initialization, tests, flushing, and internal usage. Otherwise use `pkgs/lx/src/features/telemetry`"
|
|
},
|
|
"utilities/src/telemetry/trace/Trace": {
|
|
"message": "Please use the Trace in 'lx/src/features/telemetry/Trace' for app level usage!"
|
|
},
|
|
"ui/src/components/modal/AdaptiveWebModal": {
|
|
"message": "Please import Modal from `lx/src/components/modals/Modal` instead. Modal uses AdaptiveWebModal under the hood but has extra logic for handling animation, mounting, and dismounting."
|
|
},
|
|
"react-native": {
|
|
"importNames": [
|
|
"Switch",
|
|
"Keyboard"
|
|
],
|
|
"message": "Use our custom Switch component instead of Switch. Please use dismissNativeKeyboard() for keyboard dismissals."
|
|
},
|
|
"ui/src/hooks/useDeviceInsets": {
|
|
"importNames": [
|
|
"useDeviceInsets"
|
|
],
|
|
"message": "Use `useAppInsets` instead."
|
|
},
|
|
"react-native-safe-area-context": {
|
|
"importNames": [
|
|
"useSafeAreaInsets"
|
|
],
|
|
"message": "Use our internal useAppInsets hook instead."
|
|
},
|
|
"react-native-device-info": {
|
|
"importNames": [
|
|
"getUniqueId"
|
|
],
|
|
"message": "Not supported for web/extension, use `getUniqueId` from `utilities/src/device/getUniqueId` instead."
|
|
},
|
|
"wallet/src/data/apollo/usePersistedApolloClient": {
|
|
"importNames": [
|
|
"usePersistedApolloClient"
|
|
],
|
|
"message": "This hook should only be used once at the top level where the React app is initialized . You can use `import { useApolloClient } from '@apollo/client'` to get the default apollo client from the provider elsewhere in React. If you need access to apollo outside of React, you can use `import { apolloClientRef } from 'wallet/src/data/apollo/usePersistedApolloClient''`."
|
|
},
|
|
"expo-localization": {
|
|
"message": "Avoid using due to issue with unsupported locales. Use utilities/src/device/locales.ts getDeviceLocales instead"
|
|
},
|
|
"utilities/src/format/localeBased": {
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/fiatCurrency/conversion": {
|
|
"importNames": [
|
|
"useFiatConverter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/language/formatter": {
|
|
"importNames": [
|
|
"useLocalizedFormatter"
|
|
],
|
|
"message": "Use via `useLocalizationContext` instead."
|
|
},
|
|
"lx/src/features/dataApi/balances/balances": {
|
|
"importNames": [
|
|
"usePortfolioValueModifiers"
|
|
],
|
|
"message": "Use the wrapper hooks `usePortfolioTotalValue`, `useAccountListData` or `usePortfolioBalances` instead of `usePortfolioValueModifiers` directly."
|
|
},
|
|
"@gorhom/bottom-sheet": {
|
|
"importNames": [
|
|
"BottomSheetTextInput"
|
|
],
|
|
"message": "Use our internal BottomSheetTextInput wrapper from /lx/src/components/modals/Modal."
|
|
},
|
|
"expo-haptics": {
|
|
"message": "Use our internal HapticFeedback wrapper instead: import { HapticFeedback } from pkgs/lx/src/features/settings/useHapticFeedback/types"
|
|
},
|
|
"@luxamm/analytics": {
|
|
"importNames": [
|
|
"sendAnalyticsEvent"
|
|
],
|
|
"message": "Please use the typed `sendAnalyticsEvent` in 'lx/src/features/telemetry/send'"
|
|
},
|
|
"@hanzogui/core": {
|
|
"message": "Please import from '@hanzo/gui' directly to prevent mismatches."
|
|
}
|
|
},
|
|
"patterns": [
|
|
{
|
|
"group": [
|
|
"ui/src/assets/icons/*.svg"
|
|
],
|
|
"message": "Please do not import SVG files directly from `ui/src/assets/icons/*.svg`. Use generated icon components instead, e.g., `ui/src/components/icons/{iconName}`."
|
|
},
|
|
{
|
|
"group": [
|
|
"@l.x/*/src",
|
|
"@l.x/*/src/*"
|
|
],
|
|
"message": "Deep imports from @l.x/* packages are forbidden. Import from the package root instead (e.g., '@l.x/api', '@l.x/config'). All public APIs are exported from package roots."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"includes": [
|
|
"apps/cli/**"
|
|
],
|
|
"linter": {
|
|
"rules": {
|
|
"suspicious": {
|
|
"noConsole": "off"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|