<?xml version="1.0"?>

<ruleset name="All Ecmascript Rules"
         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">

    <description>ECMAScript rule set covering all rules.</description>

    <rule ref="category/ecmascript/codestyle.xml/AssignmentInOperand" />
    <rule ref="category/ecmascript/codestyle.xml/UnreachableCode" />

    <rule ref="category/ecmascript/errorprone.xml/AvoidTrailingComma" />"
    <rule ref="category/ecmascript/errorprone.xml/EqualComparison" />
    <rule ref="category/ecmascript/errorprone.xml/InnaccurateNumericLiteral" />

    <rule ref="category/ecmascript/bestpractices.xml/ConsistentReturn" />
    <rule ref="category/ecmascript/bestpractices.xml/GlobalVariable" />
    <rule ref="category/ecmascript/bestpractices.xml/ScopeForInVariable" />
    <rule ref="category/ecmascript/bestpractices.xml/UseBaseWithParseInt" />

    <rule ref="category/ecmascript/codestyle.xml/ForLoopsMustUseBraces" />
    <rule ref="category/ecmascript/codestyle.xml/IfElseStmtsMustUseBraces" />
    <rule ref="category/ecmascript/codestyle.xml/IfStmtsMustUseBraces" />
    <rule ref="category/ecmascript/codestyle.xml/WhileLoopsMustUseBraces" />

    <rule ref="category/ecmascript/bestpractices.xml/AvoidWithStatement" />

    <rule ref="category/ecmascript/codestyle.xml/NoElseReturn" />
    <rule ref="category/ecmascript/codestyle.xml/UnnecessaryBlock"  />
    <rule ref="category/ecmascript/codestyle.xml/UnnecessaryParentheses" />

</ruleset>