Skip to content

Commit

Permalink
Merge branch 'main' into migrateEReceiptThumbnailToTypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Jan 8, 2024
2 parents 4964077 + bbfa541 commit ea0ddea
Show file tree
Hide file tree
Showing 1,197 changed files with 66,521 additions and 45,569 deletions.
53 changes: 48 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ const restrictedImportPaths = [
importNames: ['TouchableOpacity', 'TouchableWithoutFeedback', 'TouchableNativeFeedback', 'TouchableHighlight'],
message: "Please use 'PressableWithFeedback' and/or 'PressableWithoutFeedback' from 'src/components/Pressable' instead.",
},
{
name: 'awesome-phonenumber',
importNames: ['parsePhoneNumber'],
message: "Please use '@libs/PhoneNumber' instead.",
},
{
name: 'react-native-safe-area-context',
importNames: ['useSafeAreaInsets', 'SafeAreaConsumer', 'SafeAreaInsetsContext'],
Expand All @@ -29,13 +24,45 @@ const restrictedImportPaths = [
importNames: ['CSSProperties'],
message: "Please use 'ViewStyle', 'TextStyle', 'ImageStyle' from 'react-native' instead.",
},
{
name: '@styles/index',
importNames: ['default', 'defaultStyles'],
message: 'Do not import styles directly. Please use the `useThemeStyles` hook or `withThemeStyles` HOC instead.',
},
{
name: '@styles/utils',
importNames: ['default', 'DefaultStyleUtils'],
message: 'Do not import StyleUtils directly. Please use the `useStyleUtils` hook or `withStyleUtils` HOC instead.',
},
{
name: '@styles/theme',
importNames: ['default', 'defaultTheme'],

message: 'Do not import themes directly. Please use the `useTheme` hook or `withTheme` HOC instead.',
},
{
name: '@styles/theme/illustrations',
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
},
];

const restrictedImportPatterns = [
{
group: ['**/assets/animations/**/*.json'],
message: "Do not import animations directly. Please use the 'src/components/LottieAnimations' import instead.",
},
{
group: ['@styles/theme/themes/**'],
message: 'Do not import themes directly. Please use the `useTheme` hook or `withTheme` HOC instead.',
},
{
group: ['@styles/utils/**', '!@styles/utils/FontUtils', '!@styles/utils/types'],
message: 'Do not import style util functions directly. Please use the `useStyleUtils` hook or `withStyleUtils` HOC instead.',
},
{
group: ['@styles/theme/illustrations/themes/**'],
message: 'Do not import theme illustrations directly. Please use the `useThemeIllustrations` hook instead.',
},
];

module.exports = {
Expand Down Expand Up @@ -176,10 +203,26 @@ module.exports = {
'@typescript-eslint/switch-exhaustiveness-check': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
fixStyle: 'separate-type-imports',
},
],
'@typescript-eslint/no-import-type-side-effects': 'error',
'@typescript-eslint/consistent-type-exports': [
'error',
{
fixMixedExportsWithInlineTypeSpecifier: false,
},
],
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
'es/no-nullish-coalescing-operators': 'off',
'es/no-optional-chaining': 'off',
'valid-jsdoc': 'off',
'jsdoc/no-types': 'error',
'rulesdir/no-default-props': 'error',
'import/no-extraneous-dependencies': 'off',
'rulesdir/prefer-underscore-method': 'off',
'rulesdir/prefer-import-module-contents': 'off',
Expand Down
25 changes: 0 additions & 25 deletions .github/actions/composite/configureAwsCredentials/action.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Category from './Category';
import type Category from './Category';
import newComponent from './newComponentCategory';

const categories: Category[] = [newComponent];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import traverse from '@babel/traverse';
import CONST from '../../../../libs/CONST';
import GithubUtils from '../../../../libs/GithubUtils';
import promiseSome from '../../../../libs/promiseSome';
import Category from './Category';
import type Category from './Category';

type SuperClassType = {superClass: {name?: string; object: {name: string}; property: {name: string}} | null; name: string};

Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getDeployPullRequestList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/getReleaseBody/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
14 changes: 14 additions & 0 deletions .github/actions/javascript/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,20 @@ class GithubUtils {
return this.internalOctokit.rest;
}

/**
* Get the graphql instance from internal octokit.
* @readonly
* @static
* @memberof GithubUtils
*/
static get graphql() {
if (this.internalOctokit) {
return this.internalOctokit.graphql;
}
this.initOctokit();
return this.internalOctokit.graphql;
}

/**
* Either give an existing instance of Octokit paginate or create a new one
*
Expand Down
Loading

0 comments on commit ea0ddea

Please sign in to comment.