Skip to content

Commit

Permalink
chore: upgrade eslint config and fix issues (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
mercs600 committed Oct 19, 2021
1 parent 72d9abe commit 890e148
Show file tree
Hide file tree
Showing 42 changed files with 87 additions and 91 deletions.
5 changes: 1 addition & 4 deletions example/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ module.exports = {
browser: true,
node: true
},
rules: {
'prettierx/options': ['error', { semi: false }]
},
extends: ['macopedia/vue']
extends: ['macopedia/nuxt']
// add your custom rules here
}
2 changes: 1 addition & 1 deletion example/components/Logo.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<template>
<img src="/logo.svg" alt="nuxt-typo3 logo" />
<img src="/logo.svg" alt="nuxt-typo3 logo">
</template>
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@nuxtjs/stylelint-module": "^3.1.0",
"babel-eslint": "^10.0.1",
"eslint": "^7.20.0",
"eslint-config-macopedia": "^0.2.0",
"eslint-config-macopedia": "^0.2.0-alpha.1",
"eslint-plugin-nuxt": ">=0.4.2",
"sass": "^1.42.1",
"sass-loader": "10",
Expand Down
8 changes: 4 additions & 4 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4965,10 +4965,10 @@ eslint-config-airbnb-base@^14.2.1:
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-macopedia@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/eslint-config-macopedia/-/eslint-config-macopedia-0.2.0.tgz#7ec68c8b677f55c41001c575702a1603924de193"
integrity sha512-Wa2gHBCbVwG6C2wCNm2/i70bnMXMmk7pAyB7ldCBAYOGxd4cFzu3QpwjKZCsF3X7lmSbXOjjmjLslRwetPe5qg==
eslint-config-macopedia@^0.2.0-alpha.1:
version "0.2.0-alpha.1"
resolved "https://registry.yarnpkg.com/eslint-config-macopedia/-/eslint-config-macopedia-0.2.0-alpha.1.tgz#3879d5631aaaa062d64df6b5c26d385563f70abb"
integrity sha512-azY25FN0OfbZArZ2xMYKGQD6HCQlvLqMd849ARwBsOzqQUpOYmd7X6Lj0+Ro70OqrkfWsgga3ZX0JzzZMBXbRQ==
dependencies:
"@nuxtjs/eslint-config" "^5.0.0"
"@nuxtjs/eslint-config-typescript" "^5.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-typo3-ce/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"babel-loader": "^8.1.0",
"babel-plugin-transform-require-context": "^0.1.1",
"eslint": "^7.10.0",
"eslint-config-macopedia": "^0.1.0",
"eslint-config-macopedia": "^0.2.0-alpha.1",
"flush-promises": "^1.0.2",
"fork-ts-checker-webpack-plugin": "^5.2.0",
"nuxt-typo3": "^0.9.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt-typo3-ce/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export default {

<style lang="scss" module>
#app {
color: #2c3e50;
font-family: Avenir, Helvetica, Arial, sans-serif;
text-align: center;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineComponent({
bulletsType: {
type: Number,
default: 0
},
}
},
setup (props: CeSharedProps) {
const sharedProps = getSharedProps(props)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CeDynamic from './CeDynamic.vue'
const CeTextMock = {
name: 'CeText',
props: ['id', 'header', 'bodytext'],
template: `<div class="ce-text-mock"><h1>{{header}}</h1>{{bodytext}}</div>`
template: '<div class="ce-text-mock"><h1>{{header}}</h1>{{bodytext}}</div>'
}

describe('CeDynamic', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default defineComponent({
this.$root.$options.components &&
!this.$root.$options.components[componentName]
) {
componentName = `CeDefault`
componentName = 'CeDefault'
}
return createElement(componentName, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export const CeRendererMockData = {
padding: 0
},
rows: {
'1': {
1: {
columns: {
'1': {
1: {
publicUrl: 'https://image.jpg',
properties: {
title: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CeDynamic from '../CeDynamic'
// Mock CeDynamic
const CeDynamicMock = {
props: ['data', 'type', 'index'],
template: `<div class="ce-dnymaic">{{JSON.stringify($props)}}</div>`
template: '<div class="ce-dnymaic">{{JSON.stringify($props)}}</div>'
}

// Mock CeFrame
Expand All @@ -17,7 +17,7 @@ const CeFrameMock = {

const CeDefault = {
props: ['data', 'type', 'index'],
template: `<div class="ce-default">{{JSON.stringify($props)}}</div>`
template: '<div class="ce-default">{{JSON.stringify($props)}}</div>'
}

describe('CeRenderer with mocked components', () => {
Expand All @@ -29,7 +29,7 @@ describe('CeRenderer with mocked components', () => {
const wrappedRenderer = {
inheritAttrs: false,
components: { CeRenderer },
template: `<div><CeRenderer v-bind="$attrs"/></div>`
template: '<div><CeRenderer v-bind="$attrs"/></div>'
}

const prepareFrame = {
Expand Down Expand Up @@ -83,7 +83,7 @@ describe('CeRenderer with true components', () => {
const wrappedRenderer = {
inheritAttrs: false,
components: { CeRenderer },
template: `<div><CeRenderer v-bind="$attrs"/></div>`
template: '<div><CeRenderer v-bind="$attrs"/></div>'
}

const prepareFrame = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import CeRenderer from '../CeRenderer'
// Mock CeDynamic
const CeDynamicMock = {
props: ['data', 'type', 'index'],
template: `<div class="ce-dnymaic">{{JSON.stringify($props)}}</div>`
template: '<div class="ce-dnymaic">{{JSON.stringify($props)}}</div>'
}

// Mock CeFrame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { mockData } from './CeUploads.data'
import CeUploads from './CeUploads.vue'

const CeHeaderMock = Vue.component('CeHeader', {
template: `<div> hello </div>`
template: '<div> hello </div>'
})

const NavLinkMock = Vue.component('NavLink', {
template: `<div> <slot/> </div>`
template: '<div> <slot/> </div>'
})

const CeMediaFileMock = Vue.component('CeMediaFile', {
Expand All @@ -18,7 +18,7 @@ const CeMediaFileMock = Vue.component('CeMediaFile', {
required: true
}
},
template: `<img :src="file.publicUrl" />`
template: '<img :src="file.publicUrl" />'
})

describe('CeUploads', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-typo3-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"babel-plugin-transform-require-context": "^0.1.1",
"cross-env": "^7.0.3",
"eslint": "^7.10.0",
"eslint-config-macopedia": "^0.1.0",
"eslint-config-macopedia": "^0.2.0-alpha.1",
"eslint-plugin-vuejs-accessibility": "^0.6.1",
"flush-promises": "^1.0.2",
"fork-ts-checker-webpack-plugin": "^5.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt-typo3-theme/src/components/CeDiv/CeDiv.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ $divider-color-layout-1: $palette-gallery;
}
.ce-div {
height: 1px;
display: block;
border: none;
height: 1px;
background: var(--color-divider);
border: none;
&--layout-1 {
background: var(--color-divider-layout-1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ export default CeGalleryTheme as typeof CeGallery & typeof CeGalleryTheme
}
figcaption {
font-weight: var(--font-weight-medium);
margin-bottom: var(--space-3);
font-weight: var(--font-weight-medium);
text-align: left;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,29 @@ $color-menu-pages: $palette-mercury;
.ce-menu-pages {
ul {
background: var(--color-menu-pages);
font-size: var(--font-size-lg);
background: var(--color-menu-pages);
@include media-query(md) {
display: flex;
flex-wrap: wrap;
}
li {
padding: var(--space-4) var(--space-4);
position: relative;
padding: var(--space-4) var(--space-4);
ul {
top: 100%;
display: none;
min-width: 100%;
border-top: 1px solid var(--color-bg-secondary);
margin-top: var(--space-4);
margin-bottom: -1.6rem;
display: none;
border-top: 1px solid var(--color-bg-secondary);
@include media-query(md) {
margin-top: 0;
position: absolute;
margin-top: 0;
}
li {
Expand All @@ -74,38 +74,38 @@ $color-menu-pages: $palette-mercury;
margin-right: 1rem;
&::after {
content: '';
position: absolute;
top: 50%;
transform: translateY(-50%);
display: block;
background-size: cover;
margin-top: 0.1rem;
background-size: cover;
transform: translateY(-50%);
content: '';
}
}
&[target='_blank']::after {
background-image: url('../../assets/icons/externalLink.svg');
right: -1.8rem;
width: 1rem;
height: 1rem;
right: -1.8rem;
background-image: url('../../assets/icons/externalLink.svg');
}
&.has-children::after {
background-image: url('../../assets/icons/chevron.svg');
right: -2.5rem;
width: 1.7rem;
height: 1.1rem;
right: -2.5rem;
background-image: url('../../assets/icons/chevron.svg');
}
}
&::before {
position: static;
content: '\25CF';
margin-right: 1em;
color: currentColor;
font-size: 0.5em;
vertical-align: middle;
color: currentColor;
margin-right: 1em;
content: '\25CF';
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export const mockData = {
subheader: 'Subheader',
headerLayout: 3,
bodytext: `<p>Lorem ipsum Unta Dolor sit amet. Sapiente minima veritatis consequuntur perspiciatis. Consectetur adipisicing elit. Sapiente minima veritatis consequuntur perspiciatis.</p>
<ul> <li>List Element 1</li> <li>List Element 1 <ol> <li>List Element 1</li> <li>List Element 1</li> <li>List Element 1</li> </ol> </li> <li>List Element 1</li> <li>List Element 1</li> </ul>
<ul><li>List Element 1</li><li>List Element 1<ol> <li>List Element 1</li><li>List Element 1</li> <li>List Element 1</li> </ol> </li><li>List Element 1</li><li>List Element 1</li> </ul>
`
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mockData } from './CeUploads.data'
import CeUploads from './CeUploads.vue'
Vue.use(VueCompositionApi)
const CeHeaderMock = Vue.component('CeHeader', {
template: `<div> hello </div>`
template: '<div> hello </div>'
})

describe('CeUploads', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ export default defineComponent({

<style lang="scss">
.ui-breadcrumbs {
margin: var(--space-3) 0;
display: flex;
align-items: baseline;
margin: var(--space-3) 0;
&__list {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export default defineComponent({
padding: var(--space-2);
@include media-query(sm) {
padding: var(--space-2) var(--space-10);
min-width: 28.4rem;
padding: var(--space-2) var(--space-10);
}
@include text(xl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export default defineComponent({
<style lang="scss">
.error {
display: flex;
align-items: center;
flex-direction: column;
align-items: center;
.error__logo {
margin: 5rem 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export default defineComponent({
list-style: none;
&__file {
align-items: flex-start;
display: flex;
align-items: flex-start;
.file__image {
text-align: center;
flex: 0 0 auto;
margin: 0 var(--space-5) 0 0;
text-align: center;
img {
width: 3em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('UiFrame', () => {
CeDiv
},
slots: {
default: `<CeDiv />`
default: '<CeDiv />'
}
}

Expand Down Expand Up @@ -52,7 +52,7 @@ describe('UiFrame', () => {
CeDiv
},
slots: {
default: `<CeDiv />`
default: '<CeDiv />'
}
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ export default UiContainer as typeof UiContainer
.container {
width: 100%;
margin-left: auto;
margin-right: auto;
padding-left: #{math.div($grid-gutter-width, 2)};
margin-left: auto;
padding-right: #{math.div($grid-gutter-width, 2)};
padding-left: #{math.div($grid-gutter-width, 2)};
@include media-query(sm) {
max-width: map.get($container-max-widths, sm);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export default UiRow as typeof UiRow
display: flex;
flex-wrap: wrap;
height: 100%;
margin-left: #{- (math.div($grid-gutter-width, 2))};
margin-right: #{- (math.div($grid-gutter-width, 2))};
margin-left: #{- (math.div($grid-gutter-width, 2))};
&.no-gutters {
> .col,
> [class*='col-'] {
padding-left: 0 !important;
padding-right: 0 !important;
padding-left: 0 !important;
}
}
}
Expand Down
Loading

0 comments on commit 890e148

Please sign in to comment.