These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | import $ from 'jquery'; |
||
0 ignored issues
–
show
|
|||
2 | import 'select2'; |
||
0 ignored issues
–
show
'import' is only available in ES6 (use 'esversion: 6').
Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code. Further Reading:
Loading history...
|
|||
3 | |||
4 | $(function () { |
||
5 | require('./src/accordion')(); |
||
6 | require('./src/autocomplete')(); |
||
7 | require('./src/bans')(); |
||
8 | require('./src/tabs')(); |
||
9 | require('./src/menu')(); |
||
10 | require('./src/md-editor')(); |
||
11 | require('./src/charts')(); |
||
12 | require('./src/player-list')(); |
||
13 | require('./src/pills')(); |
||
14 | require('./src/profile')(); |
||
15 | require('./src/tables')(); |
||
16 | require('./src/select-objects')(); |
||
17 | require('./src/servers')(); |
||
18 | }); |
||
19 | |||
20 | // Export $ as jQuery for legacy JS scripts |
||
21 | global.$ = $; |
||
22 |
Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code.
Further Reading: