diff --git a/.github/workflows/danger_pr.yml b/.github/workflows/danger_pr.yml index d3e8072065a891..78b4ee9b562531 100644 --- a/.github/workflows/danger_pr.yml +++ b/.github/workflows/danger_pr.yml @@ -12,6 +12,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: yarn install + working-directory: . - run: yarn install working-directory: bots - name: Danger diff --git a/bots/dangerfile.js b/bots/dangerfile.js index 40e28921179560..e82d647f09e8bb 100644 --- a/bots/dangerfile.js +++ b/bots/dangerfile.js @@ -9,8 +9,9 @@ 'use strict'; -const {danger, fail, message, warn} = require('danger'); +const {danger, fail, /*message,*/ warn} = require('danger'); const includes = require('lodash.includes'); +const eslint = require('@seadub/danger-plugin-eslint'); const isFromPhabricator = danger.github.pr.body && @@ -112,3 +113,5 @@ if (isMergeRefStable) { }, ); } + +eslint.default(); diff --git a/bots/package.json b/bots/package.json index a5c45dfeb18674..56a17ac65ce8e5 100644 --- a/bots/package.json +++ b/bots/package.json @@ -4,6 +4,7 @@ "danger": "node ./node_modules/.bin/danger" }, "devDependencies": { + "@seadub/danger-plugin-eslint": "^3.0.2", "danger": "^11.0.2", "lodash.includes": "^4.3.0", "minimatch": "^3.0.4" diff --git a/bots/yarn.lock b/bots/yarn.lock index 2bd83418391d7a..d062f62f33dbf3 100644 --- a/bots/yarn.lock +++ b/bots/yarn.lock @@ -543,6 +543,11 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= +"@seadub/danger-plugin-eslint@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@seadub/danger-plugin-eslint/-/danger-plugin-eslint-3.0.2.tgz#9a51d9f1a103a274264c30212234001de0b417c1" + integrity sha512-W+efX4mP04A8wMuLV0nV+iOj892Vrbyik+FyDZcGgpzkJFXX0UfDhOPZ0FonbSV0xM47DI5a8go88U/pBdGM2A== + "@types/long@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" diff --git a/packages/react-native-codegen/src/parsers/flow/modules/index.js b/packages/react-native-codegen/src/parsers/flow/modules/index.js index 3c0a536cc4e3d0..38ce80db4e746c 100644 --- a/packages/react-native-codegen/src/parsers/flow/modules/index.js +++ b/packages/react-native-codegen/src/parsers/flow/modules/index.js @@ -74,7 +74,7 @@ function translateTypeAnnotation( ): Nullable { const {nullable, typeAnnotation, typeAliasResolutionStatus} = resolveTypeAnnotation(flowTypeAnnotation, types); - 3 == 1 + switch (typeAnnotation.type) { case 'GenericTypeAnnotation': { switch (typeAnnotation.id.name) {