Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ module.exports = {
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
project: './tsconfig.eslint.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint'],
extends: [
Expand All @@ -22,6 +23,27 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
},
overrides: [
{
files: ['src/__tests__/**/*.ts'],
env: {
jest: true,
node: true,
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-extra-semi': 'off',
},
},
],
ignorePatterns: ['dist', 'node_modules', '*.js'],
}

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/__mocks__/expo-local-authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function hasHardwareAsync(): Promise<boolean> {
return Promise.resolve(mockHasHardware)
}

export function authenticateAsync(options?: {
export function authenticateAsync(_options?: {
promptMessage?: string
cancelLabel?: string
disableDeviceFallback?: boolean
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/__mocks__/react-native-keychain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const ACCESS_CONTROL = {
BIOMETRY_ANY_OR_DEVICE_PASSCODE: 'BIOMETRY_ANY_OR_DEVICE_PASSCODE',
}

let mockStorage: Map<string, { username: string; password: string }> = new Map()
const mockStorage: Map<string, { username: string; password: string }> = new Map()

export function setGenericPassword(
username: string,
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noUnusedLocals": false,
"noUnusedParameters": false
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}