mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-29 06:49:06 +02:00
Use Babel and ES6 in docs JS files (#31607)
* Pass docs js through Babel * Use ES6 in docs js * Only run babel on src files * Allow babel in Hugo * Update scripts.html * Inherit from the root .eslintrc.json * Use `Array.from` * Drop Babel from docs * Prefer template * replace IIFE with arrow functions Co-authored-by: XhmikosR <xhmikosr@gmail.com> Co-authored-by: GeoSot <geo.sotis@gmail.com>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/* globals Chart:false, feather:false */
|
||||
|
||||
(function () {
|
||||
(() => {
|
||||
'use strict'
|
||||
|
||||
feather.replace({ 'aria-hidden': 'true' })
|
||||
|
||||
// Graphs
|
||||
var ctx = document.getElementById('myChart')
|
||||
const ctx = document.getElementById('myChart')
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
var myChart = new Chart(ctx, {
|
||||
const myChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: [
|
||||
|
Reference in New Issue
Block a user