ci: Ensure that eslint runs on all frontend code (no-changelog) (#4602)

* ensure that eslint runs on all frontend code

* remove tslint from `design-system`

* enable prettier and eslint-prettier for `design-system`

* Delete tslint.json

* use a single editorconfig for the repo

* enable prettier for all code in `design-system`

* more linting fixes on design-system

* ignore coverage for git and prettier

* lintfix on editor-ui
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-15 18:20:54 +01:00
committed by GitHub
parent d96d6f11db
commit 13659d036f
227 changed files with 2222 additions and 2566 deletions

View File

@@ -17,11 +17,22 @@ export default Vue.extend({
size: {
type: String,
default: 'medium',
validator: (value: string): boolean => ['xsmall', 'small', 'mini', 'medium', 'large', 'xlarge'].includes(value),
validator: (value: string): boolean =>
['xsmall', 'small', 'mini', 'medium', 'large', 'xlarge'].includes(value),
},
color: {
type: String,
validator: (value: string): boolean => ['primary', 'text-dark', 'text-base', 'text-light', 'text-xlight', 'danger', 'success', 'warning'].includes(value),
validator: (value: string): boolean =>
[
'primary',
'text-dark',
'text-base',
'text-light',
'text-xlight',
'danger',
'success',
'warning',
].includes(value),
},
align: {
type: String,
@@ -40,6 +51,7 @@ export default Vue.extend({
classes() {
const applied = [];
if (this.align) {
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
applied.push(`align-${this.align}`);
}
if (this.color) {
@@ -50,9 +62,10 @@ export default Vue.extend({
applied.push('compact');
}
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
applied.push(`size-${this.size}`);
applied.push(this.bold? 'bold': 'regular');
applied.push(this.bold ? 'bold' : 'regular');
return applied.map((c) => (this.$style as { [key: string]: string })[c]);
},
@@ -141,5 +154,4 @@ export default Vue.extend({
.align-center {
text-align: center;
}
</style>