mirror of
https://github.com/luxfi/wallet.git
synced 2026-11-02 15:38:31 +00:00
Copies apps/extension, apps/mobile and 10 pkgs (wallet, ui, config, utilities, sessions, gating, notifications, analytics, eslint-config, prices) into a standalone pnpm workspace. Resolves merge conflict markers in extension and mobile package.json files, strips build artifacts (.wxt, .output, Pods).
92 lines
3.1 KiB
JSON
92 lines
3.1 KiB
JSON
{
|
|
"extends": ["../../.oxlintrc.json"],
|
|
"ignorePatterns": [".maestro/**", "dev/**", "webpack*.js", "webpack-plugins/**"],
|
|
"rules": {
|
|
"no-restricted-imports": [
|
|
"error",
|
|
{
|
|
"paths": [
|
|
{
|
|
"name": "ethers",
|
|
"message": "Please import from '@ethersproject/module' directly to support tree-shaking."
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"no-restricted-syntax": [
|
|
"error",
|
|
{
|
|
"selector": "CallExpression[callee.property.name='sendMessage'][callee.object.property.name='tabs'][callee.object.object.name='chrome']",
|
|
"message": "Use a message channel from apps/extension/src/background/messagePassing/messageChannels.ts instead of chrome.tabs.sendMessage."
|
|
},
|
|
{
|
|
"selector": "CallExpression[callee.property.name='sendMessage'][callee.object.property.name='runtime'][callee.object.object.name='chrome']",
|
|
"message": "Use a message channel from apps/extension/src/background/messagePassing/messageChannels.ts instead of chrome.runtime.sendMessage."
|
|
},
|
|
{
|
|
"selector": "CallExpression[callee.property.name='addListener'][callee.object.property.name='onMessage'][callee.object.object.property.name='runtime'][callee.object.object.object.name='chrome']",
|
|
"message": "Use a message channel instead of chrome.runtime.onMessage.addListener."
|
|
},
|
|
{
|
|
"selector": "CallExpression[callee.property.name='removeListener'][callee.object.property.name='onMessage'][callee.object.object.property.name='runtime'][callee.object.object.object.name='chrome']",
|
|
"message": "Use a message channel instead of chrome.runtime.onMessage.removeListener."
|
|
},
|
|
{
|
|
"selector": "CallExpression[callee.object.name='z'][callee.property.name='any']",
|
|
"message": "Avoid using z.any() in favor of more precise custom types."
|
|
}
|
|
],
|
|
"complexity": ["error", 20],
|
|
"max-depth": ["error", 4],
|
|
"max-nested-callbacks": ["error", 3],
|
|
"typescript/explicit-function-return-type": "off"
|
|
},
|
|
"overrides": [
|
|
{
|
|
"files": ["**/*.ts", "**/*.tsx"],
|
|
"rules": {
|
|
"universe-custom/no-relative-import-paths": [
|
|
"error",
|
|
{
|
|
"allowSameFolder": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["**/*"],
|
|
"rules": {
|
|
"no-restricted-globals": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["**/contentScript/**"],
|
|
"rules": {
|
|
"no-restricted-globals": [
|
|
"error",
|
|
{
|
|
"name": "chrome",
|
|
"message": "Direct `chrome` access is restricted. Use `getChrome()` or `getChromeWithThrow()` instead."
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"files": ["webpack*.js", "webpack-plugins/**"],
|
|
"rules": {
|
|
"security/detect-non-literal-regexp": "off",
|
|
"no-console": "off"
|
|
}
|
|
},
|
|
{
|
|
"files": ["**/extensionMigrations.ts", "**/extensionMigrationsTests.ts"],
|
|
"rules": {
|
|
"typescript/prefer-enum-initializers": "off",
|
|
"typescript/no-non-null-assertion": "off",
|
|
"typescript/no-empty-interface": "off",
|
|
"typescript/no-explicit-any": "off"
|
|
}
|
|
}
|
|
]
|
|
}
|