[eslint] Enforce semis

This commit is contained in:
Alexis Sellier
2021-06-14 10:38:17 +02:00
parent 964e69a867
commit 618d49e201
10 changed files with 31 additions and 17 deletions
+15 -1
View File
@@ -23,8 +23,22 @@ module.exports = {
}
],
rules: {
indent: ["error", 2, { "SwitchCase": 1 }],
semi: "off", // We use the typescript-specific rule as it's more accurate.
"@typescript-eslint/no-explicit-any": "off",
indent: ["error", 2, { "SwitchCase": 1 }]
"@typescript-eslint/semi": ["error"],
"@typescript-eslint/member-delimiter-style": [
"warn", {
"multiline": {
"delimiter": "semi",
"requireLast": true,
},
"singleline": {
"delimiter": "semi",
"requireLast": false,
}
}
]
},
settings: {
"svelte3/typescript": true,
+5 -5
View File
@@ -1,10 +1,10 @@
<script context="module" lang="typescript">
export interface Field {
name: string
value: string | null
label?: string
placeholder?: string
editable: boolean
name: string;
value: string | null;
label?: string;
placeholder?: string;
editable: boolean;
}
</script>
+1 -1
View File
@@ -1,7 +1,7 @@
<script lang="typescript">
import { createEventDispatcher } from 'svelte';
export let options: { label: string, value: string }[];
export let options: { label: string; value: string }[];
export let name: string;
export let selected = "";
export let disabled = false;
+2 -2
View File
@@ -29,8 +29,8 @@ const GetOrgs = `
`;
export class Org {
address: string
owner: string
address: string;
owner: string;
constructor(address: string, owner: string) {
assert(ethers.utils.isAddress(address), "address must be valid");
+1 -1
View File
@@ -11,7 +11,7 @@
type State =
{ status: Status.Loading }
| { status: Status.Loaded }
| { status: Status.Error, error: string };
| { status: Status.Error; error: string };
export let project: proj.Project;
export let config: Config;
+1 -1
View File
@@ -19,7 +19,7 @@
let error: Error | null = null;
let registrationOwner = owner || session.address;
const view = () => navigate(`/registrations/${subdomain}`)
const view = () => navigate(`/registrations/${subdomain}`);
onMount(async () => {
try {
+1 -1
View File
@@ -18,7 +18,7 @@
{ status: Status.Signing }
| { status: Status.Pending }
| { status: Status.Success }
| { status: Status.Failed, error: string };
| { status: Status.Failed; error: string };
export let subdomain: string;
export let config: Config;
+3 -3
View File
@@ -27,8 +27,8 @@
type State =
{ status: Status.Loading }
| { status: Status.NotFound }
| { status: Status.Found, registration: Registration }
| { status: Status.Failed, error: string };
| { status: Status.Found; registration: Registration }
| { status: Status.Failed; error: string };
export let subdomain: string;
export let config: Config;
@@ -74,7 +74,7 @@
.filter(r => r.editable && r.value !== null)
.map(f => {
assert(f.value !== null);
return { name: f.name, value: f.value }
return { name: f.name, value: f.value };
});
};
+1 -1
View File
@@ -26,7 +26,7 @@ export class Config {
provider: ethers.providers.JsonRpcProvider;
signer: ethers.Signer & TypedDataSigner | null;
safe: { api: string | null; viewer: string | null };
abi: { [contract: string]: string[] }
abi: { [contract: string]: string[] };
seed: { api: string | null };
tokens: string[];
+1 -1
View File
@@ -101,7 +101,7 @@ export async function getReadme(
}
export function path(
opts: { urn: string, org?: string, commit?: string, path?: string }
opts: { urn: string; org?: string; commit?: string; path?: string }
): string {
const { urn, org, commit, path } = opts;
const result = [];