Skip to content

Commit

Permalink
chore(suite): eslint.js files for suite-native
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-sanderson committed Sep 12, 2024
1 parent c77f789 commit be0701c
Show file tree
Hide file tree
Showing 112 changed files with 519 additions and 11 deletions.
9 changes: 5 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
'eslint-local-rules/*',
'*.config.js',
'.eslintrc.js',
'.eslintrc.cjs',
],
rules: {
<<<<<<< HEAD
Expand Down Expand Up @@ -239,10 +240,10 @@ module.exports = {
// These rules have to do with variable declarations.
'no-label-var': 'error', // disallow labels that share a name with a variable
'no-shadow': 'off', // @typescript-eslint/no-shadow will be used instead
'@typescript-eslint/no-shadow': [
'error',
{ builtinGlobals: true, allow: ['_', 'error', 'resolve', 'reject', 'fetch'] },
], // disallow declaration of variables already declared in the outer scope
// '@typescript-eslint/no-shadow': [
// 'error',
// { builtinGlobals: true, allow: ['_', 'error', 'resolve', 'reject', 'fetch'] },
// ], // disallow declaration of variables already declared in the outer scope
'no-shadow-restricted-names': 'error', // disallow shadowing of names such as arguments
'no-undefined': 'off', // disallow use of undefined variable (off by default)
'no-undef-init': 'error', // disallow use of undefined when initializing variables
Expand Down
5 changes: 5 additions & 0 deletions packages/auth-server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
3 changes: 3 additions & 0 deletions packages/coinjoin/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ module.exports = {
'no-bitwise': 'off',
'no-console': 'warn',
},
parserOptions: {
tsconfigRootDir: __dirname,
},
};
8 changes: 8 additions & 0 deletions packages/components/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
rules: {
'import/no-extraneous-dependencies': ['error', { includeTypes: true }],
},
};
5 changes: 5 additions & 0 deletions packages/connect-explorer-webextension/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
3 changes: 3 additions & 0 deletions packages/connect-explorer/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ module.exports = {
],
},
extends: ['plugin:mdx/recommended'],
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/connect-iframe/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/connect-plugin-ethereum/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/connect-plugin-stellar/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/connect-popup/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-shadow
import { test, expect, chromium } from '@playwright/test';
import path from 'path';

Expand Down
5 changes: 5 additions & 0 deletions packages/connect-ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
3 changes: 3 additions & 0 deletions packages/connect-web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ module.exports = {
'no-underscore-dangle': 'off', // underscore is used
camelcase: 'off', // camelcase is used
},
parserOptions: {
tsconfigRootDir: __dirname,
},
};
3 changes: 3 additions & 0 deletions packages/connect-webextension/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module.exports = {
rules: {
'no-underscore-dangle': 'off', // underscore is used
},
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/crypto-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/device-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/dom-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/ipc-proxy/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/node-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/react-native-usb/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
1 change: 0 additions & 1 deletion packages/react-native-usb/plugins/withUSBDevice.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable require-await */
const { AndroidConfig, withAndroidManifest } = require('expo/config-plugins');

Expand Down
5 changes: 5 additions & 0 deletions packages/react-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/request-manager/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/styles/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/suite-analytics/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
1 change: 0 additions & 1 deletion packages/suite-analytics/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export enum AppUpdateEventStatus {
InstallAndRestart = 'install-and-restart',
InstallOnQuit = 'install-on-quit',
Closed = 'closed',
// eslint-disable-next-line @typescript-eslint/no-shadow
Error = 'error',
}

Expand Down
5 changes: 5 additions & 0 deletions packages/suite-build/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
6 changes: 6 additions & 0 deletions packages/suite-data/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
ignorePatterns: ['browser-detection.webpack.ts'],
};
5 changes: 5 additions & 0 deletions packages/suite-desktop-api/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
6 changes: 6 additions & 0 deletions packages/suite-desktop-core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
ignorePatterns: ['core.webpack.config.ts', 'scripts'],
};
5 changes: 5 additions & 0 deletions packages/suite-desktop-ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
6 changes: 6 additions & 0 deletions packages/suite-desktop/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
ignorePatterns: ['electron-builder-config.js'],
};
1 change: 1 addition & 0 deletions packages/suite-desktop/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// just here to force ESLint to not complain about not checking anything
5 changes: 5 additions & 0 deletions packages/suite-storage/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/suite-web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
3 changes: 3 additions & 0 deletions packages/suite/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module.exports = {
rules: {
'react/style-prop-object': ['error', { allow: ['FormattedNumber'] }],
},
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/theme/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/transport-bridge/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/transport-native/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions packages/urls/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/analytics/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/assets/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/connect-init/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/device-authenticity/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/fiat-services/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/formatters/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/graph/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/icons/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/intl-types/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 4 additions & 1 deletion suite-common/intl-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
"rootDir": "../../../"
},
"references": [
{ "path": "../../packages/type-utils" }
{
"path": "../../packages/type-utils"
}
],
"include": [
"src",
"suite-common/intl-types/**/*",
"packages/suite/src/components/suite/Translation"
]
Expand Down
5 changes: 5 additions & 0 deletions suite-common/invity/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/logger/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/message-system/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/redux-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/sentry/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/suite-constants/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/suite-types/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/suite-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/test-utils/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
5 changes: 5 additions & 0 deletions suite-common/toast-notifications/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
},
};
Loading

0 comments on commit be0701c

Please sign in to comment.