Skip to content

Commit

Permalink
chore: clean up tsdoc and exports
Browse files Browse the repository at this point in the history
  • Loading branch information
rachel-fenichel committed Feb 7, 2024
1 parent fec3c70 commit efee67a
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 67 deletions.
36 changes: 18 additions & 18 deletions plugins/field-colour/src/blocks/colourBlend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { registerFieldColour } from '../field_colour';
import { Generators } from './generatorUtils';


const BLOCK_NAME = 'colour_blend';
export const BLOCK_NAME = 'colour_blend';

Check failure on line 17 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Variable name `BLOCK_NAME` must match one of the following formats: camelCase, PascalCase

// Block for blending two colours together.
const jsonDef =
Expand Down Expand Up @@ -51,9 +51,9 @@ const jsonDef =

/**
* Javascript generator definition.

Check failure on line 53 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The JavascriptGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function jsGenerator(
block: Block,
Expand Down Expand Up @@ -90,9 +90,9 @@ export function jsGenerator(

/**
* Dart generator definition.

Check failure on line 92 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The DartGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function dartGenerator(
block: Block,
Expand Down Expand Up @@ -140,9 +140,9 @@ String ${generator.FUNCTION_NAME_PLACEHOLDER_}(String c1, String c2, num ratio)

/**
* Lua generator definition.

Check failure on line 142 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The LuaGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function luaGenerator(
block: Block,
Expand Down Expand Up @@ -179,9 +179,9 @@ export function luaGenerator(

/**
* PHP generator definition.

Check failure on line 181 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PhpGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function phpGenerator(
block: Block,
Expand Down Expand Up @@ -219,9 +219,9 @@ export function phpGenerator(

/**
* Python generator definition.

Check failure on line 221 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PythonGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function pythonGenerator(
block: Block,
Expand Down Expand Up @@ -255,7 +255,7 @@ export function pythonGenerator(
const definitionMap =
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]);

export const blockDef = definitionMap[BLOCK_NAME]
export const blockDefinition = definitionMap[BLOCK_NAME]

/**

Check warning on line 260 in plugins/field-colour/src/blocks/colourBlend.ts

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "gens" declaration
* Install the `colour_blend` block and all of its dependencies.
Expand All @@ -271,4 +271,4 @@ export function installBlock(gens: Generators = {}) {
if (gens.lua) gens.lua.forBlock[BLOCK_NAME] = luaGenerator;
if (gens.php) gens.php.forBlock[BLOCK_NAME] = phpGenerator;
if (gens.python) gens.python.forBlock[BLOCK_NAME] = pythonGenerator;
}
}
32 changes: 16 additions & 16 deletions plugins/field-colour/src/blocks/colourPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ const jsonDef =

/**
* Javascript generator definition.

Check failure on line 39 in plugins/field-colour/src/blocks/colourPicker.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The JavascriptGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function jsGenerator(
block: Block,
Expand All @@ -52,9 +52,9 @@ export function jsGenerator(

/**
* Dart generator definition.

Check failure on line 54 in plugins/field-colour/src/blocks/colourPicker.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The DartGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function dartGenerator(
block: Block,
Expand All @@ -67,9 +67,9 @@ export function dartGenerator(

/**
* Lua generator definition.

Check failure on line 69 in plugins/field-colour/src/blocks/colourPicker.ts

View workflow job for this annotation

GitHub Actions / lint

Expected 1 lines after block description
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The LuaGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function luaGenerator(
block: Block,
Expand All @@ -82,9 +82,9 @@ export function luaGenerator(

/**
* PHP generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PhpGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function phpGenerator(
block: Block,
Expand All @@ -97,9 +97,9 @@ export function phpGenerator(

/**
* Python generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PythonGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function pythonGenerator(
block: Block,
Expand All @@ -114,7 +114,7 @@ export function pythonGenerator(
const definitionMap =
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]);

export const blockDef = definitionMap[BLOCK_NAME];
export const blockDefinition = definitionMap[BLOCK_NAME];

/**

Check warning on line 119 in plugins/field-colour/src/blocks/colourPicker.ts

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "gens" declaration
* Install the `colour_picker` block and all of its dependencies.
Expand Down
32 changes: 16 additions & 16 deletions plugins/field-colour/src/blocks/colourRandom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const jsonDef =

/**
* Javascript generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The JavascriptGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function jsGenerator(
block: Block,
Expand All @@ -53,9 +53,9 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}() {

/**
* Dart generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The DartGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function dartGenerator(
block: Block,
Expand Down Expand Up @@ -85,9 +85,9 @@ String ${generator.FUNCTION_NAME_PLACEHOLDER_}() {

/**
* Lua generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The LuaGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function luaGenerator(
block: Block,
Expand All @@ -100,9 +100,9 @@ export function luaGenerator(

/**
* PHP generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PhpGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function phpGenerator(
block: Block,
Expand All @@ -123,9 +123,9 @@ function ${generator.FUNCTION_NAME_PLACEHOLDER_}() {

/**
* Python generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PythonGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function pythonGenerator(
block: Block,
Expand All @@ -143,7 +143,7 @@ export function pythonGenerator(
const definitionMap =
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]);

export const blockDef = definitionMap[BLOCK_NAME];
export const blockDefinition = definitionMap[BLOCK_NAME];

/**

Check warning on line 148 in plugins/field-colour/src/blocks/colourRandom.ts

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "gens" declaration
* Install the `colour_picker` block and all of its dependencies.
Expand Down
34 changes: 17 additions & 17 deletions plugins/field-colour/src/blocks/colourRgb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const jsonDef =

/**
* Javascript generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The JavascriptGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function jsGenerator(
block: Block,
Expand Down Expand Up @@ -82,9 +82,9 @@ export function jsGenerator(

/**
* Dart generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The DartGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function dartGenerator(
block: Block,
Expand Down Expand Up @@ -125,9 +125,9 @@ export function dartGenerator(

/**
* Lua generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The LuaGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function luaGenerator(
block: Block,
Expand All @@ -154,9 +154,9 @@ export function luaGenerator(

/**
* PHP generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PhpGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function phpGenerator(
block: Block,
Expand Down Expand Up @@ -187,9 +187,9 @@ export function phpGenerator(

/**
* Python generator definition.
* @param block
* @param generator
* @returns
* @param block The Block instance to generate code for.
* @param generator The PythonGenerator calling the function.
* @returns A tuple containing the code string and precedence.
*/
export function pythonGenerator(
block: Block,
Expand All @@ -216,7 +216,7 @@ export function pythonGenerator(
const definitionMap =
BlocklyCommon.createBlockDefinitionsFromJsonArray([jsonDef]);

export const blockDef = definitionMap[BLOCK_NAME];
export const blockDefinition = definitionMap[BLOCK_NAME];

/**

Check warning on line 221 in plugins/field-colour/src/blocks/colourRgb.ts

View workflow job for this annotation

GitHub Actions / lint

Missing JSDoc @param "gens" declaration
* Install the `colour_rgb` block and all of its dependencies.
Expand All @@ -232,4 +232,4 @@ export function installBlock(gens: Generators = {}) {
if (gens.lua) gens.lua.forBlock[BLOCK_NAME] = luaGenerator;
if (gens.php) gens.php.forBlock[BLOCK_NAME] = phpGenerator;
if (gens.python) gens.python.forBlock[BLOCK_NAME] = pythonGenerator;
}
}

0 comments on commit efee67a

Please sign in to comment.