chore: update @nuxtjs/eslint-config to v2 and fix lint errors (#6732)

This commit is contained in:
Xin Du (Clark) 2019-11-26 22:42:39 +00:00 committed by Pooya Parsa
parent d83761028e
commit e8aca9eb11
67 changed files with 820 additions and 737 deletions

View File

@ -10,8 +10,8 @@ export default ({ app, store }) => {
locale: store.state.locale,
fallbackLocale: 'en',
messages: {
'en': require('~/locales/en.json'),
'fr': require('~/locales/fr.json')
en: require('~/locales/en.json'),
fr: require('~/locales/fr.json')
}
})

View File

@ -33,6 +33,15 @@
import axios from 'axios'
export default {
async asyncData ({ query }) {
const page = +(query.page || 1)
const { data } = await axios.get(`https://reqres.in/api/users?page=${page}`)
return {
page,
totalPages: data.total_pages,
users: data.data
}
},
data () {
return {
transitionName: this.getTransitionName(this.page)
@ -49,15 +58,6 @@ export default {
this.$nuxt.$loading.finish()
}
},
async asyncData ({ query }) {
const page = +(query.page || 1)
const { data } = await axios.get(`https://reqres.in/api/users?page=${page}`)
return {
page,
totalPages: data.total_pages,
users: data.data
}
},
methods: {
getTransitionName (newPage) {
return newPage < this.page ? 'slide-right' : 'slide-left'

View File

@ -15,14 +15,14 @@
import TwitterHeadCard from '~/components/twitter-head-card.vue'
export default {
components: {
TwitterHeadCard
},
head: {
title: 'About Page',
meta: [
{ hid: 'description', name: 'description', content: 'About page description' }
]
},
components: {
TwitterHeadCard
}
}
</script>

View File

@ -42,22 +42,22 @@ View the full documentation at https://tailwindcss.com.
*/
const colors = {
'transparent': 'transparent',
transparent: 'transparent',
'black': '#22292f',
black: '#22292f',
'grey-darkest': '#3d4852',
'grey-darker': '#606f7b',
'grey-dark': '#8795a1',
'grey': '#b8c2cc',
grey: '#b8c2cc',
'grey-light': '#dae1e7',
'grey-lighter': '#f1f5f8',
'grey-lightest': '#f8fafc',
'white': '#ffffff',
white: '#ffffff',
'red-darkest': '#3b0d0c',
'red-darker': '#621b18',
'red-dark': '#cc1f1a',
'red': '#e3342f',
red: '#e3342f',
'red-light': '#ef5753',
'red-lighter': '#f9acaa',
'red-lightest': '#fcebea',
@ -65,7 +65,7 @@ const colors = {
'orange-darkest': '#462a16',
'orange-darker': '#613b1f',
'orange-dark': '#de751f',
'orange': '#f6993f',
orange: '#f6993f',
'orange-light': '#faad63',
'orange-lighter': '#fcd9b6',
'orange-lightest': '#fff5eb',
@ -73,7 +73,7 @@ const colors = {
'yellow-darkest': '#453411',
'yellow-darker': '#684f1d',
'yellow-dark': '#f2d024',
'yellow': '#ffed4a',
yellow: '#ffed4a',
'yellow-light': '#fff382',
'yellow-lighter': '#fff9c2',
'yellow-lightest': '#fcfbeb',
@ -81,7 +81,7 @@ const colors = {
'green-darkest': '#0f2f21',
'green-darker': '#1a4731',
'green-dark': '#1f9d55',
'green': '#38c172',
green: '#38c172',
'green-light': '#51d88a',
'green-lighter': '#a2f5bf',
'green-lightest': '#e3fcec',
@ -89,7 +89,7 @@ const colors = {
'teal-darkest': '#0d3331',
'teal-darker': '#20504f',
'teal-dark': '#38a89d',
'teal': '#4dc0b5',
teal: '#4dc0b5',
'teal-light': '#64d5ca',
'teal-lighter': '#a0f0ed',
'teal-lightest': '#e8fffe',
@ -97,7 +97,7 @@ const colors = {
'blue-darkest': '#12283a',
'blue-darker': '#1c3d5a',
'blue-dark': '#2779bd',
'blue': '#3490dc',
blue: '#3490dc',
'blue-light': '#6cb2eb',
'blue-lighter': '#bcdefa',
'blue-lightest': '#eff8ff',
@ -105,7 +105,7 @@ const colors = {
'indigo-darkest': '#191e38',
'indigo-darker': '#2f365f',
'indigo-dark': '#5661b3',
'indigo': '#6574cd',
indigo: '#6574cd',
'indigo-light': '#7886d7',
'indigo-lighter': '#b2b7ff',
'indigo-lightest': '#e6e8ff',
@ -113,7 +113,7 @@ const colors = {
'purple-darkest': '#21183c',
'purple-darker': '#382b5f',
'purple-dark': '#794acf',
'purple': '#9561e2',
purple: '#9561e2',
'purple-light': '#a779e9',
'purple-lighter': '#d6bbfc',
'purple-lightest': '#f3ebff',
@ -121,7 +121,7 @@ const colors = {
'pink-darkest': '#451225',
'pink-darker': '#6f213f',
'pink-dark': '#eb5286',
'pink': '#f66d9b',
pink: '#f66d9b',
'pink-light': '#fa7ea8',
'pink-lighter': '#ffbbca',
'pink-lightest': '#ffebef'
@ -164,10 +164,10 @@ module.exports = {
*/
screens: {
'sm': '576px',
'md': '768px',
'lg': '992px',
'xl': '1200px'
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px'
},
/*
@ -189,7 +189,7 @@ module.exports = {
*/
fonts: {
'sans': [
sans: [
'system-ui',
'BlinkMacSystemFont',
'-apple-system',
@ -203,7 +203,7 @@ module.exports = {
'Helvetica Neue',
'sans-serif'
],
'serif': [
serif: [
'Constantia',
'Lucida Bright',
'Lucidabright',
@ -215,7 +215,7 @@ module.exports = {
'Georgia',
'serif'
],
'mono': [
mono: [
'Menlo',
'Monaco',
'Consolas',
@ -245,11 +245,11 @@ module.exports = {
*/
textSizes: {
'xs': '.75rem', // 12px
'sm': '.875rem', // 14px
'base': '1rem', // 16px
'lg': '1.125rem', // 18px
'xl': '1.25rem', // 20px
xs: '.75rem', // 12px
sm: '.875rem', // 14px
base: '1rem', // 16px
lg: '1.125rem', // 18px
xl: '1.25rem', // 20px
'2xl': '1.5rem', // 24px
'3xl': '1.875rem', // 30px
'4xl': '2.25rem', // 36px
@ -271,15 +271,15 @@ module.exports = {
*/
fontWeights: {
'hairline': 100,
'thin': 200,
'light': 300,
'normal': 400,
'medium': 500,
'semibold': 600,
'bold': 700,
'extrabold': 800,
'black': 900
hairline: 100,
thin: 200,
light: 300,
normal: 400,
medium: 500,
semibold: 600,
bold: 700,
extrabold: 800,
black: 900
},
/*
@ -295,10 +295,10 @@ module.exports = {
*/
leading: {
'none': 1,
'tight': 1.25,
'normal': 1.5,
'loose': 2
none: 1,
tight: 1.25,
normal: 1.5,
loose: 2
},
/*
@ -314,9 +314,9 @@ module.exports = {
*/
tracking: {
'tight': '-0.05em',
'normal': '0',
'wide': '0.05em'
tight: '-0.05em',
normal: '0',
wide: '0.05em'
},
/*
@ -363,9 +363,9 @@ module.exports = {
*/
backgroundSize: {
'auto': 'auto',
'cover': 'cover',
'contain': 'contain'
auto: 'auto',
cover: 'cover',
contain: 'contain'
},
/*
@ -383,10 +383,10 @@ module.exports = {
borderWidths: {
default: '1px',
'0': '0',
'2': '2px',
'4': '4px',
'8': '8px'
0: '0',
2: '2px',
4: '4px',
8: '8px'
},
/*
@ -425,11 +425,11 @@ module.exports = {
*/
borderRadius: {
'none': '0',
'sm': '.125rem',
none: '0',
sm: '.125rem',
default: '.25rem',
'lg': '.5rem',
'full': '9999px'
lg: '.5rem',
full: '9999px'
},
/*
@ -453,22 +453,22 @@ module.exports = {
*/
width: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
@ -480,8 +480,8 @@ module.exports = {
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'full': '100%',
'screen': '100vw'
full: '100%',
screen: '100vw'
},
/*
@ -500,24 +500,24 @@ module.exports = {
*/
height: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'full': '100%',
'screen': '100vh'
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
full: '100%',
screen: '100vh'
},
/*
@ -535,8 +535,8 @@ module.exports = {
*/
minWidth: {
'0': '0',
'full': '100%'
0: '0',
full: '100%'
},
/*
@ -554,9 +554,9 @@ module.exports = {
*/
minHeight: {
'0': '0',
'full': '100%',
'screen': '100vh'
0: '0',
full: '100%',
screen: '100vh'
},
/*
@ -575,16 +575,16 @@ module.exports = {
*/
maxWidth: {
'xs': '20rem',
'sm': '30rem',
'md': '40rem',
'lg': '50rem',
'xl': '60rem',
xs: '20rem',
sm: '30rem',
md: '40rem',
lg: '50rem',
xl: '60rem',
'2xl': '70rem',
'3xl': '80rem',
'4xl': '90rem',
'5xl': '100rem',
'full': '100%'
full: '100%'
},
/*
@ -602,8 +602,8 @@ module.exports = {
*/
maxHeight: {
'full': '100%',
'screen': '100vh'
full: '100%',
screen: '100vh'
},
/*
@ -622,21 +622,21 @@ module.exports = {
*/
padding: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
20: '5rem',
24: '6rem',
32: '8rem'
},
/*
@ -655,22 +655,22 @@ module.exports = {
*/
margin: {
'auto': 'auto',
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem'
auto: 'auto',
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
20: '5rem',
24: '6rem',
32: '8rem'
},
/*
@ -689,21 +689,21 @@ module.exports = {
*/
negativeMargin: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
5: '1.25rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
20: '5rem',
24: '6rem',
32: '8rem'
},
/*
@ -724,11 +724,11 @@ module.exports = {
shadows: {
default: '0 2px 4px 0 rgba(0,0,0,0.10)',
'md': '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
'lg': '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
'inner': 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
'outline': '0 0 0 3px rgba(52,144,220,0.5)',
'none': 'none'
md: '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
lg: '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
outline: '0 0 0 3px rgba(52,144,220,0.5)',
none: 'none'
},
/*
@ -745,13 +745,13 @@ module.exports = {
*/
zIndex: {
'auto': 'auto',
'0': 0,
'10': 10,
'20': 20,
'30': 30,
'40': 40,
'50': 50
auto: 'auto',
0: 0,
10: 10,
20: 20,
30: 30,
40: 40,
50: 50
},
/*
@ -768,11 +768,11 @@ module.exports = {
*/
opacity: {
'0': '0',
'25': '.25',
'50': '.5',
'75': '.75',
'100': '1'
0: '0',
25: '.25',
50: '.5',
75: '.75',
100: '1'
},
/*
@ -790,7 +790,7 @@ module.exports = {
*/
svgFill: {
'current': 'currentColor'
current: 'currentColor'
},
/*
@ -808,7 +808,7 @@ module.exports = {
*/
svgStroke: {
'current': 'currentColor'
current: 'currentColor'
},
/*

View File

@ -42,22 +42,22 @@ View the full documentation at https://tailwindcss.com.
*/
const colors = {
'transparent': 'transparent',
transparent: 'transparent',
'black': '#222b2f',
black: '#222b2f',
'grey-darkest': '#364349',
'grey-darker': '#596a73',
'grey-dark': '#70818a',
'grey': '#9babb4',
grey: '#9babb4',
'grey-light': '#dae4e9',
'grey-lighter': '#f3f7f9',
'grey-lightest': '#fafcfc',
'white': '#ffffff',
white: '#ffffff',
'red-darkest': '#420806',
'red-darker': '#6a1b19',
'red-dark': '#cc1f1a',
'red': '#e3342f',
red: '#e3342f',
'red-light': '#ef5753',
'red-lighter': '#f9acaa',
'red-lightest': '#fcebea',
@ -65,7 +65,7 @@ const colors = {
'orange-darkest': '#542605',
'orange-darker': '#7f4012',
'orange-dark': '#de751f',
'orange': '#f6993f',
orange: '#f6993f',
'orange-light': '#faad63',
'orange-lighter': '#fcd9b6',
'orange-lightest': '#fff5eb',
@ -73,7 +73,7 @@ const colors = {
'yellow-darkest': '#453411',
'yellow-darker': '#684f1d',
'yellow-dark': '#f2d024',
'yellow': '#ffed4a',
yellow: '#ffed4a',
'yellow-light': '#fff382',
'yellow-lighter': '#fff9c2',
'yellow-lightest': '#fcfbeb',
@ -81,7 +81,7 @@ const colors = {
'green-darkest': '#032d19',
'green-darker': '#0b4228',
'green-dark': '#1f9d55',
'green': '#38c172',
green: '#38c172',
'green-light': '#51d88a',
'green-lighter': '#a2f5bf',
'green-lightest': '#e3fcec',
@ -89,7 +89,7 @@ const colors = {
'teal-darkest': '#0d3331',
'teal-darker': '#174e4b',
'teal-dark': '#38a89d',
'teal': '#4dc0b5',
teal: '#4dc0b5',
'teal-light': '#64d5ca',
'teal-lighter': '#a0f0ed',
'teal-lightest': '#e8fffe',
@ -97,7 +97,7 @@ const colors = {
'blue-darkest': '#05233b',
'blue-darker': '#103d60',
'blue-dark': '#2779bd',
'blue': '#3490dc',
blue: '#3490dc',
'blue-light': '#6cb2eb',
'blue-lighter': '#bcdefa',
'blue-lightest': '#eff8ff',
@ -105,7 +105,7 @@ const colors = {
'indigo-darkest': '#191e38',
'indigo-darker': '#2f365f',
'indigo-dark': '#5661b3',
'indigo': '#6574cd',
indigo: '#6574cd',
'indigo-light': '#7886d7',
'indigo-lighter': '#b2b7ff',
'indigo-lightest': '#e6e8ff',
@ -113,7 +113,7 @@ const colors = {
'purple-darkest': '#1f133f',
'purple-darker': '#352465',
'purple-dark': '#794acf',
'purple': '#9561e2',
purple: '#9561e2',
'purple-light': '#a779e9',
'purple-lighter': '#d6bbfc',
'purple-lightest': '#f3ebff',
@ -121,7 +121,7 @@ const colors = {
'pink-darkest': '#45051e',
'pink-darker': '#72173a',
'pink-dark': '#eb5286',
'pink': '#f66d9b',
pink: '#f66d9b',
'pink-light': '#fa7ea8',
'pink-lighter': '#ffbbca',
'pink-lightest': '#ffebef'
@ -164,10 +164,10 @@ export default {
*/
screens: {
'sm': '576px',
'md': '768px',
'lg': '992px',
'xl': '1200px'
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px'
},
/*
@ -189,7 +189,7 @@ export default {
*/
fonts: {
'sans': [
sans: [
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
@ -201,7 +201,7 @@ export default {
'Droid Sans',
'Helvetica Neue'
],
'serif': [
serif: [
'Constantia',
'Lucida Bright',
'Lucidabright',
@ -213,7 +213,7 @@ export default {
'Georgia',
'serif'
],
'mono': [
mono: [
'Menlo',
'Monaco',
'Consolas',
@ -243,11 +243,11 @@ export default {
*/
textSizes: {
'xs': '.75rem', // 12px
'sm': '.875rem', // 14px
'base': '1rem', // 16px
'lg': '1.125rem', // 18px
'xl': '1.25rem', // 20px
xs: '.75rem', // 12px
sm: '.875rem', // 14px
base: '1rem', // 16px
lg: '1.125rem', // 18px
xl: '1.25rem', // 20px
'2xl': '1.5rem', // 24px
'3xl': '1.875rem', // 30px
'4xl': '2.25rem', // 36px
@ -269,15 +269,15 @@ export default {
*/
fontWeights: {
'hairline': 100,
'thin': 200,
'light': 300,
'normal': 400,
'medium': 500,
'semibold': 600,
'bold': 700,
'extrabold': 800,
'black': 900
hairline: 100,
thin: 200,
light: 300,
normal: 400,
medium: 500,
semibold: 600,
bold: 700,
extrabold: 800,
black: 900
},
/*
@ -293,10 +293,10 @@ export default {
*/
leading: {
'none': 1,
'tight': 1.25,
'normal': 1.5,
'loose': 2
none: 1,
tight: 1.25,
normal: 1.5,
loose: 2
},
/*
@ -312,9 +312,9 @@ export default {
*/
tracking: {
'tight': '-0.05em',
'normal': '0',
'wide': '0.05em'
tight: '-0.05em',
normal: '0',
wide: '0.05em'
},
/*
@ -362,10 +362,10 @@ export default {
borderWidths: {
default: '1px',
'0': '0',
'2': '2px',
'4': '4px',
'8': '8px'
0: '0',
2: '2px',
4: '4px',
8: '8px'
},
/*
@ -402,10 +402,10 @@ export default {
borderRadius: {
default: '.25rem',
'sm': '.125rem',
'lg': '.5rem',
'full': '9999px',
'none': '0'
sm: '.125rem',
lg: '.5rem',
full: '9999px',
none: '0'
},
/*
@ -429,21 +429,21 @@ export default {
*/
width: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
@ -455,8 +455,8 @@ export default {
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'full': '100%',
'screen': '100vw'
full: '100%',
screen: '100vw'
},
/*
@ -475,23 +475,23 @@ export default {
*/
height: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'full': '100%',
'screen': '100vh'
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
full: '100%',
screen: '100vh'
},
/*
@ -509,8 +509,8 @@ export default {
*/
minWidth: {
'0': '0',
'full': '100%'
0: '0',
full: '100%'
},
/*
@ -528,9 +528,9 @@ export default {
*/
minHeight: {
'0': '0',
'full': '100%',
'screen': '100vh'
0: '0',
full: '100%',
screen: '100vh'
},
/*
@ -549,16 +549,16 @@ export default {
*/
maxWidth: {
'xs': '20rem',
'sm': '30rem',
'md': '40rem',
'lg': '50rem',
'xl': '60rem',
xs: '20rem',
sm: '30rem',
md: '40rem',
lg: '50rem',
xl: '60rem',
'2xl': '70rem',
'3xl': '80rem',
'4xl': '90rem',
'5xl': '100rem',
'full': '100%'
full: '100%'
},
/*
@ -576,8 +576,8 @@ export default {
*/
maxHeight: {
'full': '100%',
'screen': '100vh'
full: '100%',
screen: '100vh'
},
/*
@ -596,14 +596,14 @@ export default {
*/
padding: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -622,14 +622,14 @@ export default {
*/
margin: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -648,14 +648,14 @@ export default {
*/
negativeMargin: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -676,10 +676,10 @@ export default {
shadows: {
default: '0 2px 4px 0 rgba(0,0,0,0.10)',
'md': '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
'lg': '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
'inner': 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
'none': 'none'
md: '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
lg: '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
none: 'none'
},
/*
@ -696,13 +696,13 @@ export default {
*/
zIndex: {
'0': 0,
'10': 10,
'20': 20,
'30': 30,
'40': 40,
'50': 50,
'auto': 'auto'
0: 0,
10: 10,
20: 20,
30: 30,
40: 40,
50: 50,
auto: 'auto'
},
/*
@ -719,11 +719,11 @@ export default {
*/
opacity: {
'0': '0',
'25': '.25',
'50': '.5',
'75': '.75',
'100': '1'
0: '0',
25: '.25',
50: '.5',
75: '.75',
100: '1'
},
/*

View File

@ -27,14 +27,14 @@
import { mapState } from 'vuex'
export default {
computed: mapState([
'counter'
]),
// fetch(context) is called by the server-side
// and before instantiating the component
fetch ({ store }) {
store.commit('increment')
},
computed: mapState([
'counter'
]),
methods: {
increment () {
this.$store.commit('increment')

View File

@ -24,11 +24,11 @@
import Byline from '../components/Byline'
export default {
head: {
title: 'The Dog'
},
components: {
Byline
},
head: {
title: 'The Dog'
}
}
</script>

View File

@ -24,11 +24,11 @@
import Byline from '~/components/Byline'
export default {
head: {
title: 'The Cat'
},
components: {
Byline
},
head: {
title: 'The Cat'
}
}
</script>

View File

@ -42,22 +42,22 @@ View the full documentation at https://tailwindcss.com.
*/
const colors = {
'transparent': 'transparent',
transparent: 'transparent',
'black': '#222b2f',
black: '#222b2f',
'grey-darkest': '#364349',
'grey-darker': '#596a73',
'grey-dark': '#70818a',
'grey': '#9babb4',
grey: '#9babb4',
'grey-light': '#dae4e9',
'grey-lighter': '#f3f7f9',
'grey-lightest': '#fafcfc',
'white': '#ffffff',
white: '#ffffff',
'red-darkest': '#420806',
'red-darker': '#6a1b19',
'red-dark': '#cc1f1a',
'red': '#e3342f',
red: '#e3342f',
'red-light': '#ef5753',
'red-lighter': '#f9acaa',
'red-lightest': '#fcebea',
@ -65,7 +65,7 @@ const colors = {
'orange-darkest': '#542605',
'orange-darker': '#7f4012',
'orange-dark': '#de751f',
'orange': '#f6993f',
orange: '#f6993f',
'orange-light': '#faad63',
'orange-lighter': '#fcd9b6',
'orange-lightest': '#fff5eb',
@ -73,7 +73,7 @@ const colors = {
'yellow-darkest': '#453411',
'yellow-darker': '#684f1d',
'yellow-dark': '#f2d024',
'yellow': '#ffed4a',
yellow: '#ffed4a',
'yellow-light': '#fff382',
'yellow-lighter': '#fff9c2',
'yellow-lightest': '#fcfbeb',
@ -81,7 +81,7 @@ const colors = {
'green-darkest': '#032d19',
'green-darker': '#0b4228',
'green-dark': '#1f9d55',
'green': '#38c172',
green: '#38c172',
'green-light': '#51d88a',
'green-lighter': '#a2f5bf',
'green-lightest': '#e3fcec',
@ -89,7 +89,7 @@ const colors = {
'teal-darkest': '#0d3331',
'teal-darker': '#174e4b',
'teal-dark': '#38a89d',
'teal': '#4dc0b5',
teal: '#4dc0b5',
'teal-light': '#64d5ca',
'teal-lighter': '#a0f0ed',
'teal-lightest': '#e8fffe',
@ -97,7 +97,7 @@ const colors = {
'blue-darkest': '#05233b',
'blue-darker': '#103d60',
'blue-dark': '#2779bd',
'blue': '#3490dc',
blue: '#3490dc',
'blue-light': '#6cb2eb',
'blue-lighter': '#bcdefa',
'blue-lightest': '#eff8ff',
@ -105,7 +105,7 @@ const colors = {
'indigo-darkest': '#191e38',
'indigo-darker': '#2f365f',
'indigo-dark': '#5661b3',
'indigo': '#6574cd',
indigo: '#6574cd',
'indigo-light': '#7886d7',
'indigo-lighter': '#b2b7ff',
'indigo-lightest': '#e6e8ff',
@ -113,7 +113,7 @@ const colors = {
'purple-darkest': '#1f133f',
'purple-darker': '#352465',
'purple-dark': '#794acf',
'purple': '#9561e2',
purple: '#9561e2',
'purple-light': '#a779e9',
'purple-lighter': '#d6bbfc',
'purple-lightest': '#f3ebff',
@ -121,7 +121,7 @@ const colors = {
'pink-darkest': '#45051e',
'pink-darker': '#72173a',
'pink-dark': '#eb5286',
'pink': '#f66d9b',
pink: '#f66d9b',
'pink-light': '#fa7ea8',
'pink-lighter': '#ffbbca',
'pink-lightest': '#ffebef'
@ -164,10 +164,10 @@ export default {
*/
screens: {
'sm': '576px',
'md': '768px',
'lg': '992px',
'xl': '1200px'
sm: '576px',
md: '768px',
lg: '992px',
xl: '1200px'
},
/*
@ -189,7 +189,7 @@ export default {
*/
fonts: {
'sans': [
sans: [
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI',
@ -201,7 +201,7 @@ export default {
'Droid Sans',
'Helvetica Neue'
],
'serif': [
serif: [
'Constantia',
'Lucida Bright',
'Lucidabright',
@ -213,7 +213,7 @@ export default {
'Georgia',
'serif'
],
'mono': [
mono: [
'Menlo',
'Monaco',
'Consolas',
@ -243,11 +243,11 @@ export default {
*/
textSizes: {
'xs': '.75rem', // 12px
'sm': '.875rem', // 14px
'base': '1rem', // 16px
'lg': '1.125rem', // 18px
'xl': '1.25rem', // 20px
xs: '.75rem', // 12px
sm: '.875rem', // 14px
base: '1rem', // 16px
lg: '1.125rem', // 18px
xl: '1.25rem', // 20px
'2xl': '1.5rem', // 24px
'3xl': '1.875rem', // 30px
'4xl': '2.25rem', // 36px
@ -269,15 +269,15 @@ export default {
*/
fontWeights: {
'hairline': 100,
'thin': 200,
'light': 300,
'normal': 400,
'medium': 500,
'semibold': 600,
'bold': 700,
'extrabold': 800,
'black': 900
hairline: 100,
thin: 200,
light: 300,
normal: 400,
medium: 500,
semibold: 600,
bold: 700,
extrabold: 800,
black: 900
},
/*
@ -293,10 +293,10 @@ export default {
*/
leading: {
'none': 1,
'tight': 1.25,
'normal': 1.5,
'loose': 2
none: 1,
tight: 1.25,
normal: 1.5,
loose: 2
},
/*
@ -312,9 +312,9 @@ export default {
*/
tracking: {
'tight': '-0.05em',
'normal': '0',
'wide': '0.05em'
tight: '-0.05em',
normal: '0',
wide: '0.05em'
},
/*
@ -362,10 +362,10 @@ export default {
borderWidths: {
default: '1px',
'0': '0',
'2': '2px',
'4': '4px',
'8': '8px'
0: '0',
2: '2px',
4: '4px',
8: '8px'
},
/*
@ -402,10 +402,10 @@ export default {
borderRadius: {
default: '.25rem',
'sm': '.125rem',
'lg': '.5rem',
'full': '9999px',
'none': '0'
sm: '.125rem',
lg: '.5rem',
full: '9999px',
none: '0'
},
/*
@ -429,21 +429,21 @@ export default {
*/
width: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
@ -455,8 +455,8 @@ export default {
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'full': '100%',
'screen': '100vw'
full: '100%',
screen: '100vw'
},
/*
@ -475,23 +475,23 @@ export default {
*/
height: {
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'full': '100%',
'screen': '100vh'
auto: 'auto',
px: '1px',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem',
10: '2.5rem',
12: '3rem',
16: '4rem',
24: '6rem',
32: '8rem',
48: '12rem',
64: '16rem',
full: '100%',
screen: '100vh'
},
/*
@ -509,8 +509,8 @@ export default {
*/
minWidth: {
'0': '0',
'full': '100%'
0: '0',
full: '100%'
},
/*
@ -528,9 +528,9 @@ export default {
*/
minHeight: {
'0': '0',
'full': '100%',
'screen': '100vh'
0: '0',
full: '100%',
screen: '100vh'
},
/*
@ -549,16 +549,16 @@ export default {
*/
maxWidth: {
'xs': '20rem',
'sm': '30rem',
'md': '40rem',
'lg': '50rem',
'xl': '60rem',
xs: '20rem',
sm: '30rem',
md: '40rem',
lg: '50rem',
xl: '60rem',
'2xl': '70rem',
'3xl': '80rem',
'4xl': '90rem',
'5xl': '100rem',
'full': '100%'
full: '100%'
},
/*
@ -576,8 +576,8 @@ export default {
*/
maxHeight: {
'full': '100%',
'screen': '100vh'
full: '100%',
screen: '100vh'
},
/*
@ -596,14 +596,14 @@ export default {
*/
padding: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -622,14 +622,14 @@ export default {
*/
margin: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -648,14 +648,14 @@ export default {
*/
negativeMargin: {
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'6': '1.5rem',
'8': '2rem'
px: '1px',
0: '0',
1: '0.25rem',
2: '0.5rem',
3: '0.75rem',
4: '1rem',
6: '1.5rem',
8: '2rem'
},
/*
@ -676,10 +676,10 @@ export default {
shadows: {
default: '0 2px 4px 0 rgba(0,0,0,0.10)',
'md': '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
'lg': '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
'inner': 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
'none': 'none'
md: '0 4px 8px 0 rgba(0,0,0,0.12), 0 2px 4px 0 rgba(0,0,0,0.08)',
lg: '0 15px 30px 0 rgba(0,0,0,0.11), 0 5px 15px 0 rgba(0,0,0,0.08)',
inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
none: 'none'
},
/*
@ -696,13 +696,13 @@ export default {
*/
zIndex: {
'0': 0,
'10': 10,
'20': 20,
'30': 30,
'40': 40,
'50': 50,
'auto': 'auto'
0: 0,
10: 10,
20: 20,
30: 30,
40: 40,
50: 50,
auto: 'auto'
},
/*
@ -719,11 +719,11 @@ export default {
*/
opacity: {
'0': '0',
'25': '.25',
'50': '.5',
'75': '.75',
'100': '1'
0: '0',
25: '.25',
50: '.5',
75: '.75',
100: '1'
},
/*

View File

@ -21,9 +21,6 @@
import socket from '~/plugins/socket.io.js'
export default {
watch: {
'messages': 'scrollToBottom'
},
asyncData (context, callback) {
socket.emit('last-messages', function (messages) {
callback(null, {
@ -32,6 +29,9 @@ export default {
})
})
},
watch: {
messages: 'scrollToBottom'
},
beforeMount () {
socket.on('new-message', (message) => {
this.messages.push(message)

View File

@ -8,15 +8,15 @@
<script>
export default {
head () {
return {
title: 'vux demo'
}
},
methods: {
alert () {
this.$vux.alert.show('This is a Alert example.')
}
},
head () {
return {
title: 'vux demo'
}
}
}
</script>

View File

@ -32,7 +32,7 @@
"devDependencies": {
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@nuxtjs/eslint-config": "^1.1.2",
"@nuxtjs/eslint-config": "^2.0.0",
"@vue/server-test-utils": "^1.0.0-beta.29",
"@vue/test-utils": "^1.0.0-beta.29",
"babel-eslint": "^10.0.3",

View File

@ -44,7 +44,7 @@ describe('builder: builder generate', () => {
nuxt.options.build = {
template: {
dir: '/var/nuxt/src/template',
files: [ 'App.js', 'index.js' ]
files: ['App.js', 'index.js']
},
watch: []
}
@ -112,7 +112,7 @@ describe('builder: builder generate', () => {
test('should resolve relative files', async () => {
const nuxt = createNuxt()
const builder = new Builder(nuxt, BundleBuilder)
builder.resolveFiles = jest.fn(dir => [ `${dir}/foo.vue`, `${dir}/bar.vue`, `${dir}/baz.vue` ])
builder.resolveFiles = jest.fn(dir => [`${dir}/foo.vue`, `${dir}/bar.vue`, `${dir}/baz.vue`])
const files = await builder.resolveRelative('/var/nuxt/dir')
@ -147,12 +147,12 @@ describe('builder: builder generate', () => {
await builder.resolveStore({ templateVars, templateFiles })
expect(templateVars.storeModules).toEqual([
{ 'src': '/var/nuxt/src/store/index.js' },
{ 'src': '/var/nuxt/src/store/bar.js' },
{ 'src': '/var/nuxt/src/store/baz.js' },
{ 'src': '/var/nuxt/src/store/foo/index.js' },
{ 'src': '/var/nuxt/src/store/foo/bar.js' },
{ 'src': '/var/nuxt/src/store/foo/baz.js' }]
{ src: '/var/nuxt/src/store/index.js' },
{ src: '/var/nuxt/src/store/bar.js' },
{ src: '/var/nuxt/src/store/baz.js' },
{ src: '/var/nuxt/src/store/foo/index.js' },
{ src: '/var/nuxt/src/store/foo/bar.js' },
{ src: '/var/nuxt/src/store/foo/baz.js' }]
)
expect(templateFiles).toEqual(['store.js'])
})
@ -398,7 +398,7 @@ describe('builder: builder generate', () => {
resolveAlias: nuxt.resolver.resolveAlias,
relativeToBuild: builder.relativeToBuild
})
expect(nuxt.options.build.watch).toEqual([ '/var/nuxt/src/baz.js' ])
expect(nuxt.options.build.watch).toEqual(['/var/nuxt/src/baz.js'])
expect(fs.readFile).toBeCalledTimes(3)
expect(fs.readFile).nthCalledWith(1, '/var/nuxt/src/foo.js', 'utf8')
expect(fs.readFile).nthCalledWith(2, '/var/nuxt/src/bar.js', 'utf8')
@ -448,7 +448,7 @@ describe('builder: builder generate', () => {
const templateContext = {
templateVars: { test: 'template_vars' },
templateFiles: [ { src: '/var/nuxt/src/foo.js' } ],
templateFiles: [{ src: '/var/nuxt/src/foo.js' }],
templateOptions: {}
}
await expect(builder.compileTemplates(templateContext)).rejects.toThrow(
@ -569,8 +569,8 @@ describe('builder: builder generate', () => {
test('should resolve routes via build.createRoutes', async () => {
const nuxt = createNuxt()
nuxt.options.srcDir = '/var/nuxt/src'
nuxt.options.build.createRoutes = jest.fn(() => [ { name: 'default_route' } ])
nuxt.options.router.extendRoutes = jest.fn(routes => [ ...routes, { name: 'extend_route' } ])
nuxt.options.build.createRoutes = jest.fn(() => [{ name: 'default_route' }])
nuxt.options.router.extendRoutes = jest.fn(routes => [...routes, { name: 'extend_route' }])
const builder = new Builder(nuxt, BundleBuilder)
const templateVars = {
@ -587,11 +587,11 @@ describe('builder: builder generate', () => {
expect(nuxt.callHook).toBeCalledTimes(1)
expect(nuxt.callHook).toBeCalledWith(
'build:extendRoutes',
[ { name: 'default_route' } ],
[{ name: 'default_route' }],
r
)
expect(nuxt.options.router.extendRoutes).toBeCalledTimes(1)
expect(nuxt.options.router.extendRoutes).toBeCalledWith([ { name: 'default_route' } ], r)
expect(nuxt.options.router.extendRoutes).toBeCalledWith([{ name: 'default_route' }], r)
expect(templateVars.router.routes).toEqual([
{ name: 'default_route' },
{ name: 'extend_route' }
@ -608,7 +608,7 @@ describe('builder: builder generate', () => {
template: { dir: '/var/nuxt/templates' }
}
nuxt.options.router.routeNameSplitter = '[splitter]'
createRoutes.mockReturnValueOnce([ { name: 'default_route' } ])
createRoutes.mockReturnValueOnce([{ name: 'default_route' }])
const builder = new Builder(nuxt, BundleBuilder)
builder._defaultPage = true
@ -624,14 +624,14 @@ describe('builder: builder generate', () => {
expect(nuxt.options.build.createRoutes).not.toBeCalled()
expect(createRoutes).toBeCalledTimes(1)
expect(createRoutes).toBeCalledWith({
files: [ 'index.vue' ],
files: ['index.vue'],
srcDir: '/var/nuxt/templates/pages',
routeNameSplitter: '[splitter]'
})
expect(nuxt.callHook).toBeCalledTimes(1)
expect(nuxt.callHook).toBeCalledWith(
'build:extendRoutes',
[ { name: 'default_route' } ],
[{ name: 'default_route' }],
r
)
expect(templateVars.router.routes).toEqual([
@ -680,7 +680,7 @@ describe('builder: builder generate', () => {
expect(createRoutes).toBeCalledTimes(1)
expect(createRoutes).toBeCalledWith({
files: [ '/var/nuxt/pages/foo.vue', '/var/nuxt/pages/bar.vue', '/var/nuxt/pages/baz.vue' ],
files: ['/var/nuxt/pages/foo.vue', '/var/nuxt/pages/bar.vue', '/var/nuxt/pages/baz.vue'],
srcDir: '/var/nuxt/src',
pagesDir: '/var/nuxt/pages',
routeNameSplitter: '[splitter]',

View File

@ -60,7 +60,7 @@ describe('builder: builder plugins', () => {
test('should overwrite plugins from options', async () => {
const nuxt = createNuxt()
nuxt.options.plugins = [ '/var/nuxt/plugins/foo-bar.js' ]
nuxt.options.plugins = ['/var/nuxt/plugins/foo-bar.js']
nuxt.options.extendPlugins = jest.fn().mockReturnValue([
'/var/nuxt/plugins/fizz-fuzz.js'
])
@ -99,7 +99,7 @@ describe('builder: builder plugins', () => {
}
])
expect(consola.warn).toBeCalledTimes(1)
expect(consola.warn).toBeCalledWith("Invalid plugin mode (server/client/all): 'abc'. Falling back to 'all'")
expect(consola.warn).toBeCalledWith('Invalid plugin mode (server/client/all): \'abc\'. Falling back to \'all\'')
})
test('should resolve plugins', async () => {
@ -169,15 +169,21 @@ describe('builder: builder plugins', () => {
const plugins = await builder.normalizePlugins()
expect(plugins).toEqual([
{ mode: 'all',
{
mode: 'all',
src: 'resolveAlias(/var/nuxt/plugins/test.js)',
'name': 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.js)' },
{ mode: 'client',
name: 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.js)'
},
{
mode: 'client',
src: 'resolveAlias(/var/nuxt/plugins/test.client)',
'name': 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.client)' },
{ mode: 'server',
name: 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.client)'
},
{
mode: 'server',
src: 'resolveAlias(/var/nuxt/plugins/test.server)',
'name': 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.server)' }
name: 'nuxt_plugin_test_hash(/var/nuxt/plugins/test.server)'
}
])
})
})

View File

@ -11,13 +11,13 @@ jest.mock('lodash', () => ({ test: 'test lodash', warn: 'only once' }))
describe('builder: buildContext', () => {
const builder = {
template: { files: ['template.js'] },
globals: [ 'globals' ],
plugins: [ 'plugins' ],
globals: ['globals'],
plugins: ['plugins'],
relativeToBuild: jest.fn((...args) => `relativeBuild(${args.join(', ')})`)
}
const options = {
features: { store: true },
extensions: [ 'test', 'ext' ],
extensions: ['test', 'ext'],
messages: { test: 'test message' },
build: {
splitChunks: { testSC: true }
@ -32,7 +32,7 @@ describe('builder: buildContext', () => {
head: 'test_head',
store: 'test_store',
globalName: 'test_global',
css: [ 'test.css' ],
css: ['test.css'],
layouts: {
'test-layout': 'test.template'
},

View File

@ -103,13 +103,13 @@ describe('builder: Ignore', () => {
ignore.filter()
ignore.filter('pages/ignore.vue')
const paths = ignore.filter([ 'pages/ignore.vue', 'layouts/ignore.vue' ])
const paths = ignore.filter(['pages/ignore.vue', 'layouts/ignore.vue'])
expect(ignore.ignore.filter).toBeCalledTimes(3)
expect(ignore.ignore.filter).nthCalledWith(1, [])
expect(ignore.ignore.filter).nthCalledWith(2, [ 'pages/ignore.vue' ])
expect(ignore.ignore.filter).nthCalledWith(3, [ 'pages/ignore.vue', 'layouts/ignore.vue' ])
expect(paths).toEqual([ 'pages/ignore.vue', 'layouts/ignore.vue' ])
expect(ignore.ignore.filter).nthCalledWith(2, ['pages/ignore.vue'])
expect(ignore.ignore.filter).nthCalledWith(3, ['pages/ignore.vue', 'layouts/ignore.vue'])
expect(paths).toEqual(['pages/ignore.vue', 'layouts/ignore.vue'])
})
test('should return origin paths if there is no ignorefile', () => {
@ -119,9 +119,9 @@ describe('builder: Ignore', () => {
rootDir: '/var/nuxt'
})
const paths = ignore.filter([ 'pages/ignore.vue', 'layouts/ignore.vue' ])
const paths = ignore.filter(['pages/ignore.vue', 'layouts/ignore.vue'])
expect(paths).toEqual([ 'pages/ignore.vue', 'layouts/ignore.vue' ])
expect(paths).toEqual(['pages/ignore.vue', 'layouts/ignore.vue'])
})
test('should reload ignore', () => {

View File

@ -205,7 +205,7 @@ export default class NuxtCommand extends Hookable {
}
maxOptionLength = Math.max(maxOptionLength, optionHelp.length)
options.push([ optionHelp, option.description ])
options.push([optionHelp, option.description])
}
const _opts = options.map(([option, description]) => {
@ -219,7 +219,7 @@ export default class NuxtCommand extends Hookable {
const usage = foldLines(`Usage: nuxt ${this.cmd.usage} [options]`, startSpaces)
const description = foldLines(this.cmd.description, startSpaces)
const opts = foldLines(`Options:`, startSpaces) + '\n\n' + _opts
const opts = foldLines('Options:', startSpaces) + '\n\n' + _opts
let helpText = colorize(`${usage}\n\n`)
if (this.cmd.description) {

View File

@ -28,8 +28,8 @@ export default async function listCommands () {
)
}).join('\n')
const usage = foldLines(`Usage: nuxt <command> [--help|-h]`, startSpaces)
const cmds = foldLines(`Commands:`, startSpaces) + '\n\n' + _cmds
const usage = foldLines('Usage: nuxt <command> [--help|-h]', startSpaces)
const cmds = foldLines('Commands:', startSpaces) + '\n\n' + _cmds
process.stderr.write(colorize(`${usage}\n\n${cmds}\n\n`))
}

View File

@ -9,7 +9,7 @@ describe('imports', () => {
})
test('should throw error with proper code when module not found', async () => {
await expect(importModule('not-found-module')).rejects.toMatchObject({
message: `Cannot import module 'not-found-module'`,
message: 'Cannot import module \'not-found-module\'',
code: 'MODULE_NOT_FOUND'
})
})

View File

@ -128,7 +128,7 @@ describe('cli/utils', () => {
const successBox = jest.fn().mockImplementation((m, t) => t + m)
jest.spyOn(fmt, 'successBox').mockImplementation(successBox)
const badgeMessages = [ 'badgeMessage' ]
const badgeMessages = ['badgeMessage']
const bannerColor = 'green'
const listeners = [
{ url: 'first' },

View File

@ -13,7 +13,7 @@ export default () => ({
modern: undefined,
// Globals
globalName: `nuxt`,
globalName: 'nuxt',
globals: {
id: globalName => `__${globalName}`,
nuxt: globalName => `$${globalName}`,

View File

@ -63,7 +63,7 @@ export function getNuxtConfig (_options) {
options.globalName = (isNonEmptyString(options.globalName) && /^[a-zA-Z]+$/.test(options.globalName))
? options.globalName.toLowerCase()
: `nuxt`
: 'nuxt'
// Resolve rootDir
options.rootDir = isNonEmptyString(options.rootDir) ? path.resolve(options.rootDir) : process.cwd()
@ -419,7 +419,7 @@ export function getNuxtConfig (_options) {
if (isPureObject(options.serverMiddleware)) {
options.serverMiddleware = Object.entries(options.serverMiddleware)
.map(([ path, handler ]) => ({ path, handler }))
.map(([path, handler]) => ({ path, handler }))
}
return options

View File

@ -4,11 +4,11 @@ describe('config: common', () => {
test('should return globals with given globalName', () => {
const globalName = 'nuxt_global'
const { globals } = commonConfig()
expect(globals.id(globalName)).toEqual(`__nuxt_global`)
expect(globals.nuxt(globalName)).toEqual(`$nuxt_global`)
expect(globals.context(globalName)).toEqual(`__NUXT_GLOBAL__`)
expect(globals.id(globalName)).toEqual('__nuxt_global')
expect(globals.nuxt(globalName)).toEqual('$nuxt_global')
expect(globals.context(globalName)).toEqual('__NUXT_GLOBAL__')
expect(globals.pluginPrefix(globalName)).toEqual('nuxt_global')
expect(globals.readyCallback(globalName)).toEqual(`onNuxt_globalReady`)
expect(globals.loadedCallback(globalName)).toEqual(`_onNuxt_globalLoaded`)
expect(globals.readyCallback(globalName)).toEqual('onNuxt_globalReady')
expect(globals.loadedCallback(globalName)).toEqual('_onNuxt_globalLoaded')
})
})

View File

@ -27,7 +27,7 @@ export default class Nuxt extends Hookable {
this.deprecateHooks({
'render:context': 'render:routeContext',
'render:routeContext': 'vue-renderer:afterRender',
'showReady': 'webpack:done' // Workaround to deprecate showReady
showReady: 'webpack:done' // Workaround to deprecate showReady
})
// Add Legacy aliases

View File

@ -88,9 +88,9 @@ describe('core: module', () => {
const template = module.addTemplate('/var/nuxt/test')
const expected = {
'dst': 'nuxt.test.hash(/var/nuxt/test)',
'options': undefined,
'src': '/var/nuxt/test'
dst: 'nuxt.test.hash(/var/nuxt/test)',
options: undefined,
src: '/var/nuxt/test'
}
expect(template).toEqual(expected)
expect(module.options.build.templates).toEqual([expected])
@ -111,9 +111,9 @@ describe('core: module', () => {
options: { test: true }
})
const expected = {
'dst': 'nuxt.test.hash(/var/nuxt/test)',
'options': { test: true },
'src': '/var/nuxt/test'
dst: 'nuxt.test.hash(/var/nuxt/test)',
options: { test: true },
src: '/var/nuxt/test'
}
expect(template).toEqual(expected)
expect(module.options.build.templates).toEqual([expected])
@ -134,9 +134,9 @@ describe('core: module', () => {
fileName: '/var/nuxt/dist/test'
})
const expected = {
'dst': '/var/nuxt/dist/test',
'options': undefined,
'src': '/var/nuxt/test'
dst: '/var/nuxt/dist/test',
options: undefined,
src: '/var/nuxt/test'
}
expect(template).toEqual(expected)
expect(module.options.build.templates).toEqual([expected])
@ -236,7 +236,7 @@ describe('core: module', () => {
module.addLayout({}, 'error')
expect(module.options.layouts).toEqual({ 'error': './nuxt.test.template' })
expect(module.options.layouts).toEqual({ error: './nuxt.test.template' })
expect(module.addErrorLayout).toBeCalledTimes(1)
expect(module.addErrorLayout).toBeCalledWith('nuxt.test.template')
})

View File

@ -39,7 +39,7 @@ describe('core: nuxt', () => {
expect(nuxt._deprecatedHooks).toEqual({
'render:context': 'render:routeContext',
'render:routeContext': 'vue-renderer:afterRender',
'showReady': 'webpack:done'
showReady: 'webpack:done'
})
expect(defineAlias).toBeCalledTimes(2)

View File

@ -158,7 +158,7 @@ export default class Generator {
try {
html = this.minifyHtml(html)
} catch (error) {
consola.warn(`HTML minification failed for SPA fallback`)
consola.warn('HTML minification failed for SPA fallback')
}
await fsExtra.writeFile(fallbackPath, html, 'utf8')

View File

@ -72,7 +72,7 @@ describe('generator: generate route', () => {
throw error
})
const generator = new Generator(nuxt)
generator._formatErrors = jest.fn(() => `formatted errors`)
generator._formatErrors = jest.fn(() => 'formatted errors')
const route = '/foo'
const payload = {}

View File

@ -125,7 +125,7 @@ const defaultPushAssets = (preloadFiles, shouldPush, publicPath, options) => {
const getCspString = ({ cspScriptSrcHashes, allowedSources, policies, isDev }) => {
const joinedHashes = cspScriptSrcHashes.join(' ')
const baseCspStr = `script-src 'self'${isDev ? ` 'unsafe-eval'` : ''} ${joinedHashes}`
const baseCspStr = `script-src 'self'${isDev ? ' \'unsafe-eval\'' : ''} ${joinedHashes}`
if (Array.isArray(allowedSources)) {
return `${baseCspStr} ${allowedSources.join(' ')}`
@ -148,7 +148,7 @@ const transformPolicyObject = (policies, cspScriptSrcHashes) => {
const additionalPolicies = userHasDefinedScriptSrc ? policies['script-src'] : []
// Self is always needed for inline-scripts, so add it, no matter if the user specified script-src himself.
const hashAndPolicyList = cspScriptSrcHashes.concat(`'self'`, additionalPolicies)
const hashAndPolicyList = cspScriptSrcHashes.concat('\'self\'', additionalPolicies)
return { ...policies, 'script-src': hashAndPolicyList }
}

View File

@ -14,7 +14,7 @@ jest.mock('@nuxtjs/youch', () => jest.fn(() => ({
})))
const createParams = () => ({
resources: { errorTemplate: jest.fn(() => `error template`) },
resources: { errorTemplate: jest.fn(() => 'error template') },
options: {
srcDir: '/var/nuxt/src',
rootDir: '/var/nuxt',

View File

@ -475,7 +475,7 @@ describe('server: server', () => {
baseURL: '/foo/'
})
expect(listener.listen).toBeCalledTimes(1)
expect(server.listeners).toEqual([ listener ])
expect(server.listeners).toEqual([listener])
expect(server.nuxt.callHook).toBeCalledTimes(1)
expect(server.nuxt.callHook).toBeCalledWith('listen', listener.server, listener)
})
@ -506,7 +506,7 @@ describe('server: server', () => {
const nuxt = createNuxt()
const server = new Server(nuxt)
const listener = { close: jest.fn() }
server.listeners = [ listener ]
server.listeners = [listener]
server.renderer = { close: jest.fn() }
server.resources = { id: 'test-resources' }

View File

@ -48,4 +48,4 @@ export const isModernRequest = (req, modernMode = false) => {
}
// https://gist.github.com/samthor/64b114e4a4f539915a95b91ffd340acc
export const safariNoModuleFix = `!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();`
export const safariNoModuleFix = '!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();'

View File

@ -45,7 +45,7 @@ export function serializeFunction (func) {
}
})
.replace(`${func.name || 'function'}(`, 'function (')
.replace(`function function`, `function`)
.replace('function function', 'function')
}
serializeFunction.internalFunctionRE = /^(\s*)(?!(?:if)|(?:for)|(?:while)|(?:switch))(\w+)\s*\((.*?)\)\s*\{/gm

View File

@ -31,8 +31,8 @@ describe('util: lang', () => {
})
test('should wrap given argument with array', () => {
expect(wrapArray([ 'array' ])).toEqual([ 'array' ])
expect(wrapArray('str')).toEqual([ 'str' ])
expect(wrapArray(['array'])).toEqual(['array'])
expect(wrapArray('str')).toEqual(['str'])
})
test('should strip white spaces in given argument', () => {

View File

@ -46,7 +46,7 @@ describe.posix('util: resolve', () => {
expect(nuxt.test()).toEqual('test defineAlias')
expect(consola.warn).toBeCalledTimes(1)
expect(consola.warn).toBeCalledWith({
message: `'test' is deprecated'`,
message: '\'test\' is deprecated\'',
additional: expect.any(String)
})
})

View File

@ -51,7 +51,7 @@ describe.win('util: resolve windows', () => {
expect(nuxt.test()).toEqual('test defineAlias')
expect(consola.warn).toBeCalledTimes(1)
expect(consola.warn).toBeCalledWith({
message: `'test' is deprecated'`,
message: '\'test\' is deprecated\'',
additional: expect.any(String)
})
})

View File

@ -5,7 +5,8 @@ describe('util: route', () => {
const routes = flatRoutes([
{ name: 'login', path: '/login' },
{ name: 'about', path: '/about' },
{ name: 'posts',
{
name: 'posts',
path: '',
children: [
{ name: 'posts-list', path: '' },
@ -13,7 +14,7 @@ describe('util: route', () => {
]
}
])
expect(routes).toEqual([ '/login', '/about', '', '/post' ])
expect(routes).toEqual(['/login', '/about', '', '/post'])
})
test('should ignore route with * and :', () => {
@ -22,12 +23,13 @@ describe('util: route', () => {
{ name: 'foo', path: '/foo/:id' },
{ name: 'bar', path: '/bar/*' }
])
expect(routes).toEqual([ '/login' ])
expect(routes).toEqual(['/login'])
})
test('should resolve route with /', () => {
const routes = flatRoutes([
{ name: 'foo',
{
name: 'foo',
path: '/',
children: [
{ name: 'foo-bar', path: 'foo/bar' },
@ -35,7 +37,7 @@ describe('util: route', () => {
]
}
])
expect(routes).toEqual([ '/', '/foo/bar', '/foo/baz' ])
expect(routes).toEqual(['/', '/foo/bar', '/foo/baz'])
})
describe('util: route guard', () => {

View File

@ -29,9 +29,9 @@ const layouts = { <%= Object.keys(layouts).map(key => `"_${key}": _${hash(key)}`
export default {
<% if (features.meta) { %>
<%= isTest ? '/* eslint-disable quotes, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
<%= isTest ? '/* eslint-disable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
head: <%= serializeFunction(head) %>,
<%= isTest ? '/* eslint-enable quotes, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
<%= isTest ? '/* eslint-enable array-bracket-spacing, quotes, quote-props, semi, indent, comma-spacing, key-spacing, object-curly-spacing, space-before-function-paren, object-shorthand */' : '' %>
<% } %>
render (h, props) {
<% if (loading) { %>const loadingEl = h('NuxtLoading', { ref: 'loading' })<% } %>
@ -54,7 +54,7 @@ export default {
id: '__layout'
},
key: this.layoutName
}, [ layoutEl ])
}, [layoutEl])
<% } else { %>
const templateEl = h('nuxt')
<% } %>
@ -73,7 +73,7 @@ export default {
})
}
}
}, [ templateEl ])
}, [templateEl])
<% } %>
return h('div', {

View File

@ -40,7 +40,7 @@ Object.assign(Vue.config, <%= serialize(vue.config) %>)<%= isTest ? '// eslint-d
const logs = NUXT.logs || []
if (logs.length > 0) {
const ssrLogSyle = 'background: #2E495E;border-radius: 0.5em;color: white;font-weight: bold;padding: 2px 0.5em;'
console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ("%cNuxt SSR", ssrLogSyle)
console.group && console.group<%= nuxtOptions.render.ssrLog === 'collapsed' ? 'Collapsed' : '' %> ('%cNuxt SSR', ssrLogSyle)
logs.forEach(logObj => (console[logObj.type] || console.log)(...logObj.args))
delete NUXT.logs
console.groupEnd && console.groupEnd()
@ -331,7 +331,7 @@ async function render (to, from, next) {
<% } %>
// Show error page
app.context.error({ statusCode: 404, message: `<%= messages.error_404 %>` })
app.context.error({ statusCode: 404, message: '<%= messages.error_404 %>' })
return next()
}
@ -408,7 +408,7 @@ async function render (to, from, next) {
// ...If .validate() returned false
if (!isValid) {
this.error({ statusCode: 404, message: `<%= messages.error_404 %>` })
this.error({ statusCode: 404, message: '<%= messages.error_404 %>' })
return next()
}
<% } %>

View File

@ -28,7 +28,7 @@ export default {
computed: {
options: () => (<%= JSON.stringify(buildIndicator) %>),
indicatorStyle () {
const [ d1, d2 ] = this.options.position.split('-')
const [d1, d2] = this.options.position.split('-')
return {
[d1]: '20px',
[d2]: '20px',

View File

@ -29,6 +29,14 @@ export default {
default: null
}
},
computed: {
statusCode () {
return (this.error && this.error.statusCode) || 500
},
message () {
return this.error.message || '<%= messages.client_error %>'
}
},
head () {
return {
title: this.message,
@ -39,14 +47,6 @@ export default {
}
]
}
},
computed: {
statusCode () {
return (this.error && this.error.statusCode) || 500
},
message () {
return this.error.message || `<%= messages.client_error %>`
}
}
}
</script>

View File

@ -143,8 +143,8 @@ export default {
'nuxt-progress-failed': !this.canSucceed
},
style: {
'width': this.percent + '%',
'left': this.left
width: this.percent + '%',
left: this.left
}
})
}

View File

@ -28,7 +28,7 @@ Vue.component(NoSsr.name, {
if (process.client && !NoSsr._warned) {
NoSsr._warned = true
<%= isTest ? '// eslint-disable-next-line no-console' : '' %>
console.warn(`<no-ssr> has been deprecated and will be removed in Nuxt 3, please use <client-only> instead`)
console.warn('<no-ssr> has been deprecated and will be removed in Nuxt 3, please use <client-only> instead')
}
return NoSsr.render(h, ctx)
}
@ -40,7 +40,7 @@ Vue.component(NuxtChild.name, NuxtChild)
// Component NuxtLink is imported in server.js or client.js
// Component: <Nuxt>`
// Component: <Nuxt>
Vue.component(Nuxt.name, Nuxt)
<% if (features.meta) {
@ -90,10 +90,10 @@ async function createApp (ssrContext) {
nuxt: {
<% if (features.transitions) { %>
defaultTransition,
transitions: [ defaultTransition ],
transitions: [defaultTransition],
setTransitions (transitions) {
if (!Array.isArray(transitions)) {
transitions = [ transitions ]
transitions = [transitions]
}
transitions = transitions.map((transition) => {
if (!transition) {
@ -178,7 +178,7 @@ async function createApp (ssrContext) {
Vue[installKey] = true
// Call Vue.use() to install the plugin into vm
Vue.use(() => {
if (!Vue.prototype.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(Vue, key)) {
Object.defineProperty(Vue.prototype, key, {
get () {
return this.$root.$options[key]

View File

@ -97,9 +97,9 @@ export const routerOptions = {
linkActiveClass: '<%= router.linkActiveClass %>',
linkExactActiveClass: '<%= router.linkExactActiveClass %>',
scrollBehavior,
<%= isTest ? '/* eslint-disable quotes, object-curly-spacing, key-spacing */' : '' %>
<%= isTest ? '/* eslint-disable array-bracket-spacing, quotes, quote-props, object-curly-spacing, key-spacing */' : '' %>
routes: [<%= _routes %>],
<%= isTest ? '/* eslint-enable quotes, object-curly-spacing, key-spacing */' : '' %>
<%= isTest ? '/* eslint-enable array-bracket-spacing, quotes, quote-props, object-curly-spacing, key-spacing */' : '' %>
<% if (router.parseQuery) { %>parseQuery: <%= serializeFunction(router.parseQuery) %>,<% } %>
<% if (router.stringifyQuery) { %>stringifyQuery: <%= serializeFunction(router.stringifyQuery) %>,<% } %>
fallback: <%= router.fallback %>

View File

@ -43,7 +43,7 @@ const createNext = ssrContext => (opts) => {
return
}
ssrContext.res.writeHead(opts.status, {
'Location': opts.path
Location: opts.path
})
ssrContext.res.end()
}
@ -98,7 +98,7 @@ export default async (ssrContext) => {
return _app
}
const render404Page = () => {
app.context.error({ statusCode: 404, path: ssrContext.url, message: `<%= messages.error_404 %>` })
app.context.error({ statusCode: 404, path: ssrContext.url, message: '<%= messages.error_404 %>' })
return renderErrorPage()
}

View File

@ -8,9 +8,9 @@ const willResolveStoreModules = storeModules.some(s => s.src.indexOf('index.') !
if (willResolveStoreModules) { %>
const VUEX_PROPERTIES = ['state', 'getters', 'actions', 'mutations']
<% } %>
let store = {}
let store = {};
void (function updateModules () {
(function updateModules () {
<% storeModules.some(s => {
if(s.src.indexOf('index.') === 0) { %>
store = normalizeRoot(require('<%= relativeToBuild(srcDir, dir.store, s.src) %>'), '<%= dir.store %>/<%= s.src %>')

View File

@ -57,7 +57,7 @@ export async function compileTemplate (template, destination, options = {}) {
const [template] = templateContext.templateFiles
return template.dst
} catch (err) {
consola.error(`Could not compile template`, err.message, template)
consola.error('Could not compile template', err.message, template)
return false
}
}

View File

@ -251,7 +251,7 @@ export default class VueRenderer {
case 'created':
throw new Error('Renderer ready() is not called! Please ensure `nuxt.ready()` is called and awaited.')
case 'loading':
throw new Error(`Renderer is loading.`)
throw new Error('Renderer is loading.')
case 'error':
throw this._error
case 'ready':

View File

@ -137,7 +137,7 @@ export default class SSRRenderer extends BaseRenderer {
const cspScriptSrcHashes = []
if (csp) {
// Only add the hash if 'unsafe-inline' rule isn't present to avoid conflicts (#5387)
const containsUnsafeInlineScriptSrc = csp.policies && csp.policies['script-src'] && csp.policies['script-src'].includes(`'unsafe-inline'`)
const containsUnsafeInlineScriptSrc = csp.policies && csp.policies['script-src'] && csp.policies['script-src'].includes('\'unsafe-inline\'')
if (csp.unsafeInlineCompatibility || !containsUnsafeInlineScriptSrc) {
const hash = crypto.createHash(csp.hashAlgorithm)
hash.update(serializedSession)

View File

@ -102,7 +102,7 @@ export default class WebpackBaseConfig {
return options
}
const defaultPreset = [ require.resolve('@nuxt/babel-preset-app'), {} ]
const defaultPreset = [require.resolve('@nuxt/babel-preset-app'), {}]
if (typeof options.presets === 'function') {
options.presets = options.presets(
@ -428,7 +428,7 @@ export default class WebpackBaseConfig {
const filters = [
// Hide warnings about plugins without a default export (#1179)
warn => warn.name === 'ModuleDependencyWarning' &&
warn.message.includes(`export 'default'`) &&
warn.message.includes('export \'default\'') &&
warn.message.includes('nuxt_plugin_'),
...(this.buildContext.buildOptions.warningIgnoreFilters || [])
]

View File

@ -4,7 +4,7 @@ export default class CorsPlugin {
}
apply (compiler) {
const ID = `vue-cors-plugin`
const ID = 'vue-cors-plugin'
compiler.hooks.compilation.tap(ID, (compilation) => {
compilation.hooks.htmlWebpackPluginAlterAssetTags.tap(ID, (data) => {
if (!this.crossorigin) {

View File

@ -39,7 +39,7 @@ export default class ModernModePlugin {
}
applyLegacy (compiler) {
const ID = `nuxt-legacy-bundle`
const ID = 'nuxt-legacy-bundle'
compiler.hooks.compilation.tap(ID, (compilation) => {
// For html-webpack-plugin 4.0
// HtmlWebpackPlugin.getHooks(compilation).alterAssetTags.tapAsync(ID, async (data, cb) => {
@ -56,7 +56,7 @@ export default class ModernModePlugin {
}
applyModern (compiler) {
const ID = `nuxt-modern-bundle`
const ID = 'nuxt-modern-bundle'
compiler.hooks.compilation.tap(ID, (compilation) => {
// For html-webpack-plugin 4.0
// HtmlWebpackPlugin.getHooks(compilation).alterAssetTags.tapAsync(ID, async (data, cb) => {

View File

@ -24,8 +24,8 @@ export default class VueSSRServerPlugin {
if (entryAssets.length > 1) {
throw new Error(
`Server-side bundle should have one single entry file. ` +
`Avoid using CommonsChunkPlugin in the server config.`
'Server-side bundle should have one single entry file. ' +
'Avoid using CommonsChunkPlugin in the server config.'
)
}

View File

@ -54,7 +54,7 @@ export default class PostcssConfig {
'postcss-import': {
resolve: createResolver({
alias: { ...alias },
modules: [ srcDir, rootDir, ...modulesDir ]
modules: [srcDir, rootDir, ...modulesDir]
})
},
@ -63,7 +63,7 @@ export default class PostcssConfig {
// https://github.com/csstools/postcss-preset-env
'postcss-preset-env': this.preset || {},
'cssnano': dev ? false : { preset: 'default' }
cssnano: dev ? false : { preset: 'default' }
},
// Array, String or Function
order: 'presetEnvAndCssnanoLast'
@ -75,7 +75,7 @@ export default class PostcssConfig {
// https://github.com/michael-ciniawsky/postcss-load-config
// TODO: Remove in Nuxt 3
const { srcDir, rootDir } = this.buildContext.options
for (const dir of [ srcDir, rootDir ]) {
for (const dir of [srcDir, rootDir]) {
for (const file of [
'postcss.config.js',
'.postcssrc.js',

View File

@ -10,7 +10,7 @@ const useCjs = [
]
const stub = {
es: `export * from '../src/index'`,
es: 'export * from \'../src/index\'',
cjs: `const esm = require('esm')
const _require = esm(module)
@ -46,7 +46,8 @@ Object.defineProperty(global.__NUXT, 'version', {
})
module.exports = _require('../src/index')
` }
`
}
async function main () {
// Read package at current directory

View File

@ -60,13 +60,13 @@ export default function rollupConfig ({
jsonPlugin(),
licensePlugin({
banner: [
`/*!`,
'/*!',
` * ${pkg.name} v${pkg.version} (c) 2016-${new Date().getFullYear()}`,
`${(pkg.contributors || []).map(c => ` * - ${c.name}`).join('\n')}`,
` * - All the amazing contributors`,
` * Released under the MIT License.`,
` * Website: https://nuxtjs.org`,
`*/`
' * - All the amazing contributors',
' * Released under the MIT License.',
' * Website: https://nuxtjs.org',
'*/'
].join('\n')
})
].concat(plugins),

View File

@ -38,10 +38,10 @@ describe('basic browser', () => {
loading = await page.nuxt.loadingData()
expect(loading.show).toBe(true)
await page.waitForFunction(
`$nuxt.$loading.$data.show === false`
'$nuxt.$loading.$data.show === false'
)
await page.waitForFunction(
`document.querySelector('p').innerText === 'true'`
'document.querySelector(\'p\').innerText === \'true\''
)
})

View File

@ -6,10 +6,10 @@ export default ({ route, params }, inject) => {
const key = 'injectedProperty'
const map = {
undefined,
'null': null,
'false': false,
'0': 0,
'empty': ''
null: null,
false: false,
0: 0,
empty: ''
}
const value = map[injectValue]
inject(key, value)

View File

@ -32,6 +32,13 @@ function search (q) {
}
export default {
async asyncData ({ query }) {
const searchResults = await search(query.q)
return {
searchResults,
date: Date.now()
}
},
data () {
return {
q: this.$route.query.q || ''
@ -42,13 +49,6 @@ export default {
this.searchResults = await search(q)
}
},
async asyncData ({ query }) {
const searchResults = await search(query.q)
return {
searchResults,
date: Date.now()
}
},
mounted () {
this.$refs.search.selectionStart = this.$refs.search.selectionEnd = this.$refs.search.value.length
this.$refs.search.focus()

View File

@ -1,7 +1,7 @@
export default {
build: {
styleResources: {
'stylus': './nothinghere'
stylus: './nothinghere'
}
}
}

View File

@ -6,15 +6,15 @@
<script>
export default {
computed: {
debug () {
return JSON.stringify(this.$data, null, 2)
}
},
asyncData () {
return {
[Math.random()]: true
}
},
computed: {
debug () {
return JSON.stringify(this.$data, null, 2)
}
}
}
</script>

View File

@ -12,12 +12,12 @@
<script>
export default {
layout: 'custom-env',
data () {
return { processEnv: process.env.object }
},
asyncData ({ env }) {
delete env.object
return { env }
},
data () {
return { processEnv: process.env.object }
}
}
</script>

View File

@ -21,8 +21,8 @@ describe('with-config', () => {
['Unknown mode: unknown. Falling back to universal'],
['Invalid plugin mode (server/client/all): \'abc\'. Falling back to \'all\''],
[{
'additional': expect.stringContaining('plugins/test.json'),
'message': 'Found 2 plugins that match the configuration, suggest to specify extension:'
additional: expect.stringContaining('plugins/test.json'),
message: 'Found 2 plugins that match the configuration, suggest to specify extension:'
}],
['Please use `build.postcss` in your nuxt.config.js instead of an external config file. Support for such files will be removed in Nuxt 3 as they remove all defaults set by Nuxt and can cause severe problems with features like alias resolving inside your CSS.'],
['Using styleResources without the @nuxtjs/style-resources is not suggested and can lead to severe performance issues.', 'Please use https://github.com/nuxt-community/style-resources-module'],

View File

@ -105,7 +105,7 @@ describe('basic ssr csp', () => {
const cspOption = {
enabled: true,
policies: {
'default-src': [`'none'`],
'default-src': ['\'none\''],
'script-src': ['https://example.com', 'https://example.io']
}
}
@ -128,7 +128,7 @@ describe('basic ssr csp', () => {
const cspOption = {
enabled: true,
policies: {
'default-src': [`'none'`]
'default-src': ['\'none\'']
}
}
@ -146,9 +146,9 @@ describe('basic ssr csp', () => {
'Contain only unique hashes in header when csp.policies is set',
async () => {
const policies = {
'default-src': [`'self'`],
'script-src': [`'self'`],
'style-src': [`'self'`]
'default-src': ['\'self\''],
'script-src': ['\'self\''],
'style-src': ['\'self\'']
}
nuxt = await startCspServer({
@ -176,7 +176,7 @@ describe('basic ssr csp', () => {
'Not contain hash when \'unsafe-inline\' option is present in script-src policy',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspServer({
@ -201,7 +201,7 @@ describe('basic ssr csp', () => {
'Contain hash and \'unsafe-inline\' when unsafeInlineCompatibility is enabled',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspServer({
@ -228,7 +228,7 @@ describe('basic ssr csp', () => {
'Contain hash and \'unsafe-inline\' when the typo property unsafeInlineCompatiblity is enabled',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspServer({
@ -327,7 +327,7 @@ describe('basic ssr csp', () => {
const cspOption = {
enabled: true,
policies: {
'default-src': [`'none'`],
'default-src': ['\'none\''],
'script-src': ['https://example.com', 'https://example.io']
}
}
@ -350,7 +350,7 @@ describe('basic ssr csp', () => {
const cspOption = {
enabled: true,
policies: {
'default-src': [`'none'`]
'default-src': ['\'none\'']
}
}
@ -368,9 +368,9 @@ describe('basic ssr csp', () => {
'Contain only unique hashes in header when csp.policies is set',
async () => {
const policies = {
'default-src': [`'self'`],
'script-src': [`'self'`],
'style-src': [`'self'`]
'default-src': ['\'self\''],
'script-src': ['\'self\''],
'style-src': ['\'self\'']
}
nuxt = await startCspDevServer({
@ -400,7 +400,7 @@ describe('basic ssr csp', () => {
const cspOption = {
enabled: true,
policies: {
'default-src': [`'self'`],
'default-src': ['\'self\''],
'script-src': ['https://example.com', 'https://example.io']
}
}
@ -424,7 +424,7 @@ describe('basic ssr csp', () => {
'Not contain hash when \'unsafe-inline\' option is present in script-src policy',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspDevServer({
@ -449,7 +449,7 @@ describe('basic ssr csp', () => {
'Contain hash and \'unsafe-inline\' when unsafeInlineCompatibility is enabled',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspServer({
@ -476,7 +476,7 @@ describe('basic ssr csp', () => {
'Contain hash and \'unsafe-inline\' when the typo property unsafeInlineCompatiblity is enabled',
async () => {
const policies = {
'script-src': [`'unsafe-inline'`]
'script-src': ['\'unsafe-inline\'']
}
nuxt = await startCspServer({

View File

@ -58,7 +58,7 @@ describe('error', () => {
test('/info should display an error', async () => {
await expect(nuxt.server.renderRoute('/info')).rejects.toMatchObject({
message: expect.stringContaining(`Cannot read property 'title' of undefined`)
message: expect.stringContaining('Cannot read property \'title\' of undefined')
})
})
@ -70,7 +70,7 @@ describe('error', () => {
test('/error-square should display an error', async () => {
await expect(nuxt.server.renderRoute('/squared')).rejects.toMatchObject({
message: expect.stringContaining(`Cannot read property 'data' of undefined`)
message: expect.stringContaining('Cannot read property \'data\' of undefined')
})
})

View File

@ -34,9 +34,9 @@ function spaTests ({ isHashMode }) {
test('/ (include preload and prefetch resources)', async () => {
const { head } = await renderRoute('/')
expect(head).toMatch(`<link rel="preload" href="/_nuxt/runtime.js" as="script">`)
expect(head).toMatch(`<link rel="preload" href="/_nuxt/commons.app.js" as="script">`)
expect(head).toMatch(`<link rel="preload" href="/_nuxt/app.js" as="script">`)
expect(head).toMatch('<link rel="preload" href="/_nuxt/runtime.js" as="script">')
expect(head).toMatch('<link rel="preload" href="/_nuxt/commons.app.js" as="script">')
expect(head).toMatch('<link rel="preload" href="/_nuxt/app.js" as="script">')
expect(head).toMatch(`<link rel="prefetch" href="/_nuxt/${wChunk('pages/custom.js')}">`)
expect(head).toMatch(`<link rel="prefetch" href="/_nuxt/${wChunk('pages/error-handler-async.js')}">`)
expect(head).toMatch(`<link rel="prefetch" href="/_nuxt/${wChunk('pages/error-handler-object.js')}">`)

258
yarn.lock
View File

@ -1658,19 +1658,19 @@
consola "^2.10.1"
node-fetch "^2.6.0"
"@nuxtjs/eslint-config@^1.1.2":
version "1.1.2"
resolved "https://registry.npmjs.org/@nuxtjs/eslint-config/-/eslint-config-1.1.2.tgz#cde4c950014a781bcc34abbfef9c62546d8fc34c"
integrity sha512-uKBdza1/Poz32gEodQ9MSW8M9CU4RPdvEiSLX5LWyavrbjhXW9iIbzJzSDlgMhD1QfQ5WrWv1iqL3Bh/ArbIgw==
"@nuxtjs/eslint-config@^2.0.0":
version "2.0.0"
resolved "https://registry.npmjs.org/@nuxtjs/eslint-config/-/eslint-config-2.0.0.tgz#8030d4bfd2bf6141eed23c78eaa26c98357b793f"
integrity sha512-FsMV3eK+Xu9cEc90QTW2iID4XKi58oVwRqx3JpXgBLNJyB8TlvokO3fUZucN+cVqKMPcwoP3TYnQ1LZqRedhUw==
dependencies:
eslint-config-standard "^12.0.0"
eslint-plugin-import "^2.18.0"
eslint-plugin-jest "^22.10.0"
eslint-plugin-node "^9.1.0"
eslint-config-standard "^14.1.0"
eslint-plugin-import "^2.18.2"
eslint-plugin-jest "^23.0.4"
eslint-plugin-node "^10.0.0"
eslint-plugin-promise "^4.2.1"
eslint-plugin-standard "^4.0.0"
eslint-plugin-unicorn "^9.1.1"
eslint-plugin-vue "^5.2.3"
eslint-plugin-standard "^4.0.1"
eslint-plugin-unicorn "^13.0.0"
eslint-plugin-vue "^6.0.1"
"@nuxtjs/youch@^4.2.3":
version "4.2.3"
@ -1835,6 +1835,11 @@
resolved "https://registry.npmjs.org/@types/node/-/node-12.12.12.tgz#529bc3e73dbb35dd9e90b0a1c83606a9d3264bdb"
integrity sha512-MGuvYJrPU0HUwqF7LqvIj50RZUX23Z+m583KBygKYUZLlZ88n6w28XRNJRJgsHukLEnLz6w6SvxZoLgbr5wLqQ==
"@types/normalize-package-data@^2.4.0":
version "2.4.0"
resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz#e486d0d97396d79beedd0a6e33f4534ff6b4973e"
integrity sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==
"@types/q@^1.5.1":
version "1.5.2"
resolved "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
@ -1864,22 +1869,27 @@
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/experimental-utils@^1.13.0":
version "1.13.0"
resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e"
integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==
"@typescript-eslint/experimental-utils@^2.5.0":
version "2.9.0"
resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.9.0.tgz#bbe99a8d9510240c055fc4b17230dd0192ba3c7f"
integrity sha512-0lOLFdpdJsCMqMSZT7l7W2ta0+GX8A3iefG3FovJjrX+QR8y6htFlFdU7aOVPL6pDvt6XcsOb8fxk5sq+girTw==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-scope "^4.0.0"
"@typescript-eslint/typescript-estree" "2.9.0"
eslint-scope "^5.0.0"
"@typescript-eslint/typescript-estree@1.13.0":
version "1.13.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e"
integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==
"@typescript-eslint/typescript-estree@2.9.0":
version "2.9.0"
resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.9.0.tgz#09138daf8f47d0e494ba7db9e77394e928803017"
integrity sha512-v6btSPXEWCP594eZbM+JCXuFoXWXyF/z8kaSBSdCb83DF+Y7+xItW29SsKtSULgLemqJBT+LpT+0ZqdfH7QVmA==
dependencies:
debug "^4.1.1"
eslint-visitor-keys "^1.1.0"
glob "^7.1.6"
is-glob "^4.0.1"
lodash.unescape "4.0.1"
semver "5.5.0"
semver "^6.3.0"
tsutils "^3.17.1"
"@vue/babel-helper-vue-jsx-merge-props@^1.0.0":
version "1.0.0"
@ -2204,7 +2214,7 @@ acorn@^5.5.3:
resolved "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
acorn@^6.0.1, acorn@^6.0.2, acorn@^6.0.7, acorn@^6.2.1:
acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1:
version "6.3.0"
resolved "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz#0087509119ffa4fc0a0041d1e93a417e68cb856e"
integrity sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==
@ -4592,7 +4602,7 @@ escodegen@^1.11.1, escodegen@^1.9.1:
optionalDependencies:
source-map "~0.6.1"
eslint-ast-utils@^1.0.0:
eslint-ast-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz#3d58ba557801cfb1c941d68131ee9f8c34bd1586"
integrity sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==
@ -4600,10 +4610,10 @@ eslint-ast-utils@^1.0.0:
lodash.get "^4.4.2"
lodash.zip "^4.2.0"
eslint-config-standard@^12.0.0:
version "12.0.0"
resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz#638b4c65db0bd5a41319f96bba1f15ddad2107d9"
integrity sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==
eslint-config-standard@^14.1.0:
version "14.1.0"
resolved "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz#b23da2b76fe5a2eba668374f246454e7058f15d4"
integrity sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==
eslint-import-resolver-node@^0.3.2:
version "0.3.2"
@ -4630,15 +4640,15 @@ eslint-multiplexer@^2.0.0:
minimist "^1.2.0"
minimist-options "^4.0.1"
eslint-plugin-es@^1.4.1:
version "1.4.1"
resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz#12acae0f4953e76ba444bfd1b2271081ac620998"
integrity sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA==
eslint-plugin-es@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz#0f5f5da5f18aa21989feebe8a73eadefb3432976"
integrity sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==
dependencies:
eslint-utils "^1.4.2"
regexpp "^2.0.1"
regexpp "^3.0.0"
eslint-plugin-import@^2.18.0:
eslint-plugin-import@^2.18.2:
version "2.18.2"
resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6"
integrity sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==
@ -4655,19 +4665,19 @@ eslint-plugin-import@^2.18.0:
read-pkg-up "^2.0.0"
resolve "^1.11.0"
eslint-plugin-jest@^22.10.0:
version "22.21.0"
resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-22.21.0.tgz#8137294645866636160487d9764224b9a43e2eb1"
integrity sha512-OaqnSS7uBgcGiqXUiEnjoqxPNKvR4JWG5mSRkzVoR6+vDwlqqp11beeql1hYs0HTbdhiwrxWLxbX0Vx7roG3Ew==
eslint-plugin-jest@^23.0.4:
version "23.0.4"
resolved "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.0.4.tgz#1ab81ffe3b16c5168efa72cbd4db14d335092aa0"
integrity sha512-OaP8hhT8chJNodUPvLJ6vl8gnalcsU/Ww1t9oR3HnGdEWjm/DdCCUXLOral+IPGAeWu/EwgVQCK/QtxALpH1Yw==
dependencies:
"@typescript-eslint/experimental-utils" "^1.13.0"
"@typescript-eslint/experimental-utils" "^2.5.0"
eslint-plugin-node@^9.1.0:
version "9.2.0"
resolved "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-9.2.0.tgz#b1911f111002d366c5954a6d96d3cd5bf2a3036a"
integrity sha512-2abNmzAH/JpxI4gEOwd6K8wZIodK3BmHbTxz4s79OIYwwIt2gkpEXlAouJXu4H1c9ySTnRso0tsuthSOZbUMlA==
eslint-plugin-node@^10.0.0:
version "10.0.0"
resolved "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz#fd1adbc7a300cf7eb6ac55cf4b0b6fc6e577f5a6"
integrity sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==
dependencies:
eslint-plugin-es "^1.4.1"
eslint-plugin-es "^2.0.0"
eslint-utils "^1.4.2"
ignore "^5.1.1"
minimatch "^3.0.4"
@ -4679,35 +4689,39 @@ eslint-plugin-promise@^4.2.1:
resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==
eslint-plugin-standard@^4.0.0:
eslint-plugin-standard@^4.0.1:
version "4.0.1"
resolved "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz#ff0519f7ffaff114f76d1bd7c3996eef0f6e20b4"
integrity sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==
eslint-plugin-unicorn@^9.1.1:
version "9.1.1"
resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-9.1.1.tgz#1588a0473f9a0e37cfbbcf7552065a0b0a96ce26"
integrity sha512-SHh/N54pRu5KXlS4Boa1qbWM7yTNl6VpuYJ8Qc1O3TJDr+CDUwEEdUtVlVSV/dBUE97BC8Xk0+Y5zphn21qlCA==
eslint-plugin-unicorn@^13.0.0:
version "13.0.0"
resolved "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-13.0.0.tgz#3d73a17cc34ade1aaa02655ae78bbd8a2053fa81"
integrity sha512-9CQk0v74vQpETMt6iqNgjf3IbWEFhrT0sjaLnjkl9SF3rJH6ZL9f7H42BXJ6LPENQR97QzhrIvB8VG0nD05wxQ==
dependencies:
ci-info "^2.0.0"
clean-regexp "^1.0.0"
eslint-ast-utils "^1.0.0"
import-modules "^1.1.0"
lodash.camelcase "^4.1.1"
lodash.defaultsdeep "^4.6.0"
lodash.kebabcase "^4.0.1"
lodash.snakecase "^4.0.1"
eslint-ast-utils "^1.1.0"
eslint-template-visitor "^1.1.0"
import-modules "^2.0.0"
lodash.camelcase "^4.3.0"
lodash.defaultsdeep "^4.6.1"
lodash.kebabcase "^4.1.1"
lodash.snakecase "^4.1.1"
lodash.topairs "^4.3.0"
lodash.upperfirst "^4.2.0"
regexpp "^2.0.1"
lodash.upperfirst "^4.3.1"
read-pkg-up "^7.0.0"
regexpp "^3.0.0"
reserved-words "^0.1.2"
safe-regex "^2.0.1"
safe-regex "^2.1.1"
semver "^6.3.0"
eslint-plugin-vue@^5.2.3:
version "5.2.3"
resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-5.2.3.tgz#3ee7597d823b5478804b2feba9863b1b74273961"
integrity sha512-mGwMqbbJf0+VvpGR5Lllq0PMxvTdrZ/ZPjmhkacrCHbubJeJOt+T6E3HUzAifa2Mxi7RSdJfC9HFpOeSYVMMIw==
eslint-plugin-vue@^6.0.1:
version "6.0.1"
resolved "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-6.0.1.tgz#166d3eb24cf290f3ff24d44fe9fca496f3924fc2"
integrity sha512-5tgFPcxGDKjfVB/6Yi56bKiWxygUibfZmzSh26Np3kuwAk/lfaGbVld+Yt+MPgD84ppvcachtiL4/winsXLjXA==
dependencies:
vue-eslint-parser "^5.0.0"
vue-eslint-parser "^6.0.5"
eslint-scope@^4.0.0, eslint-scope@^4.0.3:
version "4.0.3"
@ -4725,6 +4739,15 @@ eslint-scope@^5.0.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint-template-visitor@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-1.1.0.tgz#f090d124d1a52e05552149fc50468ed59608b166"
integrity sha512-Lmy6QVlmFiIGl5fPi+8ACnov3sare+0Ouf7deJAGGhmUfeWJ5fVarELUxZRpsZ9sHejiJUq8626d0dn9uvcZTw==
dependencies:
eslint-visitor-keys "^1.1.0"
espree "^6.1.1"
multimap "^1.0.2"
eslint-utils@^1.4.2, eslint-utils@^1.4.3:
version "1.4.3"
resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
@ -4785,16 +4808,16 @@ esm@^3.2.25:
resolved "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
espree@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz#728d5451e0fd156c04384a7ad89ed51ff54eb25f"
integrity sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==
espree@^5.0.0:
version "5.0.1"
resolved "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a"
integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==
dependencies:
acorn "^6.0.2"
acorn "^6.0.7"
acorn-jsx "^5.0.0"
eslint-visitor-keys "^1.0.0"
espree@^6.1.2:
espree@^6.1.1, espree@^6.1.2:
version "6.1.2"
resolved "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
@ -5201,7 +5224,7 @@ find-up@^3.0.0:
dependencies:
locate-path "^3.0.0"
find-up@^4.0.0:
find-up@^4.0.0, find-up@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
@ -5994,10 +6017,10 @@ import-local@^2.0.0:
pkg-dir "^3.0.0"
resolve-cwd "^2.0.0"
import-modules@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/import-modules/-/import-modules-1.1.0.tgz#748db79c5cc42bb9701efab424f894e72600e9dc"
integrity sha1-dI23nFzEK7lwHvq0JPiU5yYA6dw=
import-modules@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/import-modules/-/import-modules-2.0.0.tgz#9c1e13b4e7a15682f70a6e3fa29534e4540cfc5d"
integrity sha512-iczM/v9drffdNnABOKwj0f9G3cFDon99VcG1mxeBsdqnbd+vnQ5c2uAiCHNQITqFTOPaEvwg3VjoWCur0uHLEw==
imurmurhash@^0.1.4:
version "0.1.4"
@ -7167,6 +7190,11 @@ levn@^0.3.0, levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"
lines-and-columns@^1.1.6:
version "1.1.6"
resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00"
integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=
load-json-file@^1.0.0:
version "1.1.0"
resolved "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0"
@ -7266,7 +7294,7 @@ lodash._reinterpolate@^3.0.0:
resolved "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=
lodash.camelcase@^4.1.1:
lodash.camelcase@^4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY=
@ -7276,7 +7304,7 @@ lodash.clonedeep@^4.5.0:
resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
lodash.defaultsdeep@^4.6.0:
lodash.defaultsdeep@^4.6.1:
version "4.6.1"
resolved "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"
integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==
@ -7291,7 +7319,7 @@ lodash.ismatch@^4.4.0:
resolved "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37"
integrity sha1-dWy1FQyjum8RCFp4hJZF8Yj4Xzc=
lodash.kebabcase@^4.0.1, lodash.kebabcase@^4.1.1:
lodash.kebabcase@^4.1.1:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36"
integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY=
@ -7306,7 +7334,7 @@ lodash.set@^4.3.2:
resolved "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
lodash.snakecase@^4.0.1:
lodash.snakecase@^4.1.1:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40=
@ -7346,7 +7374,7 @@ lodash.uniq@^4.5.0:
resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=
lodash.upperfirst@^4.2.0:
lodash.upperfirst@^4.3.1:
version "4.3.1"
resolved "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=
@ -7826,6 +7854,11 @@ ms@^2.0.0, ms@^2.1.1:
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
multimap@^1.0.2:
version "1.1.0"
resolved "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8"
integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==
multimatch@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz#0e2534cc6bc238d9ab67e1b9cd5fcd85a6dbf70b"
@ -8573,6 +8606,16 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
parse-json@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz#73e5114c986d143efa3712d4ea24db9a4266f60f"
integrity sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==
dependencies:
"@babel/code-frame" "^7.0.0"
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
lines-and-columns "^1.1.6"
parse-path@^4.0.0:
version "4.0.1"
resolved "https://registry.npmjs.org/parse-path/-/parse-path-4.0.1.tgz#0ec769704949778cb3b8eda5e994c32073a1adff"
@ -9799,6 +9842,15 @@ read-pkg-up@^4.0.0:
find-up "^3.0.0"
read-pkg "^3.0.0"
read-pkg-up@^7.0.0:
version "7.0.0"
resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.0.tgz#3f3e53858ec5ae5e6fe14bc479da0a7c98f85ff3"
integrity sha512-t2ODkS/vTTcRlKwZiZsaLGb5iwfx9Urp924aGzVyboU6+7Z2i6eGr/G1Z4mjvwLLQV3uFOBKobNRGM3ux2PD/w==
dependencies:
find-up "^4.1.0"
read-pkg "^5.2.0"
type-fest "^0.8.1"
read-pkg@^1.0.0:
version "1.1.0"
resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28"
@ -9826,6 +9878,16 @@ read-pkg@^3.0.0:
normalize-package-data "^2.3.2"
path-type "^3.0.0"
read-pkg@^5.2.0:
version "5.2.0"
resolved "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz#7bf295438ca5a33e56cd30e053b34ee7250c93cc"
integrity sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==
dependencies:
"@types/normalize-package-data" "^2.4.0"
normalize-package-data "^2.5.0"
parse-json "^5.0.0"
type-fest "^0.6.0"
read@1, read@~1.0.1:
version "1.0.7"
resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4"
@ -9951,6 +10013,11 @@ regexpp@^2.0.1:
resolved "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
regexpp@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz#dd63982ee3300e67b41c1956f850aa680d9d330e"
integrity sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==
regexpu-core@^4.6.0:
version "4.6.0"
resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz#2037c18b327cfce8a6fea2a4ec441f2432afb8b6"
@ -10299,7 +10366,7 @@ safe-regex@^1.1.0:
dependencies:
ret "~0.1.10"
safe-regex@^2.0.1:
safe-regex@^2.1.1:
version "2.1.1"
resolved "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2"
integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==
@ -10394,11 +10461,6 @@ scss-tokenizer@^0.2.3:
resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
semver@5.5.0:
version "5.5.0"
resolved "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
semver@^6.0.0, semver@^6.1.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0:
version "6.3.0"
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
@ -11441,11 +11503,18 @@ ts-jest@^23.10.5:
semver "^5.5"
yargs-parser "10.x"
tslib@^1.9.0:
tslib@^1.8.1, tslib@^1.9.0:
version "1.10.0"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
tsutils@^3.17.1:
version "3.17.1"
resolved "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759"
integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==
dependencies:
tslib "^1.8.1"
tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@ -11480,6 +11549,11 @@ type-fest@^0.5.2:
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2"
integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==
type-fest@^0.6.0:
version "0.6.0"
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b"
integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==
type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
@ -11768,15 +11842,15 @@ vue-client-only@^2.0.0:
resolved "https://registry.npmjs.org/vue-client-only/-/vue-client-only-2.0.0.tgz#ddad8d675ee02c761a14229f0e440e219de1da1c"
integrity sha512-arhk1wtWAfLsJyxGMoEYhoBowM87/i6HLSG2LH/03Yog6i2d9JEN1peMP0Ceis+/n9DxdenGYZZTxbPPJyHciA==
vue-eslint-parser@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz#00f4e4da94ec974b821a26ff0ed0f7a78402b8a1"
integrity sha512-JlHVZwBBTNVvzmifwjpZYn0oPWH2SgWv5dojlZBsrhablDu95VFD+hriB1rQGwbD+bms6g+rAFhQHk6+NyiS6g==
vue-eslint-parser@^6.0.5:
version "6.0.5"
resolved "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-6.0.5.tgz#c1c067c2755748e28f3872cd42e8c1c4c1a8059f"
integrity sha512-Bvjlx7rH1Ulvus56KHeLXOjEi3JMOYTa1GAqZr9lBQhd8weK8mV7U7V2l85yokBZEWHJQjLn6X3nosY8TzkOKg==
dependencies:
debug "^4.1.0"
debug "^4.1.1"
eslint-scope "^4.0.0"
eslint-visitor-keys "^1.0.0"
espree "^4.1.0"
espree "^5.0.0"
esquery "^1.0.1"
lodash "^4.17.11"