Skip to content

Instantly share code, notes, and snippets.

@textarcana
Created August 17, 2012 03:37
Show Gist options
  • Select an option

  • Save textarcana/3375708 to your computer and use it in GitHub Desktop.

Select an option

Save textarcana/3375708 to your computer and use it in GitHub Desktop.
Use PHP CodeSniffer for static analysis of JavaScript
<?xml version="1.0"?>
<ruleset name="JavaScript">
<description>Run all the sniffs that are applicable to JavaScript files.</description>
<rule ref="Squiz.Operators.ComparisonOperatorUsage"/>
<rule ref="Squiz.ControlStructures.ControlSignature"/>
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
<rule ref="Squiz.PHP.DisallowInlineIf"/>
<rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops"/>
<rule ref="Generic.WhiteSpace.DisallowTabIndent"/>
<rule ref="Squiz.Commenting.FileComment"/>
<rule ref="Squiz.ControlStructures.ForLoopDeclaration"/>
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
<rule ref="Squiz.WhiteSpace.FunctionOpeningBraceSpace"/>
<rule ref="Squiz.Commenting.InlineComment"/>
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.Commenting.LongConditionClosingComment"/>
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.Formatting.MultipleStatementAlignment"/>
<rule ref="Squiz.Formatting.OperatorBracket"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.Commenting.PostStatementComment"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
<rule ref="Squiz.ControlStructures.SwitchDeclaration"/>
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment