Updates to config and files to pass TSLint

This commit is contained in:
Roel van Uden 2015-02-07 12:51:11 +01:00
parent b836436c11
commit 25a077b495
10 changed files with 42 additions and 30 deletions

View File

@ -63,9 +63,6 @@
<Folder Include="typings\request\" />
<Folder Include="typings\xml2js\" />
</ItemGroup>
<ItemGroup>
<Compile Include="ts.js" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="False" />
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />

View File

@ -1,4 +1,5 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntellisenseGloballyEnabled/IntellisenseEnabled/@EntryValue">Disabled</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=DeclarationHides/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InconsistentNaming/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=NotAllPathsReturnValue/@EntryIndexedValue">DO_NOT_SHOW</s:String>
@ -46,6 +47,13 @@
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FPUBLIC_005FTYPE_005FMETHOD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=TS_005FTYPE_005FPARAMETER/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="T" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FHTML_005FCONTROL/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FNAME/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/WebNaming/UserRules/=ASP_005FTAG_005FPREFIX/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=NAMESPACE_005FALIAS/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:Boolean x:Key="/Default/CodeStyle/TypeScriptCodeStyle/ExplicitPublicModifier/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/TypeScriptCodeStyle/FileReferenceStyle/@EntryValue">RelativeDotSlash</s:String>
<s:Boolean x:Key="/Default/CodeStyle/TypeScriptCodeStyle/NoImplicitAny/@EntryValue">True</s:Boolean>

View File

@ -7,7 +7,10 @@
"crunchyroll"
],
"name": "crunchyroll",
"repository": "git://github.com/Deathspike/crunchyroll.js.git",
"repository": {
"type": "git",
"url": "git://github.com/Deathspike/crunchyroll.js.git"
},
"version": "1.1.0",
"bin": {
"crunchyroll": "./bin/crunchyroll"

View File

@ -79,7 +79,11 @@ function downloadSubtitle(config: typings.IConfig, player: typings.IEpisodePlaye
/**
* Streams the video to disk.
*/
function downloadVideo(config: typings.IConfig, page: typings.IEpisodePage, player: typings.IEpisodePlayer, filePath: string, done: (err: Error) => void) {
function downloadVideo(config: typings.IConfig,
page: typings.IEpisodePage,
player: typings.IEpisodePlayer,
filePath: string,
done: (err: Error) => void) {
video.stream(
player.video.host,
player.video.file,

View File

@ -38,7 +38,11 @@ function main(config: typings.IConfig, address: string, done: (err: Error) => vo
/**
* Downloads the episode.
*/
function download(cache: {[address: string]: number}, config: typings.IConfig, baseAddress: string, item: typings.ISeriesEpisode, done: (err: Error) => void) {
function download(cache: {[address: string]: number},
config: typings.IConfig,
baseAddress: string,
item: typings.ISeriesEpisode,
done: (err: Error) => void) {
if (!filter(config, item)) return done(null);
var address = url.resolve(baseAddress, item.address);
if (cache[address]) return done(null);

View File

@ -1,7 +1,7 @@
/* tslint:disable:no-bitwise false */
'use strict';
export = main;
import crypto = require('crypto');
import bigInt = require('big-integer');
import zlib = require('zlib');
/**

5
ts.js
View File

@ -48,7 +48,10 @@ function clean(filePaths, done) {
function compile(filePaths, done) {
var execPath = path.join(__dirname, 'node_modules/.bin/tsc');
var options = '--declaration --module CommonJS --noImplicitAny --outDir dist';
childProcess.exec([execPath, options].concat(filePaths).join(' '), done);
childProcess.exec([execPath, options].concat(filePaths).join(' '), function(err, stdout) {
if (stdout) return done(new Error(stdout));
done(null);
});
}
/**

View File

@ -3,11 +3,10 @@
"ban": false,
"class-name": true,
"comment-format": [true,
"check-space",
"check-lowercase"
"check-space"
],
"curly": false,
"eofline": true,
"eofline": false,
"forin": true,
"indent": [true, 2],
"interface-name": true,
@ -44,7 +43,7 @@
"no-unused-expression": true,
"no-unused-variable": true,
"no-unreachable": true,
"no-use-before-declare": true,
"no-use-before-declare": false,
"no-var-requires": true,
"one-line": [true,
"check-catch",
@ -57,11 +56,8 @@
"semicolon": true,
"triple-equals": [true, "allow-null-check"],
"typedef": [true,
"call-signature",
"member-variable-declaration",
"parameter",
"property-declaration",
"variable-declaration"
"property-declaration"
],
"typedef-whitespace": [true, {
"call-signature": "nospace",
@ -70,10 +66,7 @@
"property-declaration": "nospace",
"variable-declaration": "nospace"
}],
"use-strict": [true,
"check-module",
"check-function"
],
"use-strict": false,
"variable-name": false,
"whitespace": [true,
"check-branch",