Skip to content

Commit

Permalink
fix merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jun 27, 2024
2 parents 748ffec + 4ee43a3 commit c7fc9ab
Show file tree
Hide file tree
Showing 732 changed files with 25,155 additions and 12,355 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ android/**/build/**
docs/vendor/**
docs/assets/**
web/gtm.js
**/.expo/**
15 changes: 10 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path');

const restrictedImportPaths = [
{
name: 'react-native',
Expand Down Expand Up @@ -93,10 +95,11 @@ module.exports = {
'plugin:you-dont-need-lodash-underscore/all',
'prettier',
],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library'],
plugins: ['@typescript-eslint', 'jsdoc', 'you-dont-need-lodash-underscore', 'react-native-a11y', 'react', 'testing-library', 'eslint-plugin-react-compiler'],
ignorePatterns: ['lib/**'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
project: path.resolve(__dirname, './tsconfig.json'),
},
env: {
jest: true,
Expand All @@ -105,10 +108,8 @@ module.exports = {
__DEV__: 'readonly',
},
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',

// TypeScript specific rules
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/prefer-enum-initializers': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-non-null-assertion': 'error',
Expand Down Expand Up @@ -187,6 +188,7 @@ module.exports = {
touchables: ['PressableWithoutFeedback', 'PressableWithFeedback'],
},
],
'react-compiler/react-compiler': 'error',

// Disallow usage of certain functions and imports
'no-restricted-syntax': [
Expand Down Expand Up @@ -215,6 +217,8 @@ module.exports = {
// Other rules
curly: 'error',
'you-dont-need-lodash-underscore/throttle': 'off',
// The suggested alternative (structuredClone) is not supported in Hermes:https://github.com/facebook/hermes/issues/684
'you-dont-need-lodash-underscore/clone-deep': 'off',
'prefer-regex-literals': 'off',
'valid-jsdoc': 'off',
'jsdoc/no-types': 'error',
Expand Down Expand Up @@ -257,6 +261,7 @@ module.exports = {
// Remove once no JS files are left
{
files: ['*.js', '*.jsx'],
extends: ['plugin:@typescript-eslint/disable-type-checked'],
rules: {
'@typescript-eslint/prefer-nullish-coalescing': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as github from '@actions/github';
import type {WebhookPayload} from '@actions/github/lib/interfaces';
import {parse} from '@babel/parser';
import traverse from '@babel/traverse';
import CONST from '@github/libs/CONST';
Expand All @@ -8,6 +9,15 @@ import type Category from './Category';

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

type GithubPaylod = WebhookPayload & {
// eslint-disable-next-line @typescript-eslint/naming-convention
pull_request?: {
head: {
ref?: string;
};
};
};

const items = [
"I verified that similar component doesn't exist in the codebase",
'I verified that all props are defined accurately and each prop has a `/** comment above it */`',
Expand Down Expand Up @@ -77,7 +87,7 @@ async function detectReactComponentInFile(filename: string): Promise<boolean | u
owner: CONST.GITHUB_OWNER,
repo: CONST.APP_REPO,
path: filename,
ref: github.context.payload.pull_request?.head.ref,
ref: (github.context.payload as GithubPaylod)?.pull_request?.head.ref,
};
try {
const {data} = await GithubUtils.octokit.repos.getContent(params);
Expand Down
Loading

0 comments on commit c7fc9ab

Please sign in to comment.