mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-06-27 21:05:53 +00:00
Make JS X Again
* Configure the project to allow the use of JSX in .jsx files. * Add linting for JSX. * Rewrite most existing code that uses `createElement` to use JSX syntax. * Stop importing `createElement as e`. That's what the minifier is for. And we don't have to write it manually so much now because of JSX syntax.
This commit is contained in:
parent
57152e8ed5
commit
f506b512b4
31 changed files with 514 additions and 322 deletions
|
@ -4,7 +4,7 @@
|
|||
// Tooltip Handling
|
||||
// ============================================================================
|
||||
|
||||
import {createElement as e} from 'utilities/dom';
|
||||
import {createElement} from 'utilities/dom';
|
||||
import {has, maybe_call} from 'utilities/object';
|
||||
|
||||
import Tooltip from 'utilities/tooltip';
|
||||
|
@ -20,8 +20,8 @@ export default class TooltipProvider extends Module {
|
|||
this.types.json = target => {
|
||||
const title = target.dataset.title;
|
||||
return [
|
||||
title && e('strong', null, title),
|
||||
e('code', {
|
||||
title && createElement('strong', null, title),
|
||||
createElement('code', {
|
||||
className: `block${title ? ' pd-t-05 border-t mg-t-05' : ''}`,
|
||||
style: {
|
||||
fontFamily: 'monospace',
|
||||
|
@ -96,8 +96,8 @@ export default class TooltipProvider extends Module {
|
|||
|
||||
if ( ! handler )
|
||||
return [
|
||||
e('strong', null, 'Unhandled Tooltip Type'),
|
||||
e('code', {
|
||||
createElement('strong', null, 'Unhandled Tooltip Type'),
|
||||
createElement('code', {
|
||||
className: 'block pd-t-05 border-t mg-t-05',
|
||||
style: {
|
||||
fontFamily: 'monospace',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue