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:
Maribeth Bottorff
2023-05-10 16:01:39 -07:00
committed by GitHub
parent af991f5e1b
commit 88ff901a72
425 changed files with 29170 additions and 21169 deletions

View File

@@ -13,7 +13,8 @@
{
// Example entry:
'0.0.0': [ // Version that includes the rename.
'0.0.0': [
// Version that includes the rename.
// Each entry in the array is a module.
// All of the properties are optional.
{
@@ -100,7 +101,7 @@
newExport: 'conditionalBind',
},
},
}
},
],
'7.20211209.0-beta.0': [
@@ -162,20 +163,20 @@
getMethod: 'getSelected',
setMethod: 'setSelected',
},
}
},
},
{
oldName: 'Blockly.Blocks',
newName: 'Blockly.blocks',
newExport: 'Blocks', // Previous default export now named.
newPath: 'Blockly.Blocks', // But still on tree with original name.
newExport: 'Blocks', // Previous default export now named.
newPath: 'Blockly.Blocks', // But still on tree with original name.
},
{
oldName: 'Blockly.ContextMenu',
exports: {
currentBlock: {
getMethod: 'getCurrentBlock',
setMethod: 'setCurrentBlock'
setMethod: 'setCurrentBlock',
},
},
},
@@ -201,8 +202,8 @@
{
oldName: 'Blockly.connectionTypes',
newName: 'Blockly.ConnectionType',
newExport: 'ConnectionType', // Previous default export now named.
newPath: 'Blockly.ConnectionType', // Type reexported directly.
newExport: 'ConnectionType', // Previous default export now named.
newPath: 'Blockly.ConnectionType', // Type reexported directly.
},
{
oldName: 'Blockly.utils',
@@ -258,37 +259,37 @@
resizeSvgContents: {newModule: 'Blockly.WorkspaecSvg'},
defineBlocksWithJsonArray: {newModule: 'Blockly.common'},
isNumber: {newModule: 'Blockly.utils.string'},
}
},
},
{
oldName: 'Blockly.Blocks.colour',
newName: 'Blockly.blocks.colour'
newName: 'Blockly.blocks.colour',
},
// Blockly.Blocks.lists not previously provided.
{
oldName: 'Blockly.Blocks.logic',
newName: 'Blockly.blocks.logic'
newName: 'Blockly.blocks.logic',
},
{
oldName: 'Blockly.Blocks.loops',
newName: 'Blockly.blocks.loops'
newName: 'Blockly.blocks.loops',
},
{
oldName: 'Blockly.Blocks.math',
newName: 'Blockly.blocks.math'
newName: 'Blockly.blocks.math',
},
{
oldName: 'Blockly.Blocks.procedures',
newName: 'Blockly.blocks.procedures'
newName: 'Blockly.blocks.procedures',
},
{
oldName: 'Blockly.Blocks.texts',
newName: 'Blockly.blocks.texts'
newName: 'Blockly.blocks.texts',
},
{
oldName: 'Blockly.Blocks.variables',
newName: 'Blockly.blocks.variables'
newName: 'Blockly.blocks.variables',
},
// Blockly.Blocks.variablesDynamic not previously provided.
@@ -302,7 +303,7 @@
getRelativeXY: {newModule: 'Blockly.utils.svgMath'},
getInjectionDivXY_: {
newModule: 'Blockly.utils.svgMath',
newExport: 'getInjectionDivXY'
newExport: 'getInjectionDivXY',
},
parseBlockColour: {newModule: 'Blockly.utils.parsing'},
checkMessageReferences: {newModule: 'Blockly.utils.parsing'},
@@ -310,12 +311,16 @@
tokenizeInterpolation: {newModule: 'Blockly.utils.parsing'},
arrayRemove: {
newModule: 'Blockly.utils.array',
newExport: 'removeElem'
newExport: 'removeElem',
},
getBlockTypeCounts: {
newModule: 'Blockly.common',
newExport: 'getBlockTypeCounts',
},
runAfterPageLoad: {
newModule: 'Blockly.Extensions',
newExport: 'runAfterPageLoad',
},
getBlockTypeCounts:
{newModule: 'Blockly.common', newExport: 'getBlockTypeCounts'},
runAfterPageLoad:
{newModule: 'Blockly.Extensions', newExport: 'runAfterPageLoad'},
},
},
@@ -1344,8 +1349,8 @@
globalThis: {
oldPath: 'Blockly.utils.global',
newPath: 'globalThis',
}
}
},
},
},
{
oldName: 'Blockly.Dart',
@@ -1437,7 +1442,7 @@
newModule: 'Blockly.utils.xml',
},
},
}
},
],
'develop': [