Summary:
This PR runs eslint in PR using Danger.

## Changelog

[General] [Changed] - Run ESLint in CI

Pull Request resolved: https://github.com/facebook/react-native/pull/34305

Test Plan:
1. Add a JS lint error in the package/react-native-codegen package.
2. Observe the CI task post a message with the errors
3. Fix the errors
4. Observe the CI task report completion with no errors

Reviewed By: cortinico

Differential Revision: D38315268

Pulled By: cipolleschi

fbshipit-source-id: 9984402ee427dd62d47dd716f73c030e6d0f7b5e
This commit is contained in:
Riccardo Cipolleschi 2022-08-02 06:53:35 -07:00 коммит произвёл Facebook GitHub Bot
Родитель a53512fda4
Коммит 1bba59023d
4 изменённых файлов: 12 добавлений и 1 удалений

2
.github/workflows/danger_pr.yml поставляемый
Просмотреть файл

@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- run: yarn install
working-directory: .
- run: yarn install - run: yarn install
working-directory: bots working-directory: bots
- name: Danger - name: Danger

Просмотреть файл

@ -9,8 +9,9 @@
'use strict'; 'use strict';
const {danger, fail, message, warn} = require('danger'); const {danger, fail, /*message,*/ warn} = require('danger');
const includes = require('lodash.includes'); const includes = require('lodash.includes');
const eslint = require('@seadub/danger-plugin-eslint');
const isFromPhabricator = const isFromPhabricator =
danger.github.pr.body && danger.github.pr.body &&
@ -112,3 +113,5 @@ if (isMergeRefStable) {
}, },
); );
} }
eslint.default();

Просмотреть файл

@ -4,6 +4,7 @@
"danger": "node ./node_modules/.bin/danger" "danger": "node ./node_modules/.bin/danger"
}, },
"devDependencies": { "devDependencies": {
"@seadub/danger-plugin-eslint": "^3.0.2",
"danger": "^11.0.2", "danger": "^11.0.2",
"lodash.includes": "^4.3.0", "lodash.includes": "^4.3.0",
"minimatch": "^3.0.4" "minimatch": "^3.0.4"

Просмотреть файл

@ -543,6 +543,11 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA= 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": "@types/long@^4.0.1":
version "4.0.1" version "4.0.1"
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.1.tgz#459c65fa1867dafe6a8f322c4c51695663cc55e9"