1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

more javascript coding rules in webstorm.

This commit is contained in:
kay.one 2013-03-30 12:01:27 -07:00
parent 6d6b236fd4
commit 754f9c5134
7 changed files with 121 additions and 5 deletions

View File

@ -5,6 +5,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="jQuery-1.9.1" level="application" />
<orderEntry type="library" name="libraries" level="project" />
</component>
</module>

View File

@ -1,6 +1,8 @@
<component name="ProjectDictionaryState">
<dictionary name="Keivan">
<words>
<w>deps</w>
<w>nzbdrone</w>
<w>rootfolder</w>
</words>
</dictionary>

View File

@ -2,7 +2,66 @@
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
<inspection_tool class="AssignmentResultUsedJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="AssignmentToForLoopParameterJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="AssignmentToFunctionParameterJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ChainedEqualityJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ConditionalExpressionWithIdenticalBranchesJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ConstantOnLHSOfComparisonJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ContinueStatementWithLabelJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="CyclomaticComplexityJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="10" />
</inspection_tool>
<inspection_tool class="DefaultNotLastCaseInSwitchJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="DuplicateConditionJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="EmptyTryBlockJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ExceptionCaughtLocallyJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ForLoopReplaceableByWhileJS" enabled="true" level="INFO" enabled_by_default="true">
<option name="m_ignoreLoopsWithoutConditions" value="false" />
</inspection_tool>
<inspection_tool class="FunctionNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" />
<option name="m_minLength" value="4" />
<option name="m_maxLength" value="32" />
</inspection_tool>
<inspection_tool class="HtmlFormInputWithoutLabel" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
<inspection_tool class="IfStatementWithIdenticalBranchesJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="IfStatementWithTooManyBranchesJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="3" />
</inspection_tool>
<inspection_tool class="JSHint" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="LabeledStatementJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="LocalVariableNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" />
<option name="m_minLength" value="1" />
<option name="m_maxLength" value="32" />
</inspection_tool>
<inspection_tool class="NestedAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="NestedFunctionCallJS" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="NestedSwitchStatementJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="NestingDepthJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="5" />
</inspection_tool>
<inspection_tool class="NonBlockStatementBodyJS" enabled="true" level="ERROR" enabled_by_default="true" />
<inspection_tool class="ParameterNamingConventionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_regex" value="[a-z][A-Za-z]*" />
<option name="m_minLength" value="1" />
<option name="m_maxLength" value="32" />
</inspection_tool>
<inspection_tool class="ReplaceAssignmentWithOperatorAssignmentJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="ReuseOfLocalVariableJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="SpellCheckingInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="true" />
</inspection_tool>
<inspection_tool class="StatementsPerFunctionJS" enabled="true" level="WARNING" enabled_by_default="true">
<option name="m_limit" value="30" />
</inspection_tool>
<inspection_tool class="SwitchStatementWithNoDefaultBranchJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="TailRecursionJS" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="UnterminatedStatementJS" enabled="true" level="ERROR" enabled_by_default="true">
<option name="ignoreSemicolonAtEndOfBlock" value="true" />
</inspection_tool>
</profile>
</component>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<file url="PROJECT" libraries="{jQuery-1.9.1}" />
<file url="PROJECT" libraries="{jQuery-1.9.1, libraries}" />
</component>
</project>

View File

@ -0,0 +1,53 @@
<component name="libraryTable">
<library name="libraries" type="javaScript">
<properties>
<sourceFilesUrls>
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrapSwitch.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/toastr-1.1.5.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/require.js" />
<item url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
</sourceFilesUrls>
</properties>
<CLASSES>
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.debug.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/sugar.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.shortcuts.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.pager.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/handlebars.runtime.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.bootstrap.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.modelbinder.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/jquery.tablesorter.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/fullcalendar.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.collectionbinder.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/underscore.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrapSwitch.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/bootstrap.slider.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/toastr-1.1.5.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.marionette.viewswapper.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/backbone.mutators.js" />
<root url="file://$PROJECT_DIR$/JsLibraries/require.js" />
</CLASSES>
<SOURCES />
</library>
</component>

View File

@ -1,4 +1,5 @@
define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout',
"use strict";
define(['app', 'Shared/ModalRegion', 'AddSeries/AddSeriesLayout',
'Series/Index/SeriesIndexCollectionView', 'Upcoming/UpcomingCollectionView',
'Calendar/CalendarCollectionView', 'Shared/NotificationView',
'Shared/NotFoundView', 'MainMenuView', 'HeaderView',
@ -13,7 +14,7 @@
NzbDrone.mainRegion.show(new NzbDrone.AddSeries.AddSeriesLayout(this, action, query));
},
series: function (action, query) {
series: function () {
this.setTitle('NzbDrone');
NzbDrone.mainRegion.show(new NzbDrone.Series.Index.SeriesIndexCollectionView());
},
@ -62,7 +63,7 @@
success: function (missing) {
NzbDrone.mainRegion.show(new NzbDrone.Missing.MissingCollectionView(this, action, query, missing));
}
})
});
},
notFound: function () {

View File

@ -93,7 +93,7 @@
<script src="/JsLibraries/bootstrap.slider.js"></script>
<script src="/JsLibraries/bootstrapSwitch.js"></script>
<script src="/JsLibraries/underscore.js"></script>
<script src="/JsLibraries/handlebars.js"></script>
<script src="/JsLibraries/handlebars.runtime.js"></script>
<script src="/JsLibraries/backbone.js"></script>
<script src="/JsLibraries/backbone.modelbinder.js"></script>
<script src="/JsLibraries/backbone.mutators.js"></script>