mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore(tslint): update tslint rules and fix errors (#5747)
* chore(tslint): fix tslint config & errors * chore(tslint): enable double quotes, whitespace, and arrow-return-shorthand rules and fix errors
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,7 @@ export function setNetwork(newNetwork: domains.network.NetworkDomainDebugger) {
|
||||
|
||||
var dom;
|
||||
|
||||
export function getDOM():any {
|
||||
export function getDOM(): any {
|
||||
return dom;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { getNodeById } from "./dom-node";
|
||||
import { ViewBase } from "../ui/core/view-base";
|
||||
|
||||
// Use lazy requires for core modules
|
||||
const frameTopmost = () => { return require("../ui/frame").topmost(); };
|
||||
const frameTopmost = () => require("../ui/frame").topmost();
|
||||
|
||||
let unsetValue;
|
||||
function unsetViewValue(view, name) {
|
||||
@@ -76,7 +76,7 @@ export function setAttributeAsText(nodeId, text, name) {
|
||||
|
||||
if (textParts.length === 2) {
|
||||
let attrName = textParts[0];
|
||||
let attrValue = textParts[1].replace(/['"]+/g, '');
|
||||
let attrValue = textParts[1].replace(/['"]+/g, "");
|
||||
|
||||
// if attr name is being replaced with another
|
||||
if (name !== attrName && hasOriginalAttribute) {
|
||||
|
||||
@@ -73,7 +73,7 @@ export class Request {
|
||||
resourceType = documentTypeByMimeType[this._mimeType];
|
||||
}
|
||||
|
||||
if(this._mimeType.indexOf("image/") !== -1) {
|
||||
if (this._mimeType.indexOf("image/") !== -1) {
|
||||
resourceType = "Image";
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ export class Request {
|
||||
|
||||
public requestWillBeSent(request: inspectorCommandTypes.NetworkDomain.Request): void {
|
||||
if (this._networkDomainDebugger.enabled) {
|
||||
this._networkDomainDebugger.events.requestWillBeSent(this.requestID, frameId, loaderId, request.url, request, __inspectorTimestamp(), { type: 'Script' });
|
||||
this._networkDomainDebugger.events.requestWillBeSent(this.requestID, frameId, loaderId, request.url, request, __inspectorTimestamp(), { type: "Script" });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -182,7 +182,7 @@ export class NetworkDomainDebugger implements inspectorCommandTypes.NetworkDomai
|
||||
var body = resource_data.hasTextContent ? NSString.alloc().initWithDataEncoding(resource_data.data, 4).toString() :
|
||||
resource_data.data.base64EncodedStringWithOptions(0);
|
||||
|
||||
if(resource_data) {
|
||||
if (resource_data) {
|
||||
return {
|
||||
body: body,
|
||||
base64Encoded: !resource_data.hasTextContent
|
||||
|
||||
Reference in New Issue
Block a user