Skip to content

Commit

Permalink
multiple lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cadgerfeast committed Jan 5, 2021
1 parent 7c74083 commit c33f402
Show file tree
Hide file tree
Showing 25 changed files with 104 additions and 100 deletions.
7 changes: 7 additions & 0 deletions docs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/.nuxt
/coverage
/dist
/plugins/libs
/static/sw.js
/node_modules
/.eslintrc.js
25 changes: 23 additions & 2 deletions docs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,26 @@ module.exports = {
plugins: [
],
// add your custom rules here
rules: {}
}
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'semi': [2, 'always'],
'import/order': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'indent': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/html-self-closing': 'off',
'vue/attributes-order': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/no-v-html': 'off',
'vue/order-in-components': 'off',
'quote-props': 'off',
'vue/html-closing-bracket-newline': [2, {
singleline: 'never',
multiline: 'never'
}],
'no-tabs': 'off',
'vue/html-indent': 'off',
'vue/name-property-casing': 'off'
}
};
14 changes: 7 additions & 7 deletions docs/components/Circuit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ export default {
default: () => { return {}; }
}
},
computed: {
disabled () {
return !this.concurrent && this.active;
}
},
data () {
return {
shouldSucceed: true,
Expand All @@ -71,8 +66,13 @@ export default {
logs: ''
};
},
computed: {
disabled () {
return !this.concurrent && this.active;
}
},
methods: {
async request (delay) {
request (delay) {
return new Promise((resolve, reject) => {
setTimeout(() => {
if (this.shouldSucceed) {
Expand Down Expand Up @@ -118,7 +118,7 @@ export default {
updated () {
this.circuit.modules = this.modules;
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
4 changes: 2 additions & 2 deletions docs/components/DataCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default {
return {
'width': this.size,
'height': this.size,
'background-color': this.color,
'background-color': this.color
};
},
tooltipStyle () {
Expand All @@ -40,7 +40,7 @@ export default {
};
}
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
9 changes: 2 additions & 7 deletions docs/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
</ul>
<ul class="madoc-navbar-list right">
<li v-if="navbar.github" class="icon">
<a :href="navbar.github.link" target='_blank'>
<Github/>
</a>
<a :href="navbar.github.link" target="_blank"><Github/></a>
</li>
</ul>
</nav>
Expand All @@ -32,11 +30,8 @@ export default {
props: {
navbar: {
type: Object,
default: {}
default: () => { return {}; }
}
},
data () {
return {};
}
};
</script>
Expand Down
5 changes: 1 addition & 4 deletions docs/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ export default {
props: {
sidebar: {
type: Object,
default: {}
default: () => { return {}; }
}
},
data () {
return {};
},
computed: {
groups () {
const groups = {};
Expand Down
7 changes: 1 addition & 6 deletions docs/components/Toggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,12 @@ export default {
default: ''
}
},
data () {
return {
// value: false
};
},
methods: {
onInput () {
this.$emit('input', !this.value);
}
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="mollitia-playground">
<Circuit ref="c1" :modules="modules">
<Sliding slidingType="count" ref="cb1"></Sliding>
<Sliding sliding-type="count" ref="cb1"></Sliding>
</Circuit>
</div>
</template>
Expand All @@ -25,7 +25,7 @@ export default {
this.circuit = this.$refs.c1.circuit;
this.modules.push(this.$refs.cb1.slidingWindowBreaker);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
6 changes: 3 additions & 3 deletions docs/components/global/playground/breaker/sliding/pg-time.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="mollitia-playground">
<Circuit ref="c1" :modules="modules">
<Sliding slidingType="time" ref="tb1"></Sliding>
<Sliding sliding-type="time" ref="tb1"></Sliding>
</Circuit>
</div>
</template>
Expand All @@ -25,11 +25,11 @@ export default {
this.circuit = this.$refs.c1.circuit;
this.modules.push(this.$refs.tb1.slidingWindowBreaker);
}
}
};
</script>

<style lang="scss" scoped>
div.mollitia-playground {
height: 100%;
}
</style>
</style>
12 changes: 10 additions & 2 deletions docs/components/global/playground/pg-bulkhead.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<template>
<div class="mollitia-playground">
<Circuit ref="c1" @start="randomizeColor" :modules="modules" :concurrent="true" :success-params="successParams" :failure-params="failureParams" :init-time="4000" :can-fail="false">
<Circuit
ref="c1"
@start="randomizeColor"
:modules="modules"
:concurrent="true"
:success-params="successParams"
:failure-params="failureParams"
:init-time="4000"
:can-fail="false">
<Bulkhead ref="b1"></Bulkhead>
</Circuit>
</div>
Expand Down Expand Up @@ -50,7 +58,7 @@ export default {
this.circuit = this.$refs.c1.circuit;
this.modules.push(this.$refs.b1.bulkhead);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/global/playground/pg-cache.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
mounted () {
this.modules.push(this.$refs.ca1.cache);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/global/playground/pg-ratelimit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
this.circuit = this.$refs.c1.circuit;
this.modules.push(this.$refs.rl1.ratelimit);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/global/playground/pg-retry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default {
mounted () {
this.modules.push(this.$refs.r1.retry);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/global/playground/pg-timeout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {
mounted () {
this.modules.push(this.$refs.t1.timeout);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/components/module/Bulkhead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default {
maxQueueWait: this.maxQueueWait
});
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
9 changes: 3 additions & 6 deletions docs/components/module/Cache.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,16 @@ export default {
time () {
return this.$parent.time;
},
width () {
return;
},
timeStyle () {
return {
'width': `${this.timePercent}%`
}
};
},
style () {
return {
'width': `${this.percent}%`,
'background-color': this.cached ? 'var(--mollitia-success-color)' : 'var(--mollitia-error-color)'
}
};
}
},
methods: {
Expand Down Expand Up @@ -115,7 +112,7 @@ export default {
clearInterval(this.interval);
this.cache.off('execute', this.onExecute);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
16 changes: 7 additions & 9 deletions docs/components/module/RateLimit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
var index = 0;
let index = 0;
export default {
name: 'Ratelimit',
props: {
Expand All @@ -52,7 +52,7 @@ export default {
return {
'width': `${this.percent}%`,
'background-color': 'var(--mollitia-info-color)'
}
};
}
},
methods: {
Expand All @@ -65,7 +65,7 @@ export default {
if (this.results.length === 10) {
this.results.shift();
}
this.results.push({id: index++, value: true});
this.results.push({ id: index++, value: true });
this.timeForRequests.push(new Date().getTime());
if (!this.interval) {
this.percent = 0;
Expand All @@ -89,30 +89,28 @@ export default {
if (this.results.length === 10) {
this.results.shift();
}
this.results.push({id: index++, value: false});
this.results.push({ id: index++, value: false });
}
},
created () {
this.ratelimit = new this.$mollitia.Ratelimit({
limitPeriod: this.limitPeriod,
limitForPeriod: this.limitForPeriod,
limitForPeriod: this.limitForPeriod
});
this.ratelimit.on('ratelimit', this.onRatelimit);
}
}
};
</script>

<style lang="scss" scoped>
.mollitia-module-rate-limit {
padding: 10px;
border: 1px solid var(--madoc-grey-5);
}
.mollitia-module-rate-limit-header {
padding: 10px;
border-bottom: 1px solid var(--madoc-grey-5);
}
.mollitia-module-rate-limit-content {
display: flex;
.mollitia-module-rate-limit-config {
Expand Down Expand Up @@ -171,5 +169,5 @@ export default {
}
}
}
}
}
</style>
5 changes: 2 additions & 3 deletions docs/components/module/Retry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
cleanup () {
this.requests = new Array(this.retries).fill(0, 0, this.retries);
this.intervals = new Array(this.retries);
for (let i=0;i<=this.retries;i++) {
for (let i = 0; i <= this.retries; i++) {
this.$refs[`progress-${i}`][0].style.width = 0;
}
},
Expand Down Expand Up @@ -102,7 +102,6 @@ export default {
}
}
},
created () {
this.requests = new Array(this.attempts).fill(0, 0, this.attempts);
this.retry = new this.$mollitia.Retry({
Expand All @@ -118,7 +117,7 @@ export default {
this.retry.off('execute', this.onExecute);
this.retry.off('retry', this.onRetry);
}
}
};
</script>

<style lang="scss" scoped>
Expand Down
Loading

0 comments on commit c33f402

Please sign in to comment.