mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
chore: use prettier instead of clang-format (#7014)
* chore: add and configure prettier * chore: remove clang-format * chore: remove clang-format config * chore: lint additional ts files * chore: fix lint errors in blocks * chore: add prettier-ignore where needed * chore: ignore js blocks when formatting * chore: fix playground html syntax * chore: fix yaml spacing from merge * chore: convert text blocks to use arrow functions * chore: format everything with prettier * chore: fix lint unused imports in blocks
This commit is contained in:
committed by
GitHub
parent
af991f5e1b
commit
88ff901a72
@@ -18,8 +18,6 @@ const fs = require('fs');
|
||||
const {exec, execSync} = require('child_process');
|
||||
const through2 = require('through2');
|
||||
|
||||
const clangFormat = require('clang-format');
|
||||
const clangFormatter = require('gulp-clang-format');
|
||||
const closureCompiler = require('google-closure-compiler').gulp();
|
||||
const closureDeps = require('google-closure-deps');
|
||||
const argv = require('yargs').argv;
|
||||
@@ -717,19 +715,6 @@ function cleanBuildDir() {
|
||||
return rimraf(BUILD_DIR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs clang format on all files in the core directory.
|
||||
*/
|
||||
function format() {
|
||||
return gulp.src([
|
||||
'core/**/*.js', 'core/**/*.ts',
|
||||
'blocks/**/*.js', 'blocks/**/*.ts',
|
||||
'.eslintrc.js'
|
||||
], {base: '.'})
|
||||
.pipe(clangFormatter.format('file', clangFormat))
|
||||
.pipe(gulp.dest('.'));
|
||||
}
|
||||
|
||||
// Main sequence targets. Each should invoke any immediate prerequisite(s).
|
||||
exports.cleanBuildDir = cleanBuildDir;
|
||||
exports.langfiles = buildLangfiles; // Build build/msg/*.js from msg/json/*.
|
||||
@@ -739,7 +724,6 @@ exports.minify = gulp.series(exports.deps, buildCompiled);
|
||||
exports.build = gulp.parallel(exports.minify, exports.langfiles);
|
||||
|
||||
// Manually-invokable targets, with prerequisites where required.
|
||||
exports.format = format;
|
||||
exports.messages = generateMessages; // Generate msg/json/en.json et al.
|
||||
exports.buildAdvancedCompilationTest =
|
||||
gulp.series(exports.deps, buildAdvancedCompilationTest);
|
||||
|
||||
Reference in New Issue
Block a user