Commit Graph

227 Commits

Author SHA1 Message Date
Christopher Allen
c31895dc60 fix: Add missing require for Blockly.utils.object, .Size (#5427)
Some files were using Blockly.utils.object.inherits (or .mixin) without
having imported Blockly.utils.object.

Similarly, trashcan.js tried to use utils.Size as a constructor
instead of importing Size from Blockly.utils.Size.
2021-09-03 22:45:54 +01:00
kozbial
8a48ba2642 clang-format core/renderers/common/debugger.js 2021-08-12 09:53:30 -07:00
kozbial
f02e0015f5 Migrate core/renderers/common/debugger.js named requires 2021-08-12 09:53:30 -07:00
kozbial
d6dc3807e9 Migrate core/renderers/common/debugger.js to goog.module 2021-08-12 09:53:30 -07:00
kozbial
a557320eef Migrate core/renderers/common/debugger.js to ES6 const/let 2021-08-12 09:53:30 -07:00
kozbial
62fff867d8 clang-format core/renderers/common/renderer.js 2021-08-11 13:45:38 -07:00
kozbial
15c512f6ea Migrate core/renderers/common/renderer.js named requires 2021-08-11 13:45:38 -07:00
kozbial
c1bf49ae5c Migrate core/renderers/common/renderer.js to goog.module 2021-08-11 13:45:38 -07:00
kozbial
684047d22f Migrate core/renderers/common/renderer.js to ES6 const/let 2021-08-11 13:45:38 -07:00
Christopher Allen
4c40378b9a Use goog.requireType when importing interfaces (etc.) (#5343)
* Use goog.requireType when importing I* interfaces

Interfaces have no code, so should never be referred to outside of
(JSDoc) comments, and so the modules that define only interfaces never
need to be goog.require'd - goog.requireType is always sufficient.

This commit fixes imports of all modules whose name matches
/(.*\.)?I[A-Z]*/ - i.e., the hungarian-notation named ones in
core/interfaces/.

* Use goog.requireType when only using import for type specifications

Where a module is imported only to used in JSDoc comments it can
(and should) be goog.requireType'd instead of goog.require'd.

* Remove spurious eslint-disable no-unused-vars

There were a few cases where modules were being imported with
goog.require (because they are referred to in code, not just JSDoc
comments) but were prefaced by a spurious eslint suppress.

Remove these, restoring the invariant that an import gets an eslint
if and only if it is a requireType.

* Remove obsolete Closure Compiler error group

stricterMissingRequire has been superceded by missingRequire, and now
causes a Java null pointer exception if supplied.
2021-08-11 18:50:45 +01:00
kozbial
1487698343 Remove extra newline and remove unecessary package annotation 2021-08-09 18:23:07 -07:00
kozbial
70d8ca2a20 clang-format core/renderers/common/block_rendering.js 2021-08-09 18:23:07 -07:00
kozbial
f565120efb Migrate core/renderers/common/block_rendering.js named requires 2021-08-09 18:23:07 -07:00
kozbial
a4a3b6a068 Migrate core/renderers/common/block_rendering.js to goog.module 2021-08-09 18:23:07 -07:00
kozbial
440be28b4a Migrate core/renderers/common/block_rendering.js to ES6 const/let 2021-08-09 18:23:07 -07:00
kozbial
b233c5f10a Update visibility of constants 2021-08-04 09:20:20 -07:00
kozbial
99b30b92ce clang-format core/renderers/common/marker_svg.js 2021-08-04 09:20:20 -07:00
kozbial
3b43a19705 Migrate core/renderers/common/marker_svg.js named requires 2021-08-04 09:20:20 -07:00
kozbial
7aa382154c Migrate core/renderers/common/marker_svg.js to goog.module 2021-08-04 09:20:20 -07:00
kozbial
8eda99ea34 Migrate core/renderers/common/marker_svg.js to ES6 const/let 2021-08-04 09:20:20 -07:00
Monica Kozbial
bec82da358 Remove require destructuring (#5294) 2021-08-03 15:07:14 -07:00
kozbial
3d8a79fe96 Add missing eslint disable to core/renderers/common/i_path_object.js 2021-07-30 15:49:17 -07:00
kozbial
03de38c41a Add eslint disable 2021-07-30 15:19:26 -07:00
kozbial
31b10f1489 Migrate core/renderers/common/i_path_object.js named requires 2021-07-30 15:19:26 -07:00
kozbial
3aae7ffbde Migrate core/renderers/common/i_path_object.js to goog.module 2021-07-30 15:19:26 -07:00
Rachel Fenichel
55207a2e7f clang-format core/renderers/common/path_object.js 2021-07-27 14:41:29 -07:00
Rachel Fenichel
cf3d22c490 Migrate core/renderers/common/path_object.js named requires 2021-07-27 14:39:02 -07:00
Rachel Fenichel
c068a3b6f9 Migrate core/renderers/common/path_object.js to goog.module 2021-07-27 14:26:04 -07:00
Rachel Fenichel
1dfee3a722 Make defs private and add nullability 2021-07-23 16:39:40 -07:00
Rachel Fenichel
a392696c7a Convert core/renderers/common/constants.js to const/let 2021-07-23 15:07:30 -07:00
Rachel Fenichel
4aef7e3bcd clang-format core/renderers/common/constants.js 2021-07-23 15:00:14 -07:00
Rachel Fenichel
82c1d8c47a Migrate core/renderers/common/constants.js named requires 2021-07-23 14:48:55 -07:00
Rachel Fenichel
e9c1e67d17 Migrate core/renderers/common/constants.js to goog.module 2021-07-23 14:38:20 -07:00
Rachel Fenichel
046636547e Change how the debug filter is created 2021-07-23 14:37:20 -07:00
Aaron Dodson
ee565f16d6 Silence unused variable warnings for requires used in JSDoc 2021-07-22 10:41:55 -07:00
Aaron Dodson
83ff0ea09e Merge pull request #5148 from gonfunko/rerefactor
Update goog.module-migrated files to fix style issues
2021-07-22 08:09:53 -07:00
Rachel Fenichel
cf7a8b95b8 Remove extra requires of Blockly.constants 2021-07-21 15:35:19 -07:00
Rachel Fenichel
d87614f5a2 Merge pull request #5107 from rachel-fenichel/update_renderer_info
Migrate core/renderers/common/info.js to goog.module syntax
2021-07-21 11:21:46 -07:00
Aaron Dodson
0e6258ca1a Migrated to inline exports 2021-07-21 08:17:13 -07:00
Rachel Fenichel
ff591b0e73 Alphabetize 2021-07-19 21:26:53 -07:00
Rachel Fenichel
8afef7f598 Destructure some requires 2021-07-19 13:29:45 -07:00
Rachel Fenichel
f7a5d809bc clang-format core/renderers/common/info.js 2021-07-16 15:14:32 -07:00
Rachel Fenichel
b3877ffbb9 Migrate core/renderers/common/info.js to named requires 2021-07-16 15:13:41 -07:00
Rachel Fenichel
20079a64aa Migrate core/renderers/common/info.js to goog.module 2021-07-16 14:38:01 -07:00
Rachel Fenichel
1e81334c15 Migrate core/renderers/common/info.js to ES6 const/let 2021-07-16 14:15:25 -07:00
Rachel Fenichel
218046495f Sort requires 2021-07-16 13:12:05 -07:00
Rachel Fenichel
d2142a2e9f Clang-format core/renderers/common/drawer.js and remove unused require 2021-07-16 11:00:50 -07:00
Rachel Fenichel
f80764e153 Migrate core/renderers/common/drawer.js to named requires 2021-07-16 10:51:14 -07:00
Rachel Fenichel
94685bd8be Migrate core/renderers/common/drawer.js to goog.module 2021-07-16 09:52:32 -07:00
Rachel Fenichel
b43b19c7a3 Migrate core/renderers/common/drawer.js to ES6 const/let 2021-07-15 14:38:16 -07:00