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
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

52 changes: 0 additions & 52 deletions .eslintrc.js

This file was deleted.

70 changes: 70 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const reactNativeConfig = require('@react-native/eslint-config/flat');
const tsEslintPlugin = require('@typescript-eslint/eslint-plugin');
const reactPlugin = require('eslint-plugin-react');
const reactNativePlugin = require('eslint-plugin-react-native');
const tsdoc = require('eslint-plugin-tsdoc');

const typescriptFiles = ['**/*.ts', '**/*.tsx'];
const [, tsEslintRecommended, tsRecommended] =
tsEslintPlugin.configs['flat/recommended'];

module.exports = [
{
ignores: ['coverage/**/*', 'lib/**/*', 'docs/**/*'],
},
...reactNativeConfig,
reactPlugin.configs.flat.recommended,
{
plugins: {
'react-native': reactNativePlugin,
},
rules: reactNativePlugin.configs.all.rules,
},
{
rules: {
'react/react-in-jsx-scope': 'off',
},
},
{
...tsEslintRecommended,
files: typescriptFiles,
},
{
...tsRecommended,
files: typescriptFiles,
},
{
files: typescriptFiles,
plugins: {
tsdoc,
},
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
},
rules: {
'@typescript-eslint/no-var-requires': [
'error',
{ allow: ['/package\\.json$'] },
],
'@typescript-eslint/no-require-imports': [
'error',
{ allow: ['/package\\.json$'] },
],
'tsdoc/syntax': 'warn',
},
},
{
files: [
'**/*.test.{js,ts,tsx}',
'**/__mocks__/*',
'**/__tests__/*',
],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
];
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@
"commitlint": "^19.6.1",
"del-cli": "^5.1.0",
"dpdm": "^4.2.0",
"eslint": "^8.51.0",
"eslint": "^9.39.5",
"eslint-config-prettier": "^10.1.8",
Comment thread
jferrao-itrbl marked this conversation as resolved.
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-tsdoc": "^0.3.0",
"eslint-plugin-tsdoc": "^0.5.2",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"prettier-eslint": "^16.4.2",
Expand All @@ -113,7 +113,8 @@
"typescript": "^5.8.3"
},
"resolutions": {
"@types/react": "^19.2.0"
"@types/react": "^19.2.0",
"eslint-plugin-ft-flow": "^3.0.11"
},
"peerDependencies": {
"@react-navigation/native": "*",
Expand Down
31 changes: 7 additions & 24 deletions src/core/classes/IterableConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,47 +449,30 @@ export class IterableConfig {
inAppDisplayInterval: this.inAppDisplayInterval,
/**
* A boolean indicating if a URL handler is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
urlHandlerPresent: this.urlHandler != undefined,
urlHandlerPresent: this.urlHandler !== undefined,
/**
* A boolean indicating if a custom action handler is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
customActionHandlerPresent: this.customActionHandler != undefined,
customActionHandlerPresent: this.customActionHandler !== undefined,
/**
* A boolean indicating if an in-app handler is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
inAppHandlerPresent: this.inAppHandler != undefined,
inAppHandlerPresent: this.inAppHandler !== undefined,
/**
* A boolean indicating if an authentication handler is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
authHandlerPresent: this.authHandler != undefined,
authHandlerPresent: this.authHandler !== undefined,
/**
* A boolean indicating if an embedded message update callback is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
onEmbeddedMessageUpdatePresent: this.onEmbeddedMessageUpdate != undefined,
onEmbeddedMessageUpdatePresent:
this.onEmbeddedMessageUpdate !== undefined,
/**
* A boolean indicating if an embedded messaging disabled callback is present.
*
* TODO: Figure out if this is purposeful
*/
// eslint-disable-next-line eqeqeq
onEmbeddedMessagingDisabledPresent:
this.onEmbeddedMessagingDisabled != undefined,
this.onEmbeddedMessagingDisabled !== undefined,
/** The log level for the SDK. */
logLevel: this.logLevel,
expiringAuthTokenRefreshPeriod: this.expiringAuthTokenRefreshPeriod,
Expand Down
Loading
Loading