mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-15 05:02:24 +08:00
fix lint
This commit is contained in:
parent
78b2c2ad49
commit
4edf94925c
@ -2,4 +2,7 @@ const { v5 } = jest.requireActual('uuid');
|
||||
|
||||
let seed = 0;
|
||||
|
||||
export const v4 = () => v5((seed++).toString(), '6c7fda6d-f92f-4bd2-9d4d-da26a59196a6');
|
||||
export const v4 = () => {
|
||||
seed += 1;
|
||||
return v5(seed.toString(), '6c7fda6d-f92f-4bd2-9d4d-da26a59196a6');
|
||||
};
|
||||
|
@ -96,6 +96,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
||||
"@typescript-eslint/experimental-utils": "^5.45.0",
|
||||
"@typescript-eslint/parser": "^5.45.0",
|
||||
"ansi-regex": "^6.0.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^9.1.2",
|
||||
"boxen": "^5.1.2",
|
||||
@ -133,6 +134,7 @@
|
||||
"jest-os-detection": "^1.3.1",
|
||||
"jest-serializer-html": "^7.1.0",
|
||||
"jest-watch-typeahead": "^2.2.1",
|
||||
"json5": "^2.2.3",
|
||||
"junit-xml": "^1.2.0",
|
||||
"lint-staged": "^10.5.4",
|
||||
"lodash": "^4.17.21",
|
||||
|
@ -101,7 +101,7 @@ test('it should label the PR associated with cheery picks in the current branch'
|
||||
",
|
||||
{
|
||||
"input": {
|
||||
"clientMutationId": "111db3d5-7ad7-5d3b-a8a9-efa7e7e9de57",
|
||||
"clientMutationId": "7efda802-d7d1-5d76-97d6-cc16a9f3e357",
|
||||
"labelIds": [
|
||||
"pick-id",
|
||||
],
|
||||
|
@ -1,3 +1,4 @@
|
||||
/* eslint-disable no-console */
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import program from 'commander';
|
||||
import chalk from 'chalk';
|
||||
@ -112,14 +113,15 @@ export const run = async (_: unknown) => {
|
||||
|
||||
const failedCherryPicks: string[] = [];
|
||||
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const pr of patchPRs) {
|
||||
const spinner = ora(`Cherry picking #${pr.number}`).start();
|
||||
const prSpinner = ora(`Cherry picking #${pr.number}`).start();
|
||||
|
||||
try {
|
||||
await git.raw(['cherry-pick', '-m', '1', '-x', pr.mergeCommit]);
|
||||
spinner.succeed(`Picked: ${formatPR(pr)}`);
|
||||
prSpinner.succeed(`Picked: ${formatPR(pr)}`);
|
||||
} catch (pickError) {
|
||||
spinner.fail(`Failed to automatically pick: ${formatPR(pr)}`);
|
||||
prSpinner.fail(`Failed to automatically pick: ${formatPR(pr)}`);
|
||||
logger.error(pickError.message);
|
||||
const abort = ora(`Aborting cherry pick for merge commit: ${pr.mergeCommit}`).start();
|
||||
try {
|
||||
@ -130,7 +132,7 @@ export const run = async (_: unknown) => {
|
||||
logger.error(pickError.message);
|
||||
}
|
||||
failedCherryPicks.push(pr.mergeCommit);
|
||||
spinner.info(
|
||||
prSpinner.info(
|
||||
`This PR can be picked manually with: ${chalk.grey(
|
||||
`git cherry-pick -m1 -x ${pr.mergeCommit}`
|
||||
)}`
|
||||
|
@ -7,6 +7,7 @@ import type { PromptObject, Falsy, PrevCaller, PromptType } from 'prompts';
|
||||
import program from 'commander';
|
||||
import dedent from 'ts-dedent';
|
||||
import chalk from 'chalk';
|
||||
// eslint-disable-next-line import/extensions
|
||||
import kebabCase from 'lodash/kebabCase.js';
|
||||
|
||||
// Option types
|
||||
|
@ -2999,6 +2999,7 @@ __metadata:
|
||||
"@typescript-eslint/experimental-utils": ^5.45.0
|
||||
"@typescript-eslint/parser": ^5.45.0
|
||||
"@verdaccio/types": ^10.2.0
|
||||
ansi-regex: ^6.0.1
|
||||
babel-eslint: ^10.1.0
|
||||
babel-loader: ^9.1.2
|
||||
boxen: ^5.1.2
|
||||
@ -3036,6 +3037,7 @@ __metadata:
|
||||
jest-os-detection: ^1.3.1
|
||||
jest-serializer-html: ^7.1.0
|
||||
jest-watch-typeahead: ^2.2.1
|
||||
json5: ^2.2.3
|
||||
junit-xml: ^1.2.0
|
||||
lint-staged: ^10.5.4
|
||||
lodash: ^4.17.21
|
||||
@ -10327,7 +10329,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json5@npm:^2.0.0, json5@npm:^2.1.0, json5@npm:^2.2.2":
|
||||
"json5@npm:^2.0.0, json5@npm:^2.1.0, json5@npm:^2.2.2, json5@npm:^2.2.3":
|
||||
version: 2.2.3
|
||||
resolution: "json5@npm:2.2.3"
|
||||
bin:
|
||||
|
Loading…
x
Reference in New Issue
Block a user