Skip to content

Commit

Permalink
style(eslint9): add solid, mithril, angular, react, aurelia, vue, qwi…
Browse files Browse the repository at this point in the history
…k eslint configs
  • Loading branch information
matschik committed Oct 11, 2024
1 parent db4f6dd commit b953586
Show file tree
Hide file tree
Showing 20 changed files with 535 additions and 62 deletions.
8 changes: 6 additions & 2 deletions content/2-templating/2-styling/vue2/CssStyle.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<template>
<div>
<h1 class="title">I am red</h1>
<button style="font-size: 10rem">I am a button</button>
<h1 class="title">
I am red
</h1>
<button style="font-size: 10rem">
I am a button
</button>
</div>
</template>

Expand Down
8 changes: 6 additions & 2 deletions content/2-templating/2-styling/vue3/CssStyle.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<template>
<h1 class="title">I am red</h1>
<button style="font-size: 10rem">I am a button</button>
<h1 class="title">
I am red
</h1>
<button style="font-size: 10rem">
I am a button
</button>
</template>

<style scoped>
Expand Down
4 changes: 3 additions & 1 deletion content/2-templating/4-event-click/vue2/Counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export default {
<template>
<div>
<p>Counter: {{ count }}</p>
<button @click="incrementCount">+1</button>
<button @click="incrementCount">
+1
</button>
</div>
</template>
4 changes: 3 additions & 1 deletion content/2-templating/4-event-click/vue3/Counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ function incrementCount() {

<template>
<p>Counter: {{ count }}</p>
<button @click="incrementCount">+1</button>
<button @click="incrementCount">
+1
</button>
</template>
4 changes: 3 additions & 1 deletion content/2-templating/6-conditional/vue2/TrafficLight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default {

<template>
<div>
<button @click="nextLight">Next light</button>
<button @click="nextLight">
Next light
</button>
<p>Light is: {{ light }}</p>
<p>
You must
Expand Down
4 changes: 3 additions & 1 deletion content/2-templating/6-conditional/vue3/TrafficLight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ function nextLight() {
</script>

<template>
<button @click="nextLight">Next light</button>
<button @click="nextLight">
Next light
</button>
<p>Light is: {{ light }}</p>
<p>
You must
Expand Down
4 changes: 2 additions & 2 deletions content/3-lifecycle/2-on-unmount/aurelia1/time.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export class Time {
time: string = new Date().toLocaleTimeString();
timer: any;
timer: number;

constructor() {
this.timer = setInterval(() => {
this.timer = window.setInterval(() => {
this.time = new Date().toLocaleTimeString();
}, 1000);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { Component, Input } from "@angular/core";
`,
})
export class UserprofileComponent {
@Input() name: string = "";
@Input() age: number = 0;
@Input() name = "";
@Input() age = 0;
@Input() favouriteColors: string[] = [];
@Input() isAvailable: boolean = false;
@Input() isAvailable = false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ export default {

<template>
<div>
<button @click="clickYes">YES</button>
<button @click="clickYes">
YES
</button>

<button @click="clickNo">NO</button>
<button @click="clickNo">
NO
</button>
</div>
</template>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ function clickNo() {
</script>

<template>
<button @click="clickYes">YES</button>
<button @click="clickYes">
YES
</button>

<button @click="clickNo">NO</button>
<button @click="clickNo">
NO
</button>
</template>
2 changes: 1 addition & 1 deletion content/7-webapp-features/1-render-app/qwik/app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { component$, useSignal } from "@builder.io/qwik";
import { component$ } from "@builder.io/qwik";

export const App = component$(() => {
return <h1>Hello world</h1>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class UserService {

export interface UserResponse {
results: User[];
info: any;
info: unknown;
}

export interface User {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component } from "@angular/core";
import { Observable } from "rxjs";
import { UserService } from "./user.service";

@Component({
Expand Down
1 change: 0 additions & 1 deletion content/7-webapp-features/2-fetch-data/aurelia2/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { UseFetchUsers } from "./UseFetchUsers";

export class App {
// eslint-disable-next-line no-unused-vars
constructor(private useFetchUsers: UseFetchUsers) {}
}
8 changes: 6 additions & 2 deletions content/7-webapp-features/2-fetch-data/vue2/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ export default {
</script>

<template>
<p v-if="isLoading">Fetching users...</p>
<p v-else-if="error">An error ocurred while fetching users</p>
<p v-if="isLoading">
Fetching users...
</p>
<p v-else-if="error">
An error ocurred while fetching users
</p>
<ul v-else-if="users">
<li
v-for="user in users"
Expand Down
8 changes: 6 additions & 2 deletions content/7-webapp-features/2-fetch-data/vue3/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ const { isLoading, error, data: users } = useFetchUsers();
</script>

<template>
<p v-if="isLoading">Fetching users...</p>
<p v-else-if="error">An error ocurred while fetching users</p>
<p v-if="isLoading">
Fetching users...
</p>
<p v-else-if="error">
An error ocurred while fetching users
</p>
<ul v-else-if="users">
<li
v-for="user in users"
Expand Down
Loading

0 comments on commit b953586

Please sign in to comment.