Refactor code to comply with ESLint rules
Major refactoring using ESLint with rules from AirBnb and Vue. Enable most of the ESLint rules and do necessary linting in the code. Also add more information for rules that are disabled to describe what they are and why they are disabled. Allow logging (`console.log`) in test files, and in development mode (e.g. when working with `npm run serve`), but disable it when environment is production (as pre-configured by Vue). Also add flag (`--mode production`) in `lint:eslint` command so production linting is executed earlier in lifecycle. Disable rules that requires a separate work. Such as ESLint rules that are broken in TypeScript: no-useless-constructor (eslint/eslint#14118) and no-shadow (eslint/eslint#13014).
This commit is contained in:
@@ -1,33 +1,39 @@
|
||||
<template>
|
||||
<div class="privacy-policy">
|
||||
<div v-if="!isDesktop" class="line">
|
||||
<div class="line__emoji">🚫🍪</div>
|
||||
<div>No cookies!</div>
|
||||
</div>
|
||||
<div v-if="isDesktop" class="line">
|
||||
<div class="line__emoji">🚫🌐</div>
|
||||
<div>Everything is offline, except single request GitHub to check for updates on application start.</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🚫👀</div>
|
||||
<div>No user behavior / IP address collection!</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🤖</div>
|
||||
<div>All transparent: Deployed automatically from the master branch
|
||||
of the <a :href="repositoryUrl" target="_blank">source code</a> with no changes.</div>
|
||||
</div>
|
||||
<div v-if="!isDesktop" class="line">
|
||||
<div class="line__emoji">📈</div>
|
||||
<div>Basic <a href="https://aws.amazon.com/cloudfront/reporting/" target="_blank">CDN statistics</a>
|
||||
are collected by AWS but they cannot be traced to you or your behavior. You can download the offline version if you don't want any CDN data collection.</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🎉</div>
|
||||
<div>As almost no data is collected, the application gets better only with your active feedback.
|
||||
Feel free to <a :href="feedbackUrl" target="_blank">create an issue</a> 😊</div>
|
||||
<div class="privacy-policy">
|
||||
<div v-if="!isDesktop" class="line">
|
||||
<div class="line__emoji">🚫🍪</div>
|
||||
<div>No cookies!</div>
|
||||
</div>
|
||||
<div v-if="isDesktop" class="line">
|
||||
<div class="line__emoji">🚫🌐</div>
|
||||
<div>
|
||||
Everything is offline, except single request GitHub
|
||||
to check for updates on application start.
|
||||
</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🚫👀</div>
|
||||
<div>No user behavior / IP address collection!</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🤖</div>
|
||||
<div>All transparent: Deployed automatically from the master branch
|
||||
of the <a :href="repositoryUrl" target="_blank">source code</a> with no changes.</div>
|
||||
</div>
|
||||
<div v-if="!isDesktop" class="line">
|
||||
<div class="line__emoji">📈</div>
|
||||
<div>Basic <a href="https://aws.amazon.com/cloudfront/reporting/" target="_blank">CDN statistics</a>
|
||||
are collected by AWS but they cannot be traced to you or your behavior.
|
||||
You can download the offline version if you don't want any CDN data collection.</div>
|
||||
</div>
|
||||
<div class="line">
|
||||
<div class="line__emoji">🎉</div>
|
||||
<div>
|
||||
As almost no data is collected, the application gets better
|
||||
only with your active feedback.
|
||||
Feel free to <a :href="feedbackUrl" target="_blank">create an issue</a> 😊</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
@@ -38,8 +44,10 @@ import { IApplication } from '@/domain/IApplication';
|
||||
|
||||
@Component
|
||||
export default class PrivacyPolicy extends Vue {
|
||||
public repositoryUrl: string = '';
|
||||
public feedbackUrl: string = '';
|
||||
public repositoryUrl = '';
|
||||
|
||||
public feedbackUrl = '';
|
||||
|
||||
public isDesktop = Environment.CurrentEnvironment.isDesktop;
|
||||
|
||||
public async created() {
|
||||
@@ -48,7 +56,7 @@ export default class PrivacyPolicy extends Vue {
|
||||
}
|
||||
|
||||
private initialize(app: IApplication) {
|
||||
const info = app.info;
|
||||
const { info } = app;
|
||||
this.repositoryUrl = info.repositoryWebUrl;
|
||||
this.feedbackUrl = info.feedbackUrl;
|
||||
}
|
||||
@@ -59,18 +67,18 @@ export default class PrivacyPolicy extends Vue {
|
||||
@use "@/presentation/assets/styles/main" as *;
|
||||
|
||||
.privacy-policy {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: $font-normal;
|
||||
text-align:center;
|
||||
|
||||
.line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: $font-normal;
|
||||
text-align:center;
|
||||
|
||||
.line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top:0.2rem;
|
||||
}
|
||||
&:not(:first-child) {
|
||||
margin-top:0.2rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user