Skip to content

Commit b5090b9

Browse files
committed
Update
1 parent ca62e42 commit b5090b9

File tree

612 files changed

+27419
-7740
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

612 files changed

+27419
-7740
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ android/**/build/**
99
docs/vendor/**
1010
docs/assets/**
1111
web/gtm.js
12+
**/.expo/**

.eslintrc.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ module.exports = {
9595
'plugin:you-dont-need-lodash-underscore/all',
9696
'prettier',
9797
],
98-
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library'],
98+
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
99+
ignorePatterns: ['lib/**'],
99100
parser: '@typescript-eslint/parser',
100101
parserOptions: {
101102
project: path.resolve(__dirname, './tsconfig.json'),
@@ -107,10 +108,8 @@ module.exports = {
107108
__DEV__: 'readonly',
108109
},
109110
rules: {
110-
'@typescript-eslint/no-unsafe-member-access': 'off',
111-
'@typescript-eslint/no-unsafe-assignment': 'off',
112-
113111
// TypeScript specific rules
112+
'@typescript-eslint/no-unsafe-assignment': 'off',
114113
'@typescript-eslint/prefer-enum-initializers': 'error',
115114
'@typescript-eslint/no-var-requires': 'off',
116115
'@typescript-eslint/no-non-null-assertion': 'error',
@@ -189,6 +188,7 @@ module.exports = {
189188
touchables: ['PressableWithoutFeedback', 'PressableWithFeedback'],
190189
},
191190
],
191+
'react-compiler/react-compiler': 'error',
192192

193193
// Disallow usage of certain functions and imports
194194
'no-restricted-syntax': [
@@ -217,6 +217,8 @@ module.exports = {
217217
// Other rules
218218
curly: 'error',
219219
'you-dont-need-lodash-underscore/throttle': 'off',
220+
// The suggested alternative (structuredClone) is not supported in Hermes:https://github.com/facebook/hermes/issues/684
221+
'you-dont-need-lodash-underscore/clone-deep': 'off',
220222
'prefer-regex-literals': 'off',
221223
'valid-jsdoc': 'off',
222224
'jsdoc/no-types': 'error',
@@ -259,6 +261,7 @@ module.exports = {
259261
// Remove once no JS files are left
260262
{
261263
files: ['*.js', '*.jsx'],
264+
extends: ['plugin:@typescript-eslint/disable-type-checked'],
262265
rules: {
263266
'@typescript-eslint/prefer-nullish-coalescing': 'off',
264267
'@typescript-eslint/no-unsafe-return': 'off',

.github/actions/javascript/authorChecklist/categories/newComponentCategory.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as github from '@actions/github';
2+
import type {WebhookPayload} from '@actions/github/lib/interfaces';
23
import {parse} from '@babel/parser';
34
import traverse from '@babel/traverse';
45
import CONST from '@github/libs/CONST';
@@ -8,6 +9,15 @@ import type Category from './Category';
89

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

12+
type GithubPaylod = WebhookPayload & {
13+
// eslint-disable-next-line @typescript-eslint/naming-convention
14+
pull_request?: {
15+
head: {
16+
ref?: string;
17+
};
18+
};
19+
};
20+
1121
const items = [
1222
"I verified that similar component doesn't exist in the codebase",
1323
'I verified that all props are defined accurately and each prop has a `/** comment above it */`',
@@ -77,7 +87,7 @@ async function detectReactComponentInFile(filename: string): Promise<boolean | u
7787
owner: CONST.GITHUB_OWNER,
7888
repo: CONST.APP_REPO,
7989
path: filename,
80-
ref: github.context.payload.pull_request?.head.ref,
90+
ref: (github.context.payload as GithubPaylod)?.pull_request?.head.ref,
8191
};
8292
try {
8393
const {data} = await GithubUtils.octokit.repos.getContent(params);

0 commit comments

Comments
 (0)