Skip to content

Commit 8e0ffb2

Browse files
committed
chore: run eslint fix
1 parent 7a1a3f4 commit 8e0ffb2

File tree

7 files changed

+88
-91
lines changed

7 files changed

+88
-91
lines changed

resources/js/alpine.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable import/namespace */
2+
/* eslint-disable import/default */
13
import Alpine from 'alpinejs'
24

35
window.Alpine = Alpine

resources/js/app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ import './bootstrap'
22
import './features/dark-mode'
33
import './features/preloader'
44
import './features/href-anchor'
5-
import './features/clipboard';
5+
import './features/clipboard'

resources/js/bootstrap.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
window._ = require('lodash');
1+
window._ = require('lodash')
22

33
/**
44
* We'll load the axios HTTP library which allows us to easily issue requests
55
* to our Laravel back-end. This library automatically handles sending the
66
* CSRF token as a header based on the value of the "XSRF" token cookie.
77
*/
88

9-
window.axios = require('axios');
9+
window.axios = require('axios')
1010

11-
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
11+
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'
1212

1313
/**
1414
* Echo exposes an expressive API for subscribing to channels and listening

resources/js/features/clipboard.js

+28-31
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
1-
import ClipboardJS from 'clipboard/dist/clipboard';
1+
import ClipboardJS from 'clipboard/dist/clipboard'
22

3-
document.querySelectorAll('pre').forEach((pre, key) => {
3+
document.querySelectorAll('pre').forEach(pre => {
4+
if ('nocopy' in pre.dataset) {
5+
return
6+
}
47

5-
if (("nocopy" in pre.dataset)) {
6-
return;
7-
}
8+
const codeBlock = pre.querySelector('code')
9+
const btn = document.createElement('button')
810

9-
let codeBlock = pre.querySelector('code');
10-
let btn = document.createElement('button');
11+
const codeId = `code${ Math.random().toString(36).slice(2) }`
12+
codeBlock.setAttribute('id', codeId)
1113

14+
pre.setAttribute('style', 'position:relative;')
1215

13-
var codeId = 'code' + Math.random().toString(36).slice(2);
14-
codeBlock.setAttribute('id', codeId);
16+
btn.innerHTML = 'copy'
17+
btn.setAttribute('title', 'copy')
18+
btn.setAttribute('class', 'rounded overflow-visible absolute top-1 right-1 p-3 text-white px-1 py-1 font-mono text-sm text-gray-900 bg-teal-100 rounded-md')
19+
btn.setAttribute('data-copybutton', '')
20+
btn.dataset.clipboardTarget = `#${ codeBlock.id }`
21+
pre.appendChild(btn)
22+
})
1523

16-
pre.setAttribute('style', 'position:relative;');
17-
18-
btn.innerHTML = "copy";
19-
btn.setAttribute('title', 'copy');
20-
btn.setAttribute('class', 'rounded overflow-visible absolute top-1 right-1 p-3 text-white px-1 py-1 font-mono text-sm text-gray-900 bg-teal-100 rounded-md');
21-
btn.setAttribute("data-copybutton", "");
22-
btn.dataset.clipboardTarget = `#${codeBlock.id}`;
23-
pre.appendChild(btn);
24-
25-
});
26-
27-
var clipboard = new ClipboardJS('[data-copybutton]');
24+
const clipboard = new ClipboardJS('[data-copybutton]')
2825

2926
clipboard.on('success', (element) => {
30-
element.clearSelection();
31-
32-
let btn = element.trigger;
33-
34-
btn.innerHTML = 'copied!';
35-
36-
setTimeout(() => {
37-
btn.innerHTML = 'copy';
38-
}, 1000);
39-
});
27+
element.clearSelection()
28+
29+
const btn = element.trigger
30+
31+
btn.innerHTML = 'copied!'
32+
33+
setTimeout(() => {
34+
btn.innerHTML = 'copy'
35+
}, 1000)
36+
})

resources/js/features/dark-mode.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
document.addEventListener('DOMContentLoad', () => {
2-
const browserDark = window.matchMedia('(prefers-color-scheme: dark)').matches
3-
const preferDark = JSON.parse(window.localStorage.getItem('dark'))
2+
const preferDark = JSON.parse(window.localStorage.getItem('dark'))
3+
const browserDark = window.matchMedia('(prefers-color-scheme: dark)').matches && preferDark !== null
44

5-
if ((preferDark !== null && browserDark) || preferDark) {
6-
document.body.classList.add('dark')
7-
}
5+
if (browserDark || preferDark === true) {
6+
document.body.classList.add('dark')
7+
}
88
})

tailwind.config.js

+42-44
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
11
module.exports = {
2-
presets: [
3-
require('./vendor/wireui/wireui/tailwind.config.js')
4-
],
5-
content: [
6-
'./app/Http/Livewire/**/*.php',
7-
'./app/View/**/*.php',
8-
'./resources/**/*.blade.php',
9-
'./resources/**/*.js',
10-
'./storage/framework/views/*.php',
11-
'./storage/framework/views/**/*.blade.php',
12-
'./vendor/wireui/wireui/resources/**/*.blade.php',
13-
'./vendor/wireui/wireui/ts/**/*.ts',
14-
'./vendor/wireui/wireui/src/View/**/*.php'
15-
],
16-
theme: {
17-
extend: {
18-
boxShadow: {
19-
soft: '3px 3px 16px #446b8d33',
20-
},
21-
zIndex: {
22-
'55': '55',
23-
'60': '60',
24-
},
25-
spacing: {
26-
'18': '4.5rem',
27-
'72': '18rem',
28-
'84': '21rem',
29-
'96': '24rem',
30-
},
31-
screens: {
32-
'3xl': '1600px',
33-
'4xl': '2560px',
34-
},
35-
maxWidth: {
36-
'8xl': '90rem',
37-
'9xl': '95rem'
38-
}
39-
},
40-
},
41-
plugins: [
42-
require('@tailwindcss/aspect-ratio'),
43-
require('@tailwindcss/forms'),
44-
require('@tailwindcss/typography')
45-
],
2+
presets: [require('./vendor/wireui/wireui/tailwind.config.js')],
3+
content: [
4+
'./app/Http/Livewire/**/*.php',
5+
'./app/View/**/*.php',
6+
'./resources/**/*.blade.php',
7+
'./resources/**/*.js',
8+
'./storage/framework/views/*.php',
9+
'./storage/framework/views/**/*.blade.php',
10+
'./vendor/wireui/wireui/resources/**/*.blade.php',
11+
'./vendor/wireui/wireui/ts/**/*.ts',
12+
'./vendor/wireui/wireui/src/View/**/*.php'
13+
],
14+
theme: {
15+
extend: {
16+
boxShadow: {
17+
soft: '3px 3px 16px #446b8d33'
18+
},
19+
zIndex: {
20+
'55': '55',
21+
'60': '60'
22+
},
23+
spacing: {
24+
'18': '4.5rem',
25+
'72': '18rem',
26+
'84': '21rem',
27+
'96': '24rem'
28+
},
29+
screens: {
30+
'3xl': '1600px',
31+
'4xl': '2560px'
32+
},
33+
maxWidth: {
34+
'8xl': '90rem',
35+
'9xl': '95rem'
36+
}
37+
}
38+
},
39+
plugins: [
40+
require('@tailwindcss/aspect-ratio'),
41+
require('@tailwindcss/forms'),
42+
require('@tailwindcss/typography')
43+
]
4644
}

webpack.mix.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ const mix = require('laravel-mix')
22
const tailwindcss = require('tailwindcss')
33

44
mix.js('resources/js/alpine.js', 'public/dist/alpine.js')
5-
.js('resources/js/app.js', 'public/dist/app.js')
6-
.sass('resources/scss/app.scss', 'public/dist/app.css')
7-
.options({
8-
processCssUrls: false,
9-
postCss: [tailwindcss('./tailwind.config.js')]
10-
})
5+
.js('resources/js/app.js', 'public/dist/app.js')
6+
.sass('resources/scss/app.scss', 'public/dist/app.css')
7+
.options({
8+
processCssUrls: false,
9+
postCss: [tailwindcss('./tailwind.config.js')]
10+
})
1111

1212
if (mix.inProduction()) {
13-
mix.version()
13+
mix.version()
1414
}
1515

1616
mix.disableSuccessNotifications()

0 commit comments

Comments
 (0)