mirror of
https://github.com/luxfi/wallet.git
synced 2026-11-02 15:38:31 +00:00
- Delete pkgs/{analytics,api,config,eslint-config,gating,lx,notifications,
prices,sessions,ui,utilities} — all identical to ~/work/lux/exchange
canonical (MD5-matched). Now published to npm at @l.x/*; consume from
there instead of vendoring.
- pkgs/wallet remains — this IS @luxfi/wallet (the uniswap-style extension
+ mobile wallet bones). Published at 1.0.10.
- Rewrite 3553 bare-path imports (uniswap/src/, ui/src/, utilities/src/,
lx/src/, lux/src/) → explicit @l.x/* across 725 files.
- apps/{extension,mobile}/package.json: workspace:^ → npm ^versions for
all @l.x/* / @luxfi/eslint-config; only @luxfi/wallet stays workspace.
- apps/{extension,mobile}/.eslintrc.js: RULES_DIR → node_modules/@l.x/lx/eslint_rules.
~315K line deletion. One canonical home: ~/work/lux/exchange.
72 lines
1.8 KiB
JavaScript
72 lines
1.8 KiB
JavaScript
const restrictedGlobals = require('confusing-browser-globals')
|
|
const rulesDirPlugin = require('eslint-plugin-rulesdir')
|
|
rulesDirPlugin.RULES_DIR = '../../node_modules/@l.x/lx/eslint_rules'
|
|
|
|
module.exports = {
|
|
root: true,
|
|
extends: ['@luxfi/eslint-config/extension'],
|
|
plugins: ['rulesdir'],
|
|
ignorePatterns: [
|
|
'node_modules',
|
|
'dist',
|
|
'.turbo',
|
|
'build',
|
|
'.eslintrc.js',
|
|
'.nx',
|
|
'wxt.config.ts',
|
|
],
|
|
parserOptions: {
|
|
project: 'tsconfig.eslint.json',
|
|
tsconfigRootDir: __dirname,
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
ecmaVersion: 2018,
|
|
sourceType: 'module',
|
|
},
|
|
rules: {
|
|
'rulesdir/i18n': 'error',
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['src/assets/index.ts', 'src/contentScript/index.tsx'],
|
|
rules: {
|
|
'check-file/no-index': 'off',
|
|
},
|
|
},
|
|
{
|
|
files: ['*.ts', '*.tsx'],
|
|
rules: {
|
|
'no-relative-import-paths/no-relative-import-paths': [
|
|
'error',
|
|
{
|
|
allowSameFolder: false,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['**/contentScript/**'],
|
|
rules: {
|
|
'no-restricted-syntax': [
|
|
'error',
|
|
{
|
|
selector: 'CallExpression[callee.object.name="logger"][callee.property.name!=/^(debug)$/]',
|
|
message:
|
|
'Only `logger.debug` is allowed in the content scripts. Please handle errors logs explicitly using `ErrorLog` message passing via `logContentScriptError`.',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
// We override this rule from the base config to allow access to `chrome`
|
|
// in all Extension files except those in the `contentScript` folder.
|
|
files: ['*.ts', '*.tsx'],
|
|
excludedFiles: ['**/contentScript/**'],
|
|
rules: {
|
|
'no-restricted-globals': ['error'].concat(restrictedGlobals),
|
|
},
|
|
},
|
|
],
|
|
}
|