mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 19:32:35 +02:00
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies * chore(v2): upgrade devDependencies * chore: prettier
This commit is contained in:
parent
ea8c916528
commit
b07507c9cc
148 changed files with 2385 additions and 1975 deletions
|
@ -26,7 +26,7 @@ if (!semver.satisfies(process.version, requiredVersion)) {
|
|||
|
||||
function wrapCommand(fn) {
|
||||
return (...args) =>
|
||||
fn(...args).catch(err => {
|
||||
fn(...args).catch((err) => {
|
||||
console.error(chalk.red(err.stack));
|
||||
process.exitCode = 1;
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ program
|
|||
wrapCommand(init)(path.resolve(rootDir), siteName, template);
|
||||
});
|
||||
|
||||
program.arguments('<command>').action(cmd => {
|
||||
program.arguments('<command>').action((cmd) => {
|
||||
program.outputHelp();
|
||||
console.log(` ${chalk.red(`\n Unknown command ${chalk.yellow(cmd)}.`)}`);
|
||||
console.log();
|
||||
|
|
|
@ -23,7 +23,7 @@ function hasYarn(): boolean {
|
|||
}
|
||||
|
||||
function isValidGitRepoUrl(gitRepoUrl: string): boolean {
|
||||
return ['https://', 'git@'].some(item => gitRepoUrl.startsWith(item));
|
||||
return ['https://', 'git@'].some((item) => gitRepoUrl.startsWith(item));
|
||||
}
|
||||
|
||||
async function updatePkg(pkgPath: string, obj: any): Promise<void> {
|
||||
|
@ -43,7 +43,7 @@ export async function init(
|
|||
const templatesDir = path.resolve(__dirname, '../templates');
|
||||
const templates = fs
|
||||
.readdirSync(templatesDir)
|
||||
.filter(d => !d.startsWith('.') && !d.startsWith('README'));
|
||||
.filter((d) => !d.startsWith('.') && !d.startsWith('README'));
|
||||
|
||||
const gitChoice = 'Git repository';
|
||||
const templateChoices = [...templates, gitChoice];
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
"eslint-plugin-import": "^2.18.2",
|
||||
"eslint-plugin-jsx-a11y": "^6.2.3",
|
||||
"eslint-plugin-react": "^7.16.0",
|
||||
"eslint-plugin-react-hooks": "^2.3.0",
|
||||
"prettier": "^1.19.1",
|
||||
"eslint-plugin-react-hooks": "^3.0.0",
|
||||
"prettier": "^2.0.2",
|
||||
"stylelint": "^13.2.1"
|
||||
},
|
||||
"browserslist": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue