Changeset 61611 for trunk/src/wp-includes/general-template.php
- Timestamp:
- 02/10/2026 10:29:49 PM (5 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/general-template.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r61497 r61611 4070 4070 wp_enqueue_script( 'htmlhint' ); 4071 4071 wp_enqueue_script( 'csslint' ); 4072 wp_enqueue_script( 'jshint' );4073 4072 if ( ! current_user_can( 'unfiltered_html' ) ) { 4074 4073 wp_enqueue_script( 'htmlhint-kses' ); … … 4082 4081 case 'text/typescript': 4083 4082 case 'application/typescript': 4084 wp_enqueue_script( 'jshint' );4085 4083 wp_enqueue_script( 'jsonlint' ); 4086 4084 break; … … 4154 4152 ), 4155 4153 'jshint' => array( 4156 // The following are copied from <https://github.com/WordPress/wordpress-develop/blob/4.8.1/.jshintrc>. 4157 'boss' => true, 4158 'curly' => true, 4159 'eqeqeq' => true, 4160 'eqnull' => true, 4161 'es3' => true, 4162 'expr' => true, 4163 'immed' => true, 4164 'noarg' => true, 4165 'nonbsp' => true, 4166 'onevar' => true, 4167 'quotmark' => 'single', 4168 'trailing' => true, 4169 'undef' => true, 4170 'unused' => true, 4171 4172 'browser' => true, 4173 4174 'globals' => array( 4175 '_' => false, 4176 'Backbone' => false, 4177 'jQuery' => false, 4178 'JSON' => false, 4179 'wp' => false, 4154 'esversion' => 11, 4155 'module' => str_ends_with( $args['file'] ?? '', '.mjs' ), 4156 4157 // The following JSHint *linting rule* options are copied from 4158 // <https://github.com/WordPress/wordpress-develop/blob/6.9.0/.jshintrc>. 4159 // Parsing-related options such as `esversion` (and, in other contexts, `es5`, `es3`, `module`, `strict`) 4160 // are honored by the Espree-based integration, but these linting-rule options are not interpreted by Espree 4161 // and are kept only for compatibility/documentation with the original JSHint configuration. 4162 'boss' => true, 4163 'curly' => true, 4164 'eqeqeq' => true, 4165 'eqnull' => true, 4166 'expr' => true, 4167 'immed' => true, 4168 'noarg' => true, 4169 'nonbsp' => true, 4170 'quotmark' => 'single', 4171 'undef' => true, 4172 'unused' => true, 4173 'browser' => true, 4174 'globals' => array( 4175 '_' => false, 4176 'Backbone' => false, 4177 'jQuery' => false, 4178 'JSON' => false, 4179 'wp' => false, 4180 'export' => false, 4181 'module' => false, 4182 'require' => false, 4183 'WorkerGlobalScope' => false, 4184 'self' => false, 4185 'OffscreenCanvas' => false, 4186 'Promise' => false, 4180 4187 ), 4181 4188 ), … … 4234 4241 break; 4235 4242 case 'js': 4243 case 'mjs': 4236 4244 $type = 'text/javascript'; 4237 4245 break;
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)