web/satellite: linter updated, analytics artifacts removed (#3043)
This commit is contained in:
parent
a342c3abad
commit
4266f8c364
@ -34,7 +34,7 @@ export default class App extends Vue {
|
||||
];
|
||||
|
||||
private onClick(e: Event): void {
|
||||
let target: any = e.target;
|
||||
let target: any = e.target;
|
||||
while (target) {
|
||||
if (this.$data.ids.includes(target.id)) {
|
||||
return;
|
||||
|
@ -35,10 +35,10 @@ export class ApiKeysApiGql extends BaseGql implements ApiKeysApi {
|
||||
name,
|
||||
createdAt
|
||||
}
|
||||
search,
|
||||
limit,
|
||||
search,
|
||||
limit,
|
||||
order,
|
||||
pageCount,
|
||||
pageCount,
|
||||
currentPage,
|
||||
totalCount
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ export class AuthApi extends BaseGql {
|
||||
*/
|
||||
public async token(email: string, password: string): Promise<string> {
|
||||
const query =
|
||||
` query ($email: String!, $password: String!) {
|
||||
` query ($email: String!, $password: String!) {
|
||||
token(email: $email, password: $password) {
|
||||
token
|
||||
}
|
||||
@ -131,7 +131,7 @@ export class AuthApi extends BaseGql {
|
||||
*/
|
||||
public async create(user: User, password: string, secret: string, referrerUserId: string = ''): Promise<string> {
|
||||
const query =
|
||||
`mutation($email: String!, $password: String!, $fullName: String!, $shortName: String!,
|
||||
`mutation($email: String!, $password: String!, $fullName: String!, $shortName: String!,
|
||||
$partnerID: String!, $referrerUserId: String!, $secret: String!) {
|
||||
createUser(
|
||||
input: {
|
||||
|
@ -35,7 +35,7 @@ export class BucketsApiGql extends BaseGql implements BucketsApi {
|
||||
offset,
|
||||
pageCount,
|
||||
currentPage,
|
||||
totalCount
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
@ -17,7 +17,7 @@ export async function addProjectPaymentMethodRequest(projectId: string, cardToke
|
||||
projectID: $projectId,
|
||||
cardToken: $cardToken,
|
||||
isDefault: $isDefault
|
||||
)
|
||||
)
|
||||
}
|
||||
`),
|
||||
variables: {
|
||||
@ -70,7 +70,7 @@ export async function setDefaultPaymentMethodRequest(projectId: string, paymentI
|
||||
return result;
|
||||
}
|
||||
|
||||
export async function deletePaymentMethodRequest(paymentId: string):Promise<RequestResponse<null>> {
|
||||
export async function deletePaymentMethodRequest(paymentId: string): Promise<RequestResponse<null>> {
|
||||
const result: RequestResponse<null> = new RequestResponse<null>();
|
||||
|
||||
const response: any = await apollo.mutate(
|
||||
|
@ -64,10 +64,10 @@ export class ProjectMembersApiGql extends BaseGql implements ProjectMembersApi {
|
||||
},
|
||||
joinedAt
|
||||
},
|
||||
search,
|
||||
limit,
|
||||
search,
|
||||
limit,
|
||||
order,
|
||||
pageCount,
|
||||
pageCount,
|
||||
currentPage,
|
||||
totalCount
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ export default class ApiKeysCreationPopup extends Vue {
|
||||
this.$store.dispatch(NOTIFICATION_ACTIONS.SUCCESS, 'Successfully created new api key');
|
||||
this.key = createdApiKey.secret;
|
||||
this.isLoading = false;
|
||||
|
||||
|
||||
try {
|
||||
this.$store.dispatch(API_KEYS_ACTIONS.FETCH, this.FIRST_PAGE);
|
||||
} catch (error) {
|
||||
|
@ -27,7 +27,7 @@ import { ApiKeyOrderBy, OnHeaderClickCallback } from '@/types/apiKeys';
|
||||
import { SortDirection } from '@/types/common';
|
||||
|
||||
@Component({
|
||||
components:{
|
||||
components: {
|
||||
VerticalArrows,
|
||||
}
|
||||
})
|
||||
|
@ -28,7 +28,7 @@ export default class BucketItem extends Vue {
|
||||
public get egress(): string {
|
||||
return this.itemData.egress.toFixed(4);
|
||||
}
|
||||
|
||||
|
||||
public get objectCount(): string {
|
||||
return this.itemData.objectCount.toString();
|
||||
}
|
||||
|
@ -31,18 +31,18 @@ export default class Button extends Vue {
|
||||
private isDisabled: boolean;
|
||||
@Prop({default: () => { return; }})
|
||||
private readonly onPress: Function;
|
||||
|
||||
|
||||
public get style(): Object {
|
||||
return { width: this.width, height: this.height };
|
||||
}
|
||||
|
||||
public get containerClassName(): string {
|
||||
if (this.isDisabled) return 'container disabled';
|
||||
|
||||
|
||||
if (this.isWhite) return 'container white';
|
||||
|
||||
|
||||
if (this.isDeletion) return 'container red';
|
||||
|
||||
|
||||
return 'container';
|
||||
}
|
||||
}
|
||||
|
@ -9,20 +9,20 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
|
||||
// Custom checkbox component
|
||||
@Component
|
||||
export default class Checkbox extends Vue {
|
||||
@Prop({default: false})
|
||||
private readonly isCheckboxError: boolean;
|
||||
|
||||
private checked: boolean = false;
|
||||
|
||||
public onChange(): void {
|
||||
this.$emit('setData', this.checked);
|
||||
}
|
||||
// Custom checkbox component
|
||||
@Component
|
||||
export default class Checkbox extends Vue {
|
||||
@Prop({default: false})
|
||||
private readonly isCheckboxError: boolean;
|
||||
|
||||
private checked: boolean = false;
|
||||
|
||||
public onChange(): void {
|
||||
this.$emit('setData', this.checked);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
@ -31,19 +31,19 @@ import Button from '@/components/common/Button.vue';
|
||||
export default class EmptyStateProjectArea extends Vue {
|
||||
@Prop({default: ''})
|
||||
private readonly mainTitle: string;
|
||||
|
||||
|
||||
@Prop({default: ''})
|
||||
private readonly additionalText: string;
|
||||
|
||||
|
||||
@Prop({default: ''})
|
||||
private readonly imageSource: string;
|
||||
|
||||
|
||||
@Prop({default: false})
|
||||
private readonly isButtonShown: boolean;
|
||||
|
||||
|
||||
@Prop()
|
||||
private readonly onButtonClick: Function;
|
||||
|
||||
|
||||
@Prop({default: 'Default'})
|
||||
private readonly buttonLabel: string;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import SearchComponent from '@/components/common/SearchComponent.vue';
|
||||
|
||||
declare type searchCallback = (search: string) => Promise<void>;
|
||||
declare interface ClearSearch {
|
||||
clearSearch: () => void;
|
||||
clearSearch(): void;
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
@ -53,10 +53,10 @@ export default class HeaderedInput extends HeaderlessInput {
|
||||
private readonly isOptional: boolean;
|
||||
@Prop({default: false})
|
||||
private readonly isMultiline: boolean;
|
||||
|
||||
|
||||
public constructor() {
|
||||
super();
|
||||
|
||||
|
||||
this.value = this.initValue;
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ import Button from '@/components/common/Button.vue';
|
||||
import { BUCKET_ACTIONS } from '@/store/modules/buckets';
|
||||
import { PROJECTS_ACTIONS } from '@/store/modules/projects';
|
||||
import { PROJECT_USAGE_ACTIONS } from '@/store/modules/usage';
|
||||
import { API_KEYS_ACTIONS, APP_STATE_ACTIONS, NOTIFICATION_ACTIONS, PM_ACTIONS } from '@/utils/constants/actionNames';
|
||||
import { API_KEYS_ACTIONS, APP_STATE_ACTIONS, NOTIFICATION_ACTIONS, PM_ACTIONS } from '@/utils/constants/actionNames';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
|
@ -40,7 +40,7 @@ import { ProjectMember, ProjectMemberHeaderState } from '@/types/projectMembers'
|
||||
import { APP_STATE_ACTIONS, NOTIFICATION_ACTIONS, PM_ACTIONS } from '@/utils/constants/actionNames';
|
||||
|
||||
declare interface ClearSearch {
|
||||
clearSearch: () => void;
|
||||
clearSearch(): void;
|
||||
}
|
||||
|
||||
@Component({
|
||||
|
@ -120,7 +120,7 @@ export default class ProjectMembersArea extends Vue {
|
||||
return ProjectMemberHeaderState.DEFAULT;
|
||||
}
|
||||
|
||||
public async onPageClick(index: number):Promise<void> {
|
||||
public async onPageClick(index: number): Promise<void> {
|
||||
try {
|
||||
await this.$store.dispatch(PM_ACTIONS.FETCH, index);
|
||||
} catch (err) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
export class AuthToken {
|
||||
private static readonly tokenKeySuffix: string = '_tokenKey';
|
||||
private static tokenKey: string = '_tokenKey';
|
||||
|
||||
|
||||
public static initialize(): void {
|
||||
AuthToken.tokenKey = (document as any).location.hostname + AuthToken.tokenKeySuffix;
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
// Copyright (C) 2019 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
const EVENTS = {
|
||||
CLICKED_LOGO: 'clicked-on-logo',
|
||||
CLICKED_LOGIN: 'clicked-on-login',
|
||||
CLICKED_BACK_TO_LOGIN: 'clicked-on-back-to-login',
|
||||
};
|
||||
|
||||
export default EVENTS;
|
@ -1,15 +0,0 @@
|
||||
// Copyright (C) 2019 Storj Labs, Inc.
|
||||
// See LICENSE for copying information.
|
||||
|
||||
export function isDoNotTrackEnabled () {
|
||||
const doNotTrackOption = (
|
||||
window.doNotTrack ||
|
||||
window.navigator.doNotTrack
|
||||
);
|
||||
|
||||
if (!doNotTrackOption) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return doNotTrackOption.charAt(0) === '1' || doNotTrackOption === 'yes';
|
||||
}
|
@ -2,6 +2,6 @@
|
||||
// See LICENSE for copying information.
|
||||
|
||||
// toUnixTimestamp converts Date to unix timestamp
|
||||
export function toUnixTimestamp(time :Date) : number {
|
||||
export function toUnixTimestamp(time: Date): number {
|
||||
return Math.floor(time.getTime() / 1000);
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import HeaderlessInput from '@/components/common/HeaderlessInput.vue';
|
||||
import { AuthApi } from '@/api/auth';
|
||||
import { RouteConfig } from '@/router';
|
||||
import { NOTIFICATION_ACTIONS } from '@/utils/constants/actionNames';
|
||||
import EVENTS from '@/utils/constants/analyticsEventNames';
|
||||
import { LOADING_CLASSES } from '@/utils/constants/classConstants';
|
||||
import { validateEmail } from '@/utils/validation';
|
||||
|
||||
|
@ -13,7 +13,6 @@ import { AuthApi } from '@/api/auth';
|
||||
import { RouteConfig } from '@/router';
|
||||
import { AuthToken } from '@/utils/authToken';
|
||||
import { APP_STATE_ACTIONS, NOTIFICATION_ACTIONS } from '@/utils/constants/actionNames';
|
||||
import EVENTS from '@/utils/constants/analyticsEventNames';
|
||||
import { AppState } from '@/utils/constants/appStateEnum';
|
||||
import { LOADING_CLASSES } from '@/utils/constants/classConstants';
|
||||
import { validateEmail, validatePassword } from '@/utils/validation';
|
||||
|
@ -15,7 +15,6 @@ import { RouteConfig } from '@/router';
|
||||
import { User } from '@/types/users';
|
||||
import { setUserId } from '@/utils/consoleLocalStorage';
|
||||
import { APP_STATE_ACTIONS, NOTIFICATION_ACTIONS } from '@/utils/constants/actionNames';
|
||||
import EVENTS from '@/utils/constants/analyticsEventNames';
|
||||
import { LOADING_CLASSES } from '@/utils/constants/classConstants';
|
||||
import { validateEmail, validatePassword } from '@/utils/validation';
|
||||
|
||||
|
@ -42,7 +42,7 @@ describe('mutations', () => {
|
||||
expect(state.projects[0].id).toBe(project.id);
|
||||
expect(state.projects[0].name).toBe(project.name);
|
||||
expect(state.projects[0].description).toBe(project.description);
|
||||
expect(state.projects[0].createdAt).toBe(project.createdAt );
|
||||
expect(state.projects[0].createdAt).toBe(project.createdAt);
|
||||
});
|
||||
|
||||
it('set projects', () => {
|
||||
@ -120,7 +120,7 @@ describe('actions', () => {
|
||||
Promise.resolve(project)
|
||||
);
|
||||
|
||||
await store.dispatch(CREATE, {name:'', description: ''});
|
||||
await store.dispatch(CREATE, {name: '', description: ''});
|
||||
expect(state.projects.length).toBe(1);
|
||||
});
|
||||
|
||||
|
@ -24,7 +24,7 @@ describe('validation', () => {
|
||||
expect(validatePassword(testString6)).toBe(false);
|
||||
expect(validatePassword(testString7)).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
it('validateEmail regex works correctly', () => {
|
||||
const testString1 = 'test';
|
||||
const testString2 = ' ';
|
||||
|
@ -37,8 +37,10 @@
|
||||
"no-empty": true,
|
||||
"no-eval": true,
|
||||
"no-invalid-template-strings": true,
|
||||
"no-invalid-this": true,
|
||||
"no-static-this": true,
|
||||
"no-invalid-this": true,
|
||||
"no-misused-new": true,
|
||||
"no-static-this": true,
|
||||
"no-trailing-whitespace": true,
|
||||
"no-var-keyword": true,
|
||||
"newline-before-return": true,
|
||||
"object-literal-sort-keys": false,
|
||||
@ -62,11 +64,13 @@
|
||||
"order": 3
|
||||
}]
|
||||
}],
|
||||
"prefer-const": true,
|
||||
"prefer-const": true,
|
||||
"prefer-method-signature": true,
|
||||
"prefer-switch": [true, {"min-cases": 2}],
|
||||
"prefer-while": true,
|
||||
"quotemark": [true, "single", "avoid-escape"],
|
||||
"semicolon": [true, "always"],
|
||||
"semicolon": [true, "always"],
|
||||
"space-within-parens": 0,
|
||||
"static-this": true,
|
||||
"triple-equals": true,
|
||||
"typedef": [
|
||||
@ -79,11 +83,13 @@
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-module",
|
||||
"check-operator",
|
||||
"check-preblock",
|
||||
"check-rest-spread",
|
||||
"check-separator",
|
||||
"check-type-operator",
|
||||
"check-preblock"
|
||||
"check-type",
|
||||
"check-type-operator"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user