Update tslint config and update code to conform.
parent
3d67ad13b6
commit
9913adc756
@ -1,114 +1,112 @@
|
||||
declare module 'ical.js' {
|
||||
function parse(input: string): Array<any>;
|
||||
function parse(input: string): any[];
|
||||
class Component {
|
||||
name: string;
|
||||
static public fromString(str: string): Component;
|
||||
|
||||
static fromString(str: string): Component;
|
||||
public name: string;
|
||||
|
||||
constructor(jCal: Array<any> | string, parent?: Component);
|
||||
constructor(jCal: any[] | string, parent?: Component);
|
||||
|
||||
toJSON(): Array<any>;
|
||||
public toJSON(): any[];
|
||||
|
||||
getFirstSubcomponent(name?: string): Component | null;
|
||||
public getFirstSubcomponent(name?: string): Component | null;
|
||||
|
||||
getFirstPropertyValue(name?: string): any;
|
||||
public getFirstPropertyValue(name?: string): any;
|
||||
|
||||
getFirstProperty(name?: string): Property;
|
||||
getAllProperties(name?: string): Array<Property>;
|
||||
public getFirstProperty(name?: string): Property;
|
||||
public getAllProperties(name?: string): Property[];
|
||||
|
||||
addProperty(property: Property): Property;
|
||||
addPropertyWithValue(name: string, value: string | number | object): Property;
|
||||
public addProperty(property: Property): Property;
|
||||
public addPropertyWithValue(name: string, value: string | number | object): Property;
|
||||
|
||||
updatePropertyWithValue(name: string, value: string | number | object): Property;
|
||||
public updatePropertyWithValue(name: string, value: string | number | object): Property;
|
||||
|
||||
removeAllProperties(name?: string): boolean;
|
||||
public removeAllProperties(name?: string): boolean;
|
||||
|
||||
addSubcomponent(component: Component): Component;
|
||||
public addSubcomponent(component: Component): Component;
|
||||
}
|
||||
|
||||
class Event {
|
||||
uid: string;
|
||||
summary: string;
|
||||
startDate: Time;
|
||||
endDate: Time;
|
||||
description: string;
|
||||
location: string;
|
||||
attendees: Array<Property>;
|
||||
public uid: string;
|
||||
public summary: string;
|
||||
public startDate: Time;
|
||||
public endDate: Time;
|
||||
public description: string;
|
||||
public location: string;
|
||||
public attendees: Property[];
|
||||
|
||||
component: Component;
|
||||
public component: Component;
|
||||
|
||||
isRecurring(): boolean;
|
||||
iterator(startTime?: Time): RecurExpansion;
|
||||
public constructor(component?: Component | null, options?: {strictExceptions: boolean, exepctions: Array<Component | Event>});
|
||||
|
||||
constructor(component?: Component | null,
|
||||
options?: {strictExceptions: boolean, exepctions: Array<Component|Event>});
|
||||
public isRecurring(): boolean;
|
||||
public iterator(startTime?: Time): RecurExpansion;
|
||||
}
|
||||
|
||||
class Property {
|
||||
name: string;
|
||||
type: string;
|
||||
public name: string;
|
||||
public type: string;
|
||||
|
||||
constructor(jCal: Array<any> | string, parent?: Component);
|
||||
constructor(jCal: any[] | string, parent?: Component);
|
||||
|
||||
getFirstValue(): any;
|
||||
getValues(): Array<any>;
|
||||
public getFirstValue(): any;
|
||||
public getValues(): any[];
|
||||
|
||||
setParameter(name: string, value: string | Array<string>): void;
|
||||
setValue(value: string | object): void;
|
||||
toJSON(): any;
|
||||
public setParameter(name: string, value: string | string[]): void;
|
||||
public setValue(value: string | object): void;
|
||||
public toJSON(): any;
|
||||
}
|
||||
|
||||
type TimeJsonData = {
|
||||
year?: number,
|
||||
month?: number,
|
||||
day?: number,
|
||||
hour?: number,
|
||||
minute?: number,
|
||||
second?: number,
|
||||
isDate?: boolean
|
||||
};
|
||||
interface TimeJsonData {
|
||||
year?: number;
|
||||
month?: number;
|
||||
day?: number;
|
||||
hour?: number;
|
||||
minute?: number;
|
||||
second?: number;
|
||||
isDate?: boolean;
|
||||
}
|
||||
|
||||
class Time {
|
||||
isDate: boolean;
|
||||
timezone: string;
|
||||
zone: Timezone;
|
||||
static public fromString(str: string): Time;
|
||||
static public fromJSDate(aDate: Date | null, useUTC: boolean): Time;
|
||||
static public fromData(aData: TimeJsonData): Time;
|
||||
|
||||
static fromString(str: string): Time;
|
||||
static fromJSDate(aDate: Date | null, useUTC: boolean): Time;
|
||||
static fromData(aData: TimeJsonData): Time;
|
||||
static public now(): Time;
|
||||
|
||||
static now(): Time;
|
||||
public isDate: boolean;
|
||||
public timezone: string;
|
||||
public zone: Timezone;
|
||||
|
||||
constructor(data?: TimeJsonData);
|
||||
public compare(aOther: Time): number;
|
||||
|
||||
compare(aOther: Time): number;
|
||||
|
||||
clone(): Time;
|
||||
public clone(): Time;
|
||||
|
||||
adjust(
|
||||
public adjust(
|
||||
aExtraDays: number, aExtraHours: number, aExtraMinutes: number, aExtraSeconds: number, aTimeopt?: Time): void;
|
||||
|
||||
addDuration(aDuration: Duration): void;
|
||||
subtractDateTz(aDate: Time): Duration;
|
||||
public addDuration(aDuration: Duration): void;
|
||||
public subtractDateTz(aDate: Time): Duration;
|
||||
|
||||
toJSDate(): Date;
|
||||
toJSON(): TimeJsonData;
|
||||
public toJSDate(): Date;
|
||||
public toJSON(): TimeJsonData;
|
||||
}
|
||||
|
||||
class Duration {
|
||||
days: number;
|
||||
public days: number;
|
||||
}
|
||||
|
||||
class RecurExpansion {
|
||||
complete: boolean;
|
||||
public complete: boolean;
|
||||
|
||||
next(): Time;
|
||||
public next(): Time;
|
||||
}
|
||||
|
||||
class Timezone {
|
||||
static localTimezone: Timezone;
|
||||
static convert_time(tt: Time, from_zone: Timezone, to_zone: Timezone): Time;
|
||||
static public localTimezone: Timezone;
|
||||
static public convert_time(tt: Time, fromZone: Timezone, toZone: Timezone): Time;
|
||||
|
||||
tzid: string;
|
||||
public tzid: string;
|
||||
}
|
||||
}
|
||||
|
@ -1,99 +1,38 @@
|
||||
{
|
||||
"extends": ["tslint-react"],
|
||||
"rules": {
|
||||
"align": [
|
||||
true,
|
||||
"parameters",
|
||||
"arguments",
|
||||
"statements"
|
||||
],
|
||||
"ban": false,
|
||||
"class-name": true,
|
||||
"comment-format": [
|
||||
true,
|
||||
"check-space"
|
||||
],
|
||||
"curly": true,
|
||||
"eofline": false,
|
||||
"forin": true,
|
||||
"indent": [ true, "spaces" ],
|
||||
"interface-name": [true, "never-prefix"],
|
||||
"jsdoc-format": true,
|
||||
"jsx-no-lambda": false,
|
||||
"jsx-no-multiline-js": false,
|
||||
"label-position": true,
|
||||
"max-line-length": [ true, 120 ],
|
||||
"member-ordering": [
|
||||
true,
|
||||
"public-before-private",
|
||||
"static-before-instance",
|
||||
"variables-before-functions"
|
||||
],
|
||||
"no-any": false,
|
||||
"no-arg": true,
|
||||
"no-bitwise": true,
|
||||
"no-console": [
|
||||
true,
|
||||
"log",
|
||||
"error",
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-consecutive-blank-lines": true,
|
||||
"no-construct": true,
|
||||
"no-debugger": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-empty": true,
|
||||
"no-eval": true,
|
||||
"no-shadowed-variable": true,
|
||||
"no-string-literal": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-trailing-whitespace": false,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"one-line": [
|
||||
true,
|
||||
"check-catch",
|
||||
"check-else",
|
||||
"check-open-brace",
|
||||
"check-whitespace"
|
||||
],
|
||||
"quotemark": [true, "single", "jsx-double"],
|
||||
"radix": true,
|
||||
"semicolon": [true, "always"],
|
||||
"switch-default": true,
|
||||
|
||||
"trailing-comma": false,
|
||||
|
||||
"triple-equals": [ true, "allow-null-check" ],
|
||||
"typedef": [
|
||||
true,
|
||||
"parameter",
|
||||
"property-declaration"
|
||||
],
|
||||
"typedef-whitespace": [
|
||||
true,
|
||||
{
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}
|
||||
],
|
||||
"variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore", "allow-pascal-case"],
|
||||
"whitespace": [
|
||||
true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-module",
|
||||
"check-operator",
|
||||
"check-separator",
|
||||
"check-type",
|
||||
"check-typecast"
|
||||
]
|
||||
}
|
||||
"extends": ["tslint:recommended", "tslint-react"],
|
||||
"rules": {
|
||||
"interface-name": [true, "never-prefix"],
|
||||
"ordered-imports": false,
|
||||
"jsx-curly-spacing": [true, "never"],
|
||||
"jsx-no-bind": [true, "allowArrowFunctions"],
|
||||
"jsx-no-lambda": [false],
|
||||
"jsx-no-multiline-js": false,
|
||||
"max-classes-per-file": [false, 0],
|
||||
"max-line-length": false,
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-conditional-assignment": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"quotemark": [true, "single", "jsx-double", "avoid-escape", "avoid-template"],
|
||||
"semicolon": [true, "always", "ignore-bound-class-methods"],
|
||||
"variable-name": [true, "ban-keywords", "check-format", "allow-pascal-case", "allow-leading-underscore"],
|
||||
"trailing-comma": [
|
||||
true,
|
||||
{
|
||||
"multiline": {
|
||||
"objects": "always",
|
||||
"arrays": "always",
|
||||
"functions": "never",
|
||||
"typeLiterals": "ignore"
|
||||
},
|
||||
"esSpecCompliant": true
|
||||
}
|
||||
],
|
||||
"whitespace": [true,"check-branch", "check-decl", "check-operator", "check-module", "check-separator", "check-rest-spread", "check-type", "check-typecast", "check-type-operator", "check-preblock"]
|
||||
},
|
||||
"linterOptions": {
|
||||
"exclude": [
|
||||
"config/**/*.js",
|
||||
"node_modules/**/*.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue