Skip to content

Appendix F.5: Every Rule of Salesforce Code Analyzer

This page lists every rule that Salesforce Code Analyzer ships, engine by engine, as the command sf code-analyzer rules --rule-selector all reports it in an empty folder, with the two opt-in engines, ApexGuru and UIBundle, added by name. It is the complete inventory: what Code Analyzer can check, whatever these standards say about it. Which of these rules the reference adopts, and at what severity, is in Appendix F.1 for the stock PMD rules and in Appendix F.6 for every rule a standard cites; which rules the sample code-analyzer.yml disables is in Appendix E.

How to Read the Tables

There is one table for each engine, and the rules of a table are in alphabetical order. The caption above the tables names the Code Analyzer version that the list is current for, and the date it was listed. A later version of Code Analyzer adds, removes, or changes rules; the list is taken again when the version changes.

  • Rule is the name the engine gives the rule, and it links to the engine's own documentation of the rule where Code Analyzer gives a link. An ESLint rule carries the name of its plugin, such as @lwc/lwc/, where it has one.
  • Severity is the severity Code Analyzer ships the rule with, from 1 (critical) to 5 (info), before any override in code-analyzer.yml (Severity Levels say what each number means at the gate). For a stock PMD rule it is the severity Code Analyzer derives from PMD's priority, which the reference overrides (Priority Reference).
  • Tags are the tags Code Analyzer ships the rule with. Recommended marks a rule that runs by default; the quality gate runs every rule tagged Recommended or DevSecOps (Appendix E). A language tag says which files the rule reads.
  • What it reports is Code Analyzer's own one-line description of the rule.

The rules that Salesforce Code Analyzer 5.16.0 ships, listed on 2026-10-13, by engine: PMD, ESLint, RetireJS, Flow, CPD, Regex, SFGE, ApexGuru, UIBundle.

PMD

Rule Severity Tags What it reports
AnnotationsNamingConventions 4 Recommended, CodeStyle, Apex Apex, while case-insensitive, benefits from a consistent code style to improve readability and maintainability. Enforcing PascalCase for annotations aligns with the established conventions and reduces ambiguity - promoting a unified coding standard.
ApexAssertionsShouldIncludeMessage 3 BestPractices, Apex The second parameter of System.assert/third parameter of System.assertEquals/System.assertNotEquals is a message. Having a second/third parameter provides more information and makes it easier to debug the test failure and improves the readability of test output.
ApexBadCrypto 2 Recommended, Security, Apex The rule makes sure you are using randomly generated IVs and keys for Crypto calls. Hard-wiring these values greatly compromises the security of encrypted data.
ApexCRUDViolation 2 Recommended, Security, Apex The rule validates you are checking for access permissions before a SOQL/SOSL/DML operation. Since Apex runs by default in system mode not having proper permissions checks results in escalation of privilege and may produce runtime errors. This check forces you to handle such scenarios. Since Winter '23 (API Version 56) you can enforce user mode for database operations by using WITH USER_MODE... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_security.html#apexcrudviolation
ApexCSRF 1 Recommended, Security, Apex Having DML operations in Apex class constructor or initializers can have unexpected side effects: By just accessing a page, the DML statements would be executed and the database would be modified. Just querying the database is permitted. In addition to constructors and initializers, any method called init is checked as well. Salesforce Apex already protects against this scenario and raises a runtime... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_errorprone.html#apexcsrf
ApexDangerousMethods 3 Recommended, Security, Apex Checks against calling dangerous methods. For the time being, it reports: * Against FinancialForce's Configuration.disableTriggerCRUDSecurity(). Disabling CRUD security opens the door to several attacks and requires manual validation, which is unreliable. * Calling System.debug passing sensitive data as parameter, which could lead to exposure of private data.
ApexDoc 4 Recommended, Documentation, Apex This rule validates that: * ApexDoc comments are present for classes, methods, and properties that are public or global, excluding overrides and test classes (as well as the contents of test classes). * ApexDoc comments are present for classes, methods, and properties that are protected or private, depending on the properties reportPrivate and reportProtected. * ApexDoc comments should contain a... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_documentation.html#apexdoc
ApexInsecureEndpoint 2 Recommended, Security, Apex Checks against accessing endpoints under plain http. You should always use https for security.
ApexOpenRedirect 2 Recommended, Security, Apex Checks against redirects to user-controlled locations. This prevents attackers from redirecting users to phishing sites.
ApexSharingViolations 3 Recommended, Security, Apex Detect classes declared without explicit sharing mode if DML methods are used. This forces the developer to take access restrictions into account before modifying objects.
ApexSOQLInjection 2 Recommended, Security, Apex Detects the usage of untrusted / unescaped variables in DML queries.
ApexSuggestUsingNamedCred 2 Recommended, Security, Apex Detects hardcoded credentials used in requests to an endpoint. You should refrain from hardcoding credentials: * They are hard to maintain by being mixed in application code * Particularly hard to update them when used from different classes * Granting a developer access to the codebase means granting knowledge of credentials, keeping a two-level access is not possible. * Using... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_security.html#apexsuggestusingnamedcred
ApexUnitTestClassShouldHaveAsserts 3 Recommended, BestPractices, Apex Apex unit tests should include at least one assertion. This makes the tests more robust, and using assert with messages provide the developer a clearer idea of what the test does. Custom assert method invocation patterns can be specified using the 'additionalAssertMethodPattern' property if required.
ApexUnitTestClassShouldHaveRunAs 4 Recommended, BestPractices, Apex Apex unit tests should include at least one runAs method. This makes the tests more robust, and independent from the user running it.
ApexUnitTestMethodShouldHaveIsTestAnnotation 2 Recommended, BestPractices, Apex Apex test methods should have @isTest annotation instead of the testMethod keyword, as testMethod is deprecated. Salesforce advises to use @isTest annotation for test classes and methods.
ApexUnitTestShouldNotUseSeeAllDataTrue 2 Recommended, BestPractices, Apex Apex unit tests should not use @isTest(seeAllData=true) because it opens up the existing database data for unexpected modification by tests.
ApexXSSFromEscapeFalse 2 Recommended, Security, Apex Reports on calls to addError with disabled escaping. The message passed to addError will be displayed directly to the user in the UI, making it prime ground for XSS attacks if unescaped.
ApexXSSFromURLParam 2 Recommended, Security, Apex Makes sure that all values obtained from URL parameters are properly escaped / sanitized to avoid XSS attacks.
AssignmentInOperand 3 CodeStyle, JavaScript Avoid assignments in operands; this can make code more complicated and harder to read. This is sometime indicative of the bug where the assignment operator '=' was used instead of the equality operator '=='.
AvoidApiSessionId 2 AppExchange, Security, XML Detects use of Api.Session_ID or GETSESSIONID() to retrieve a session ID.
AvoidAuraWithLockerDisabled 1 AppExchange, Security, XML Detects use of API versions with Lightning Locker disabled in Aura components. Use API version 40 or greater.
AvoidBooleanMethodParameters 3 Recommended, Design, Apex Boolean parameters in a system's API can make method calls difficult to understand and maintain. They often indicate that a method is doing more than one thing and could benefit from being split into separate methods with more descriptive names. This rule flags any boolean parameters found in public or global methods, encouraging developers to use more expressive alternatives such as enums, separate methods, or configuration objects.
AvoidChangeProtectionUnprotected 1 AppExchange, Security, Apex Detects potential misuse of FeatureManagement.changeProtection.
AvoidConsoleStatements 3 Performance, JavaScript Using the console for logging in production might negatively impact performance. In addition, logging could expose sensitive data.
AvoidCreateElementScriptLinkTag 2 AppExchange, Security, Visualforce Detects dynamic creation of script or link tags Note: This rule identifies the <script> block where createElement is detected; but can only show the line number where the <script> tag begins and not the line number for createElement. That means if there are multiple createElement calls with script as input, you'll see multiple issues... Learn more: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/rules-pmd-appexchange.html#avoidcreateelementscriptlinktag
AvoidDebugStatements 4 Recommended, Performance, Apex Debug statements contribute to longer transactions and consume Apex CPU time even when debug logs are not being captured. When possible make use of other debugging techniques such as the Apex Replay Debugger and Checkpoints that could cover most use cases. For other valid use cases that the statement is in fact valid make use of the @SuppressWarnings annotation or the //NOPMD comment.
AvoidDeeplyNestedIfStmts 3 Recommended, Design, Apex Avoid creating deeply nested if-then statements since they are harder to read and error-prone to maintain.
AvoidDirectAccessTriggerMap 3 Recommended, ErrorProne, Apex Avoid directly accessing Trigger.old and Trigger.new as it can lead to a bug. Triggers should be bulkified and iterate through the map to handle the actions for each item separately.
AvoidDisableProtocolSecurityRemoteSiteSetting 3 AppExchange, Security, XML Detects if "Disable Protocol Security" setting is true.
AvoidFutureAnnotation 4 Recommended, BestPractices, Apex Usage of the @Future annotation should be limited. The @Future annotation is a legacy way to execute asynchronous Apex code, but it has several limitations: - Methods must be static - Only primitive data types, primitive arrays, or collections of primitive data types can be parameters - No way to monitor job status or handle failures - No support for chaining jobs Consider... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_bestpractices.html#avoidfutureannotation
AvoidGetInstanceWithTaint 3 AppExchange, Security, Apex Detects use of getInstance(userId)/getInstance(profileId). Hierarchy Custom Settings return the record owned by the current user when getInstance() is invoked without any parameters. But if a tainted or end-user controlled userId or profileId is passed as a parameter to getInstance() that will allow the code to access records owned by other users on... Learn more: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/rules-pmd-appexchange.html#avoidgetinstancewithtaint
AvoidGlobalInstallUninstallHandlers 1 AppExchange, Security, Apex Detects Install and Uninstall handlers declared as global. Install and Uninstall Handlers don't need to be global classes. Using global for these handlers means global methods in these classes act as controllers and can be invoked by untrusted code outside the context of post-install/uninstall scenarios. Depending on the logic in these... Learn more: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/rules-pmd-appexchange.html#avoidglobalinstalluninstallhandlers
AvoidGlobalModifier 3 Recommended, BestPractices, Apex Global classes should be avoided (especially in managed packages) as they can never be deleted or changed in signature. Always check twice if something needs to be global. Many interfaces (e.g. Batch) required global modifiers in the past but don't require this anymore. Don't lock yourself in.
AvoidHardCodedCredentialsInAura 2 AppExchange, Security, HTML Detects use of hard coded credentials in Aura components.
AvoidHardcodedCredentialsInFieldDecls 3 AppExchange, Security, Apex Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. Protected custom settings or protected custom metadata should be used to store secrets. Refer to the Protect Secrets Using Platform Features Trailhead module for more guidance.
AvoidHardcodedCredentialsInHttpHeader 3 AppExchange, Security, Apex Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. Protected custom settings or protected custom metadata should be used to store secrets. Refer to the Protect Secrets Using Platform Features Trailhead module for more guidance.
AvoidHardcodedCredentialsInSetPassword 1 AppExchange, Security, Apex Detects hard-coded credentials in the call to setPassword().
AvoidHardcodedCredentialsInVarAssign 3 AppExchange, Security, Apex Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. Protected custom settings or protected custom metadata should be used to store secrets. Refer to the Protect Secrets Using Platform Features Trailhead module for more guidance.
AvoidHardcodedCredentialsInVarDecls 3 AppExchange, Security, Apex Identifies hard-coded credentials in source code that must be protected using Protected Custom metadata or Protected Custom settings. Protected custom settings or protected custom metadata should be used to store secrets. Refer to the Protect Secrets Using Platform Features Trailhead module for more guidance.
AvoidHardcodedSecretsInVFAttrs 2 AppExchange, Security, Visualforce Detects hardcoded secrets in VF attributes
AvoidHardcodingId 3 Recommended, ErrorProne, Apex When deploying Apex code between sandbox and production environments, or installing Force.com AppExchange packages, it is essential to avoid hardcoding IDs in the Apex code. By doing so, if the record IDs change between environments, the logic can dynamically identify the proper data to operate against and not fail.
AvoidInlineStyles 4 BestPractices, HTML Don't mix content and style. Use separate CSS-files for the style and introduce classes. This helps to reuse common styles.
AvoidInsecureHttpRemoteSiteSetting 3 AppExchange, Security, XML Detects instances of a Remote Site Settings that use HTTP. Use HTTPS instead.
AvoidInterfaceAsMapKey 3 Recommended, ErrorProne, Apex In Apex, when a Map uses an interface as key and an abstract class implements that interface and defines equals/hashCode, methods like containsKey do not dispatch to the correct implementation. This results in potentially duplicated map entries or not being able to get entries by key. This rule reports Map declarations (fields, variables, parameters) whose key type is an... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_errorprone.html#avoidinterfaceasmapkey
AvoidInvalidCrudContentDistribution 3 AppExchange, Security, Apex Detects the use of Schema.DescribeSObjectResult methods to enforce CRUD check on ContentDistribution. Developers should use USER MODE operations or use the custom below to enforce CRUD check against the ContentDistribution object.
AvoidJavaScriptCustomObject 2 AppExchange, Security, XML Detects use of custom JavaScript actions in custom rules.
AvoidJavaScriptHomePageComponent 2 AppExchange, Security, XML Detects use of custom JavaScript actions in home page components.
AvoidJavaScriptInUrls 1 AppExchange, Security, XML Detects use of JavaScript-style URLs (javascript:) in components, such as web links and buttons. Avoid JavaScript-style URLs in managed packages.
AvoidJavaScriptWebLink 2 AppExchange, Security, XML Detects use of custom JavaScript actions in web links.
AvoidLmcIsExposedTrue 2 AppExchange, Security, XML Detects a Lightning Message Channel with isExposed=true, which isn’t allowed in managed packages.
AvoidLogicInTrigger 3 Recommended, BestPractices, Apex As triggers do not allow methods like regular classes they are less flexible and suited to apply good encapsulation style. Therefore delegate the triggers work to a regular class (often called Trigger handler class). See more here: https://developer.salesforce.com/page/Trigger_Frameworks_and_Apex_Trigger_Best_Practices
AvoidLwcBubblesComposedTrue 3 AppExchange, Security, JavaScript Detects Lightning Web Component event configurations where bubbles and composed are both set to true. To avoid sharing sensitive information unintentionally, use this configuration with caution.
AvoidNonExistentAnnotations 4 Recommended, ErrorProne, Apex Apex supported non existent annotations for legacy reasons. In the future, use of such non-existent annotations could result in broken apex code that will not compile. This will prevent users of garbage annotations from being able to use legitimate annotations added to Apex in the future. A full list of supported annotations can be found at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation.htm
AvoidNonRestrictiveQueries 4 Recommended, Performance, Apex When working with very large amounts of data, unfiltered SOQL or SOSL queries can quickly cause governor limit exceptions.
AvoidSControls 1 AppExchange, Security, XML Detects if S-Controls are used since they should not be used in managed packages.
AvoidSecurityEnforcedOldApiVersion 3 AppExchange, Security, Apex Detects use of WITH SECURITY_ENFORCED in API version less than 48.0
AvoidStatefulDatabaseResult 3 Recommended, ErrorProne, Apex Using instance variables of the following types (or collections of these types) within a stateful batch class can cause serialization errors between batch iterations: - Database.DeleteResult - Database.EmptyRecycleBinResult - Database.MergeResult - Database.SaveResult - Database.UndeleteResult - Database.UpsertResult This error occurs inconsistently and asynchronously... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_errorprone.html#avoidstatefuldatabaseresult
AvoidTrailingComma 2 ErrorProne, JavaScript This rule helps improve code portability due to differences in browser treatment of trailing commas in object or array literals.
AvoidUnauthorizedApiSessionIdInApex 3 AppExchange, Security, Apex Detects use of ${API.Session_Id} to retrieve a session ID. For more guidance on approved use cases, read the Session Id Guidance document.
AvoidUnauthorizedApiSessionIdInVisualforce 3 AppExchange, Security, Visualforce Detects use of Api.Session_ID to retrieve a session ID in Visualforce code. For more guidance on approved use cases, read the Session Id Guidance document.
AvoidUnauthorizedGetSessionIdInApex 3 AppExchange, Security, Apex Detects use of UserInfo.getSessionId() to retrieve a session ID. For more guidance on approved use cases, read the Session Id Guidance document.
AvoidUnauthorizedGetSessionIdInVisualforce 2 AppExchange, Security, Visualforce Detects use of GETSESSIONID() to retrieve a session ID in Visualforce code. For more guidance on approved use cases, read the Session Id Guidance document.
AvoidUnescapedHtmlInAura 2 AppExchange, Security, HTML Detects use of aura:unescapedHtml,which should be used cautiously. Developers should ensure that the unescapedHtml should not use tainted input to protect against XSS.
AvoidUnsafePasswordManagementUse 1 AppExchange, Security, Apex Detects where System.setPassword() exists in Apex code. Use this method with caution.
AvoidWithStatement 2 BestPractices, JavaScript Avoid using with - it's bad news
ClassNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for type declarations. This rule reports type declarations which do not match the regex that applies to their specific kind (e.g. enum or interface). Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Pascal case).
CognitiveComplexity 3 Recommended, Design, Apex Methods that are highly complex are difficult to read and more costly to maintain. If you include too much decisional logic within a single method, you make its behavior hard to understand and more difficult to modify. Cognitive complexity is a measure of how difficult it is for humans to read and understand a method. Code that contains a break in the control flow is more complex, whereas the... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_design.html#cognitivecomplexity
ConsistentReturn 3 BestPractices, JavaScript ECMAScript does provide for return types on functions, and therefore there is no solid rule as to their usage. However, when a function does use returns they should all have a value, or all with no value. Mixed return usage is likely a bug, or at best poor style.
CyclomaticComplexity 3 Recommended, Design, Apex The complexity of methods directly affects maintenance costs and readability. Concentrating too much decisional logic in a single method makes its behaviour hard to read and change. Cyclomatic complexity assesses the complexity of a method by counting the number of decision points in a method, plus one for the method entry. Decision points are places where the control flow jumps to another... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_design.html#cyclomaticcomplexity
DebugsShouldUseLoggingLevel 4 Recommended, BestPractices, Apex The first parameter of System.debug, when using the signature with two parameters, is a LoggingLevel enum. Having the Logging Level specified provides a cleaner log, and improves readability of it.
EagerlyLoadedDescribeSObjectResult 2 Recommended, Performance, Apex This rule finds DescribeSObjectResults which could have been loaded eagerly via SObjectType.getDescribe(). When using SObjectType.getDescribe() or Schema.describeSObjects() without supplying a SObjectDescribeOptions, implicitly it will be using SObjectDescribeOptions.DEFAULT and then all child relationships will be loaded eagerly regardless whether this informati... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_performance.html#eagerlyloadeddescribesobjectresult
EmptyCatchBlock 2 Recommended, ErrorProne, Apex Empty Catch Block finds instances where an exception is caught, but nothing is done. In most circumstances, this swallows an exception which should either be acted on or reported.
EmptyIfStmt 3 Recommended, ErrorProne, Apex Empty If Statement finds instances where a condition is checked but nothing is done about it.
EmptyStatementBlock 3 Recommended, ErrorProne, Apex Empty block statements serve no purpose and should be removed.
EmptyTryOrFinallyBlock 3 Recommended, ErrorProne, Apex Avoid empty try or finally blocks - what's the point?
EmptyWhileStmt 3 Recommended, ErrorProne, Apex Empty While Statement finds all instances where a while statement does nothing. If it is a timing loop, then you should use Thread.sleep() for it; if it is a while loop that does a lot in the exit expression, rewrite it to make it clearer.
EqualComparison 3 ErrorProne, JavaScript Using == in condition may lead to unexpected results, as the variables are automatically casted to be of the same type. The === operator avoids the casting.
ExcessiveClassLength 3 Design, Apex Excessive class file lengths are usually indications that the class may be burdened with excessive responsibilities that could be provided by external classes or functions. In breaking these methods apart the code becomes more manageable and ripe for reuse. Deprecated: This rule is deprecated since PMD 7.19.0 and will be removed with PMD 8.0.0. Use {%rule NcssCount %} to find big classes.
ExcessiveParameterList 3 Recommended, Design, Apex Methods with numerous parameters are a challenge to maintain, especially if most of them share the same datatype. These situations usually denote the need for new objects to wrap the numerous parameters.
ExcessivePublicCount 3 Recommended, Design, Apex Classes with large numbers of public methods, attributes, and properties require disproportionate testing efforts since combinatorial side effects grow rapidly and increase risk. Refactoring these classes into smaller ones not only increases testability and reliability but also allows new variations to be developed easily.
FieldDeclarationsShouldBeAtStart 3 Recommended, CodeStyle, Apex Field declarations should appear before method declarations within a class. Note: Since PMD 7.21.0, properties are ignored. This means that fields can appear before or after properties (or fields and properties can be mixed) as long as all fields are placed before the first method declaration.
FieldNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for field declarations. This rule reports variable declarations which do not match the regex that applies to their specific kind ---e.g. constants (static final), static field, final field. Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case).
ForLoopsMustUseBraces 3 Recommended, CodeStyle, Apex Avoid using 'for' statements without using surrounding braces. If the code formatting or indentation is lost then it becomes difficult to separate the code being controlled from the rest.
ForLoopsMustUseBraces-javascript 3 CodeStyle, JavaScript Avoid using 'for' statements without using curly braces.
FormalParameterNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for formal parameters of methods. This rule reports formal parameters which do not match the regex that applies to their specific kind (e.g. method parameter, or final method parameter). Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case).
GlobalVariable 2 BestPractices, JavaScript This rule helps to avoid using accidentally global variables by simply missing the "var" declaration. Global variables can lead to side-effects that are hard to debug.
IfElseStmtsMustUseBraces 3 Recommended, CodeStyle, Apex Avoid using if..else statements without using surrounding braces. If the code formatting or indentation is lost then it becomes difficult to separate the code being controlled from the rest.
IfElseStmtsMustUseBraces-javascript 3 CodeStyle, JavaScript Avoid using if..else statements without using curly braces.
IfStmtsMustUseBraces 3 Recommended, CodeStyle, Apex Avoid using if statements without using braces to surround the code block. If the code formatting or indentation is lost then it becomes difficult to separate the code being controlled from the rest.
IfStmtsMustUseBraces-javascript 3 CodeStyle, JavaScript Avoid using if statements without using curly braces.
InaccessibleAuraEnabledGetter 3 Recommended, ErrorProne, Apex In the Summer '21 release, a mandatory security update enforces access modifiers on Apex properties in Lightning component markup. The update prevents access to private or protected Apex getters from Aura and Lightning Web Components.
InaccurateNumericLiteral 3 ErrorProne, JavaScript The numeric literal will have a different value at runtime, which can happen if you provide too much precision in a floating point number. This may result in numeric calculations being in error. Numbers in JavaScript are represented by 64bit double-precision floating point numbers internally and that's why there are some limits to the available precision of the number. See Number.isSafeInteger() and Number.EPSILON. Note: This rule was named InnaccurateNumericLiteral before PMD 7.4.0.
InvocableClassNoArgConstructor 3 Recommended, ErrorProne, Apex Apex classes containing @InvocableVariable properties used for flow parameters must expose a visible, zero-argument constructor to prevent runtime instantiation errors under modern Salesforce API versions.
LimitConnectedAppScope 3 AppExchange, Security, XML Detects if a connected app uses full scope instead of limited scope. Explain this use case in your AppExchange security review submission.
LoadCSSApexStylesheet 2 AppExchange, Security, Visualforce Determines where CSS must be loaded as a static resource
LoadCSSLinkHref 2 AppExchange, Security, Visualforce Determines where CSS must be loaded as a static resource
LoadJavaScriptHtmlScript 2 AppExchange, Security, Visualforce Determines HTML script locations where JavaScript code must be loaded as static resources.
LoadJavaScriptIncludeScript 2 AppExchange, Security, Visualforce Determines include script locations where JavaScript code must be loaded as static resources.
LocalVariableNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for local variable declarations. This rule reports variable declarations which do not match the regex that applies to their specific kind (e.g. local variable, or final local variable). Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case).
MethodNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for method declarations. This rule reports method declarations which do not match the regex that applies to their specific kind (e.g. static method, or test method). Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case).
MethodWithSameNameAsEnclosingClass 3 Recommended, ErrorProne, Apex Non-constructor methods should not have the same name as the enclosing class.
MissingEncoding 3 BestPractices, XML When the character encoding is missing from the XML declaration, the parser may produce garbled text. This is completely dependent on how the parser is set up and the content of the XML file, so it may be hard to reproduce. Providing an explicit encoding ensures accurate and consistent parsing.
MistypedCDATASection 3 ErrorProne, XML An XML CDATA section begins with a marker, which has two ].
NcssConstructorCount 4 Design, Apex This rule uses the NCSS (Non-Commenting Source Statements) algorithm to determine the number of lines of code for a given constructor. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one. Deprecated: This rule is deprecated since PMD 7.19.0 and will be removed with PMD 8.0.0. Use {% rule NcssCount %} instead.
NcssCount 3 Recommended, Apex, Custom This rule uses the NCSS (Non-Commenting Source Statements) metric to determine the number of lines of code in a class, method or constructor. NCSS ignores comments, blank lines, and only counts actual statements. For more details on the calculation, see the documentation {% jdoc apex::lang.apex.metrics.ApexMetrics#NCSS %}.
NcssMethodCount 4 Design, Apex This rule uses the NCSS (Non-Commenting Source Statements) algorithm to determine the number of lines of code for a given method. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one. Deprecated: This rule is deprecated since PMD 7.19.0 and will be removed with PMD 8.0.0. Use {% rule NcssCount %} instead.
NcssTypeCount 4 Design, Apex This rule uses the NCSS (Non-Commenting Source Statements) algorithm to determine the number of lines of code for a given type. NCSS ignores comments, and counts actual statements. Using this algorithm, lines of code that are split are counted as one. Deprecated: This rule is deprecated since PMD 7.19.0 and will be removed with PMD 8.0.0. Use {% rule NcssCount %} instead.
NoElseReturn 3 CodeStyle, JavaScript The else block in a if-else-construct is unnecessary if the if block contains a return. Then the content of the else block can be put outside. See also: http://eslint.org/docs/rules/no-else-return
OneDeclarationPerLine 3 Recommended, CodeStyle, Apex Apex allows the use of several variables declaration of the same type on one line. However, it can lead to quite messy code. This rule looks for several declarations on the same line.
OperationWithHighCostInLoop 3 Recommended, Performance, Apex This rule finds method calls inside loops that are known to be likely a performance issue. These methods should be called only once before the loop. Schema class methods like Schema.getGlobalDescribe() and Schema.describeSObjects() might be slow depending on the size of your organization. Calling these methods repeatedly inside a loop creates a potential performance issue.
OperationWithLimitsInLoop 3 Recommended, Performance, Apex Database class methods, DML operations, SOQL queries, SOSL queries, Approval class methods, Email sending, async scheduling or queueing within loops can cause governor limit exceptions. Instead, try to batch up the data into a list and invoke the operation once on that list of data outside the loop.
OverrideBothEqualsAndHashcode 2 Recommended, ErrorProne, Apex Override both public Boolean equals(Object obj), and public Integer hashCode(), or override neither. Even if you are inheriting a hashCode() from a parent class, consider implementing hashCode and explicitly delegating to your superclass. This is especially important when Using Custom Types in Map Keys and Sets.
PropertyNamingConventions 3 Recommended, CodeStyle, Apex Configurable naming conventions for property declarations. This rule reports property declarations which do not match the regex that applies to their specific kind (e.g. static property, or instance property). Each regex can be configured through properties. By default this rule uses the standard Apex naming convention (Camel case).
ProtectSensitiveData 3 AppExchange, Security, XML Detects where sensitive data must be stored with Protected Custom metadata or Protected Custom settings. Protected custom settings or protected custom metadata should be used to store secrets. Refer to the "Protect Secrets Using Platform Features" Trailhead module for more guidance.
QueueableWithoutFinalizer 4 Recommended, BestPractices, Apex Detects when the Queueable interface is used but a Finalizer is not attached. It is best practice to call the System.attachFinalizer(Finalizer f) method within the execute method of a class which implements the Queueable interface. Without attaching a Finalizer, there is no way of designing error recovery actions should the Queueable action fail.
ScopeForInVariable 2 BestPractices, JavaScript A for-in loop in which the variable name is not explicitly scoped to the enclosing scope with the 'var' keyword can refer to a variable in an enclosing scope outside the nearest enclosing scope. This will overwrite the existing value of the variable in the outer scope when the body of the for-in is evaluated. When the for-in loop has finished, the variable will contain the last... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_ecmascript_bestpractices.html#scopeforinvariable
StdCyclomaticComplexity 3 Design, Apex Complexity directly affects maintenance costs is determined by the number of decision points in a method plus one for the method entry. The decision points include 'if', 'while', 'for', and 'case labels' calls. Generally, numbers ranging from 1-4 denote low complexity, 5-7 denote moderate complexity, 8-10 denote high complexity, and 11+ is very high complexity.
TestMethodsMustBeInTestClasses 3 Recommended, ErrorProne, Apex Test methods marked as a testMethod or annotated with @IsTest, but not residing in a test class should be moved to a proper class or have the @IsTest annotation added to the class. Support for tests inside functional classes was removed in Spring-13 (API Version 27.0), making classes that violate this rule fail compile-time. This rule is mostly usable when dealing with legacy code.
TooManyFields 3 Recommended, Design, Apex Classes that have too many fields can become unwieldy and could be redesigned to have fewer fields, possibly through grouping related fields in new objects. For example, a class with individual city/state/zip fields could park them within a single Address field.
TypeShadowsBuiltInNamespace 2 Recommended, ErrorProne, Apex This rule finds Apex classes, enums, and interfaces that have the same name as a class, enum, or interface in the System or Schema namespace. Shadowing these namespaces in this way can lead to confusion and unexpected behavior. Code that intends to reference a System or Schema class, enum, or interface may inadvertently reference the locally defined type instead. This can... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_errorprone.html#typeshadowsbuiltinnamespace
UnnecessaryBlock 3 CodeStyle, JavaScript An unnecessary Block is present. Such Blocks are often used in other languages to introduce a new variable scope. Blocks do not behave like this in ECMAScript, and using them can be misleading. Considering removing this unnecessary Block.
UnnecessaryParentheses 4 CodeStyle, JavaScript Unnecessary parentheses should be removed.
UnnecessaryTypeAttribute 3 BestPractices, HTML In HTML5 the explicit type attribute for link and script elements is not needed. Modern browsers expect stylesheets to be in CSS and scripts to use JavaScript.
UnreachableCode 2 CodeStyle, JavaScript A 'return', 'break', 'continue', or 'throw' statement should be the last in a block. Statements after these will never execute. This is a bug, or extremely poor style.
UnusedLocalVariable 3 Recommended, BestPractices, Apex Detects when a local variable is declared and/or assigned but not used.
UnusedMethod 3 Recommended, Design, Apex Avoid having unused methods since they make understanding and maintaining code harder. This rule finds not only unused private methods, but public methods as well, as long as the class itself is not entirely unused. A class is considered used, if it contains at least one other method/variable declaration that is used, as shown in the test project file Foo.cls. Apex Language Server is used to make this... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_apex_design.html#unusedmethod
UseAltAttributeForImages 3 BestPractices, HTML Always use an "alt" attribute for images. This provides an alternative text and is extensively used by screen readers.
UseBaseWithParseInt 2 BestPractices, JavaScript This rule checks for usages of parseInt. While the second parameter is optional and usually defaults to 10 (base/radix is 10 for a decimal number), different implementations may behave differently. It also improves readability, if the base is given. See also: parseInt()
UseHttpsCallbackUrlConnectedApp 3 AppExchange, Security, XML Detects instances of an OAuth callback URL that uses HTTP. Use HTTPS instead.
VfCsrf 2 Recommended, Security, Visualforce Avoid calling VF action upon page load as the action becomes vulnerable to CSRF.
VfHtmlStyleTagXss 2 Recommended, Security, Visualforce Checks for the correct encoding in <style/> tags in Visualforce pages. The rule is based on Salesforce Security's recommendation to prevent XSS in Visualforce as mentioned on Secure Coding Cross Site Scripting. In order to avoid cross site scripting, the relevant encoding must be used in HTML tags. The rule expects URLENCODING or JSINHTMLENCODING for URL-based style values and any... Learn more: https://docs.pmd-code.org/pmd-doc-7.26.0/pmd_rules_visualforce_security.html#vfhtmlstyletagxss
VfUnescapeEl 2 Recommended, Security, Visualforce Avoid unescaped user controlled content in EL as it results in XSS.
WhileLoopsMustUseBraces 3 Recommended, CodeStyle, Apex Avoid using 'while' statements without using braces to surround the code block. If the code formatting or indentation is lost then it becomes difficult to separate the code being controlled from the rest.
WhileLoopsMustUseBraces-javascript 3 CodeStyle, JavaScript Avoid using 'while' statements without using curly braces.

ESLint

Rule Severity Tags What it reports
@lwc/lwc-platform/no-aura 3 Recommended, LWC, ErrorProne, JavaScript disallow usage of "$A"
@lwc/lwc-platform/no-aura-libs 3 Recommended, LWC, ErrorProne, JavaScript disallow import of Aura libraries
@lwc/lwc-platform/no-community-import 3 Recommended, LWC, ErrorProne, JavaScript disallow import of Community-only properties
@lwc/lwc-platform/no-create-context-provider 3 Recommended, LWC, BestPractices, JavaScript disallow import of "createContextProvider" from "lwc"
@lwc/lwc-platform/no-deprecated-module-import 3 Recommended, LWC, BestPractices, JavaScript disallow importing deprecated modules
@lwc/lwc-platform/no-dynamic-import-identifier 3 Recommended, LWC, BestPractices, JavaScript disallow dynamic import with an identifier import(id), import("stringLiteral" + id)
@lwc/lwc-platform/no-inline-disable 3 Recommended, LWC, BestPractices, JavaScript disallow inline disablement of ESLint rule
@lwc/lwc-platform/no-interop 3 Recommended, LWC, BestPractices, JavaScript disallow import of "aura"
@lwc/lwc-platform/no-interop-create 3 Recommended, LWC, BestPractices, JavaScript disallow import of "createComponent" from "aura"
@lwc/lwc-platform/no-interop-dispatch 3 Recommended, LWC, BestPractices, JavaScript disallow import of "dispatchGlobalEvent" from "aura"
@lwc/lwc-platform/no-interop-execute 3 Recommended, LWC, BestPractices, JavaScript disallow import of "executeGlobalController" from "aura"
@lwc/lwc-platform/no-interop-execute-controller-with-client-def 3 Recommended, LWC, BestPractices, JavaScript disallow import of "executeControllerWithClientSideActionDef" from "aura"
@lwc/lwc-platform/no-interop-execute-privileged 3 Recommended, LWC, BestPractices, JavaScript disallow import of "unstable_executeGlobalControllerPrivileged" from "aura"
@lwc/lwc-platform/no-interop-execute-raw-response 3 Recommended, LWC, BestPractices, JavaScript disallow import of "executeGlobalControllerRawResponse" from "aura"
@lwc/lwc-platform/no-interop-execute-with-callback 3 Recommended, LWC, BestPractices, JavaScript disallow import of "executeGlobalControllerWithCallback" from "aura"
@lwc/lwc-platform/no-interop-get-event 3 Recommended, LWC, BestPractices, JavaScript disallow import of "getEventDef" from "aura"
@lwc/lwc-platform/no-interop-get-module 3 Recommended, LWC, BestPractices, JavaScript disallow import of "getModule" from "aura"
@lwc/lwc-platform/no-interop-is-external-definition 3 Recommended, LWC, BestPractices, JavaScript disallow import of "isExternalDefinition" from "aura"
@lwc/lwc-platform/no-interop-load-definitions 3 Recommended, LWC, BestPractices, JavaScript disallow import of "unstable_loadComponentDefs" from "aura"
@lwc/lwc-platform/no-interop-module-instrumentation 3 Recommended, LWC, BestPractices, JavaScript disallow import of "aura-instrumentation"
@lwc/lwc-platform/no-interop-module-storage 3 Recommended, LWC, BestPractices, JavaScript disallow import of "aura-storage"
@lwc/lwc-platform/no-interop-register 3 Recommended, LWC, BestPractices, JavaScript disallow import of "registerModule" from "aura"
@lwc/lwc-platform/no-interop-render 3 Recommended, LWC, BestPractices, JavaScript disallow import of "renderComponent" from "aura"
@lwc/lwc-platform/no-interop-sanitize 3 Recommended, LWC, BestPractices, JavaScript disallow import of "sanitizeDOM" from "aura"
@lwc/lwc-platform/no-lds-aura-controller-method 3 Recommended, LWC, BestPractices, JavaScript disallow import of "UnstableAuraControllerMethod" from "force/ldsAuraControllerMethod"
@lwc/lwc-platform/no-process-env 3 Recommended, LWC, BestPractices, JavaScript restrict usage of the "process" global object
@lwc/lwc-platform/no-restricted-namespaces 3 Recommended, LWC, ErrorProne, JavaScript disallow import or export from restricted namespaces
@lwc/lwc-platform/no-site-import 3 Recommended, LWC, ErrorProne, JavaScript disallow import of Site-only properties
@lwc/lwc-platform/no-wire-service 3 Recommended, LWC, ErrorProne, JavaScript disallow import of "wire-service"
@lwc/lwc-platform/valid-dynamic-import-hint 3 Recommended, LWC, BestPractices, JavaScript validate hint comment in a dynamic import statement
@lwc/lwc/newer-version-available 3 Recommended, LWC, BestPractices, JavaScript, Fixable suggest newer versions of module imports when available
@lwc/lwc/no-api-reassignments 3 Recommended, LWC, BestPractices, JavaScript prevent public property reassignments
@lwc/lwc/no-async-operation 3 Recommended, LWC, BestPractices, JavaScript restrict usage of async operations
@lwc/lwc/no-attributes-during-construction 3 Recommended, LWC, ErrorProne, JavaScript no attributes during construction
@lwc/lwc/no-deprecated 3 Recommended, LWC, BestPractices, JavaScript disallow usage of deprecated LWC APIs
@lwc/lwc/no-disallowed-lwc-imports 3 Recommended, LWC, BestPractices, JavaScript restrict unexpected imports from the lwc package
@lwc/lwc/no-document-query 3 Recommended, LWC, ErrorProne, JavaScript disallow DOM query at the document level.
@lwc/lwc/no-inner-html 2 Recommended, LWC, Security, JavaScript disallow usage of "innerHtml"
@lwc/lwc/no-leading-uppercase-api-name 3 Recommended, LWC, ErrorProne, JavaScript disallow public property to start with an upper case character
@lwc/lwc/no-template-children 3 Recommended, LWC, ErrorProne, JavaScript prevent accessing the immediate children of this.template
@lwc/lwc/no-unexpected-wire-adapter-usages 3 Recommended, LWC, BestPractices, JavaScript restrict unexpected wire adapter usages
@lwc/lwc/no-unknown-wire-adapters 3 Recommended, LWC, BestPractices, JavaScript restrict usage of unknown wire adapters
@lwc/lwc/prefer-custom-event 3 Recommended, LWC, BestPractices, JavaScript suggest usage of "CustomEvent" over "Event" constructor
@lwc/lwc/valid-api 3 Recommended, LWC, ErrorProne, JavaScript validate api decorator usage
@lwc/lwc/valid-graphql-wire-adapter-callback-parameters 3 Recommended, LWC, ErrorProne, JavaScript validate graphql error callback parameter
@lwc/lwc/valid-track 3 Recommended, LWC, ErrorProne, JavaScript validate track decorator usage
@lwc/lwc/valid-wire 3 Recommended, LWC, ErrorProne, JavaScript validate wire decorator usage
@salesforce-ux/slds/enforce-bem-usage 4 Recommended, SLDS, BestPractices, HTML, Fixable Replace BEM double-dash syntax in class names with single underscore syntax
@salesforce-ux/slds/enforce-component-hook-naming-convention 4 Recommended, SLDS, CodeStyle, CSS, Fixable Replace component styling hooks that use a deprecated naming convention.
@salesforce-ux/slds/enforce-sds-to-slds-hooks 4 Recommended, SLDS, Design, CSS, Fixable Convert your existing --sds styling hooks to --slds styling hooks. See lightningdesignsystem.com for more info.
@salesforce-ux/slds/lwc-token-to-slds-hook 3 Recommended, SLDS, ErrorProne, CSS, Fixable Replace the deprecated --lwc tokens with the latest --slds tokens. See lightningdesignsystem.com for more info.
@salesforce-ux/slds/modal-close-button-issue 3 Recommended, SLDS, ErrorProne, HTML, Fixable Update component attributes or CSS classes for the modal close button to comply with the modal component blueprint
@salesforce-ux/slds/no-deprecated-classes-slds2 3 Recommended, SLDS, ErrorProne, HTML Replace classes that aren't available with SLDS 2 classes. See lightningdesignsystem.com for more info.
@salesforce-ux/slds/no-hardcoded-values-slds2 4 Recommended, SLDS, Design, CSS, Fixable Replace static values with SLDS 2 styling hooks. For more information, look up design tokens on lightningdesignsystem.com.
@salesforce-ux/slds/no-slds-class-overrides 4 Recommended, SLDS, BestPractices, CSS Create new custom CSS classes instead of overriding SLDS selectors. For more information, see the Lightning Web Components Developer Guide.
@salesforce-ux/slds/no-slds-namespace-for-custom-hooks 4 Recommended, SLDS, BestPractices, CSS To differentiate custom styling hooks from SLDS styling hooks, create custom styling hooks in your namespace.
@salesforce-ux/slds/no-slds-private-var 3 Recommended, SLDS, ErrorProne, CSS, Fixable Some SLDS styling hooks are private and reserved only for internal Salesforce use. Private SLDS styling hooks have prefixes --_slds- and --slds-s-. For more information, look up private CSS in lightningdesignsystem.com.
@salesforce-ux/slds/no-slds-var-without-fallback 3 Recommended, SLDS, ErrorProne, CSS, Fixable Add fallback values to SLDS styling hooks. The fallback values are used in Salesforce environments where styling hooks are unavailable.
@salesforce-ux/slds/no-sldshook-fallback-for-lwctoken 4 Recommended, SLDS, BestPractices, CSS Avoid using --slds styling hooks as fallback values for --lwc tokens.
@salesforce-ux/slds/no-unsupported-hooks-slds2 3 Recommended, SLDS, ErrorProne, CSS Replace deprecated --slds styling hooks. See lightningdesignsystem.com for more info.
@salesforce-ux/slds/reduce-annotations 4 Recommended, SLDS, BestPractices, CSS Remove your annotations and update your code.
@salesforce/lightning/valid-apex-method-invocation 3 Recommended, LWC, ErrorProne, JavaScript enforce invoking Apex methods with the right arguments
@typescript-eslint/adjacent-overload-signatures 3 BestPractices, TypeScript Require that function overload signatures be consecutive
@typescript-eslint/array-type 3 BestPractices, TypeScript, Fixable Require consistently using either T[] or Array<T> for arrays
@typescript-eslint/await-thenable 2 ErrorProne, TypeScript Disallow awaiting a value that is not a Thenable
@typescript-eslint/ban-ts-comment 2 Recommended, ErrorProne, TypeScript Disallow @ts-<directive> comments or require descriptions after directives
@typescript-eslint/ban-tslint-comment 3 BestPractices, TypeScript, Fixable Disallow // tslint:<rule-flag> comments
@typescript-eslint/class-literal-property-style 2 ErrorProne, TypeScript Enforce that literals on classes are exposed in a consistent style
@typescript-eslint/class-methods-use-this 3 BestPractices, TypeScript Enforce that class methods utilize this
@typescript-eslint/consistent-generic-constructors 3 BestPractices, TypeScript, Fixable Enforce specifying generic type arguments on type annotation or constructor name of a constructor call
@typescript-eslint/consistent-indexed-object-style 3 BestPractices, TypeScript, Fixable Require or disallow the Record type
@typescript-eslint/consistent-return 3 BestPractices, TypeScript Require return statements to either always or never specify values
@typescript-eslint/consistent-type-assertions 3 BestPractices, TypeScript, Fixable Enforce consistent usage of type assertions
@typescript-eslint/consistent-type-definitions 3 BestPractices, TypeScript, Fixable Enforce type definitions to consistently use either interface or type
@typescript-eslint/consistent-type-exports 3 BestPractices, TypeScript, Fixable Enforce consistent usage of type exports
@typescript-eslint/consistent-type-imports 3 BestPractices, TypeScript, Fixable Enforce consistent usage of type imports
@typescript-eslint/default-param-last 3 BestPractices, TypeScript Enforce default parameters to be last
@typescript-eslint/dot-notation 3 BestPractices, TypeScript, Fixable Enforce dot notation whenever possible
@typescript-eslint/explicit-function-return-type 2 ErrorProne, TypeScript Require explicit return types on functions and class methods
@typescript-eslint/explicit-member-accessibility 2 ErrorProne, TypeScript, Fixable Require explicit accessibility modifiers on class properties and methods
@typescript-eslint/explicit-module-boundary-types 2 ErrorProne, TypeScript Require explicit return and argument types on exported functions' and classes' public class methods
@typescript-eslint/init-declarations 3 BestPractices, TypeScript Require or disallow initialization in variable declarations
@typescript-eslint/max-params 3 BestPractices, TypeScript Enforce a maximum number of parameters in function definitions
@typescript-eslint/member-ordering 3 BestPractices, TypeScript Require a consistent member declaration order
@typescript-eslint/method-signature-style 3 BestPractices, TypeScript, Fixable Enforce using a particular method signature syntax
@typescript-eslint/naming-convention 3 BestPractices, TypeScript Enforce naming conventions for everything across a codebase
@typescript-eslint/no-array-constructor 3 Recommended, BestPractices, TypeScript, Fixable Disallow generic Array constructors
@typescript-eslint/no-array-delete 2 ErrorProne, TypeScript Disallow using the delete operator on array values
@typescript-eslint/no-base-to-string 3 BestPractices, TypeScript Require .toString() and .toLocaleString() to only be called on objects which provide useful information when stringified
@typescript-eslint/no-confusing-non-null-assertion 2 ErrorProne, TypeScript Disallow non-null assertion in locations that may be confusing
@typescript-eslint/no-confusing-void-expression 2 ErrorProne, TypeScript, Fixable Require expressions of type void to appear in statement position
@typescript-eslint/no-deprecated 2 ErrorProne, TypeScript Disallow using code marked as @deprecated
@typescript-eslint/no-dupe-class-members 2 ErrorProne, TypeScript Disallow duplicate class members
@typescript-eslint/no-duplicate-enum-values 2 Recommended, ErrorProne, TypeScript Disallow duplicate enum member values
@typescript-eslint/no-duplicate-type-constituents 3 BestPractices, TypeScript, Fixable Disallow duplicate constituents of union or intersection types
@typescript-eslint/no-dynamic-delete 3 BestPractices, TypeScript Disallow using the delete operator on computed key expressions
@typescript-eslint/no-empty-function 3 BestPractices, TypeScript Disallow empty functions
@typescript-eslint/no-empty-object-type 3 Recommended, BestPractices, TypeScript Disallow accidentally using the "empty object" type
@typescript-eslint/no-explicit-any 3 Recommended, BestPractices, TypeScript, Fixable Disallow the any type
@typescript-eslint/no-extra-non-null-assertion 2 Recommended, ErrorProne, TypeScript, Fixable Disallow extra non-null assertions
@typescript-eslint/no-extraneous-class 3 BestPractices, TypeScript Disallow classes used as namespaces
@typescript-eslint/no-floating-promises 2 ErrorProne, TypeScript Require Promise-like statements to be handled appropriately
@typescript-eslint/no-for-in-array 2 ErrorProne, TypeScript Disallow iterating over an array with a for-in loop
@typescript-eslint/no-implied-eval 3 BestPractices, TypeScript Disallow the use of eval()-like functions
@typescript-eslint/no-import-type-side-effects 2 ErrorProne, TypeScript, Fixable Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers
@typescript-eslint/no-inferrable-types 3 BestPractices, TypeScript, Fixable Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean
@typescript-eslint/no-invalid-this 3 BestPractices, TypeScript Disallow this keywords outside of classes or class-like objects
@typescript-eslint/no-invalid-void-type 2 ErrorProne, TypeScript Disallow void type outside of generic or return types
@typescript-eslint/no-magic-numbers 3 BestPractices, TypeScript Disallow magic numbers
@typescript-eslint/no-meaningless-void-operator 3 BestPractices, TypeScript, Fixable Disallow the void operator except when used to discard a value
@typescript-eslint/no-misused-new 2 Recommended, ErrorProne, TypeScript Enforce valid definition of new and constructor
@typescript-eslint/no-misused-promises 2 ErrorProne, TypeScript Disallow Promises in places not designed to handle them
@typescript-eslint/no-misused-spread 2 ErrorProne, TypeScript Disallow using the spread operator when it might cause unexpected behavior
@typescript-eslint/no-mixed-enums 2 ErrorProne, TypeScript Disallow enums from having both number and string members
@typescript-eslint/no-namespace 3 Recommended, BestPractices, TypeScript Disallow TypeScript namespaces
@typescript-eslint/no-non-null-asserted-nullish-coalescing 2 ErrorProne, TypeScript Disallow non-null assertions in the left operand of a nullish coalescing operator
@typescript-eslint/no-non-null-asserted-optional-chain 2 Recommended, ErrorProne, TypeScript Disallow non-null assertions after an optional chain expression
@typescript-eslint/no-non-null-assertion 2 ErrorProne, TypeScript Disallow non-null assertions using the ! postfix operator
@typescript-eslint/no-redeclare 3 BestPractices, TypeScript Disallow variable redeclaration
@typescript-eslint/no-redundant-type-constituents 3 BestPractices, TypeScript Disallow members of unions and intersections that do nothing or override type information
@typescript-eslint/no-require-imports 2 Recommended, ErrorProne, TypeScript Disallow invocation of require()
@typescript-eslint/no-restricted-types 3 BestPractices, TypeScript, Fixable Disallow certain types
@typescript-eslint/no-shadow 3 BestPractices, TypeScript Disallow variable declarations from shadowing variables declared in the outer scope
@typescript-eslint/no-this-alias 3 Recommended, BestPractices, TypeScript Disallow aliasing this
@typescript-eslint/no-unnecessary-boolean-literal-compare 3 BestPractices, TypeScript, Fixable Disallow unnecessary equality comparisons against boolean literals
@typescript-eslint/no-unnecessary-condition 3 BestPractices, TypeScript Disallow conditionals where the type is always truthy or always falsy
@typescript-eslint/no-unnecessary-parameter-property-assignment 3 BestPractices, TypeScript Disallow unnecessary assignment of constructor property parameter
@typescript-eslint/no-unnecessary-qualifier 3 BestPractices, TypeScript, Fixable Disallow unnecessary namespace qualifiers
@typescript-eslint/no-unnecessary-template-expression 3 BestPractices, TypeScript, Fixable Disallow unnecessary template expressions
@typescript-eslint/no-unnecessary-type-arguments 3 BestPractices, TypeScript, Fixable Disallow type arguments that are equal to the default
@typescript-eslint/no-unnecessary-type-assertion 3 BestPractices, TypeScript, Fixable Disallow type assertions that do not change the type of an expression
@typescript-eslint/no-unnecessary-type-constraint 3 Recommended, BestPractices, TypeScript Disallow unnecessary constraints on generic types
@typescript-eslint/no-unnecessary-type-conversion 3 BestPractices, TypeScript Disallow conversion idioms when they do not change the type or value of the expression
@typescript-eslint/no-unnecessary-type-parameters 2 ErrorProne, TypeScript Disallow type parameters that aren't used multiple times
@typescript-eslint/no-unsafe-argument 2 ErrorProne, TypeScript Disallow calling a function with a value with type any
@typescript-eslint/no-unsafe-assignment 2 ErrorProne, TypeScript Disallow assigning a value with type any to variables and properties
@typescript-eslint/no-unsafe-call 2 ErrorProne, TypeScript Disallow calling a value with type any
@typescript-eslint/no-unsafe-declaration-merging 2 Recommended, ErrorProne, TypeScript Disallow unsafe declaration merging
@typescript-eslint/no-unsafe-enum-comparison 3 BestPractices, TypeScript Disallow comparing an enum value with a non-enum value
@typescript-eslint/no-unsafe-function-type 2 Recommended, ErrorProne, TypeScript Disallow using the unsafe built-in Function type
@typescript-eslint/no-unsafe-member-access 2 ErrorProne, TypeScript Disallow member access on a value with type any
@typescript-eslint/no-unsafe-return 2 ErrorProne, TypeScript Disallow returning a value with type any from a function
@typescript-eslint/no-unsafe-type-assertion 2 ErrorProne, TypeScript Disallow type assertions that narrow a type
@typescript-eslint/no-unsafe-unary-minus 2 ErrorProne, TypeScript Require unary negation to take a number
@typescript-eslint/no-unused-expressions 3 Recommended, BestPractices, TypeScript Disallow unused expressions
@typescript-eslint/no-unused-private-class-members 2 ErrorProne, TypeScript Disallow unused private class members
@typescript-eslint/no-unused-vars 2 Recommended, ErrorProne, TypeScript, Fixable Disallow unused variables
@typescript-eslint/no-use-before-define 2 ErrorProne, TypeScript Disallow the use of variables before they are defined
@typescript-eslint/no-useless-constructor 2 ErrorProne, TypeScript Disallow unnecessary constructors
@typescript-eslint/no-useless-default-assignment 3 BestPractices, TypeScript, Fixable Disallow default values that will never be used
@typescript-eslint/no-useless-empty-export 3 BestPractices, TypeScript, Fixable Disallow empty exports that don't change anything in a module file
@typescript-eslint/no-wrapper-object-types 2 Recommended, ErrorProne, TypeScript, Fixable Disallow using confusing built-in primitive class wrappers
@typescript-eslint/non-nullable-type-assertion-style 3 BestPractices, TypeScript, Fixable Enforce non-null assertions over explicit type assertions
@typescript-eslint/only-throw-error 2 ErrorProne, TypeScript Disallow throwing non-Error values as exceptions
@typescript-eslint/parameter-properties 2 ErrorProne, TypeScript Require or disallow parameter properties in class constructors
@typescript-eslint/prefer-as-const 3 Recommended, BestPractices, TypeScript, Fixable Enforce the use of as const over literal type
@typescript-eslint/prefer-destructuring 3 BestPractices, TypeScript, Fixable Require destructuring from arrays and/or objects
@typescript-eslint/prefer-enum-initializers 3 BestPractices, TypeScript Require each enum member value to be explicitly initialized
@typescript-eslint/prefer-find 3 BestPractices, TypeScript Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result
@typescript-eslint/prefer-for-of 3 BestPractices, TypeScript Enforce the use of for-of loop over the standard for loop where possible
@typescript-eslint/prefer-function-type 3 BestPractices, TypeScript, Fixable Enforce using function types instead of interfaces with call signatures
@typescript-eslint/prefer-includes 3 BestPractices, TypeScript, Fixable Enforce includes method over indexOf method
@typescript-eslint/prefer-literal-enum-member 3 BestPractices, TypeScript Require all enum members to be literal values
@typescript-eslint/prefer-namespace-keyword 3 Recommended, BestPractices, TypeScript, Fixable Require using namespace keyword over module keyword to declare custom TypeScript modules
@typescript-eslint/prefer-nullish-coalescing 3 BestPractices, TypeScript Enforce using the nullish coalescing operator instead of logical assignments or chaining
@typescript-eslint/prefer-optional-chain 3 BestPractices, TypeScript, Fixable Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects
@typescript-eslint/prefer-promise-reject-errors 3 BestPractices, TypeScript Require using Error objects as Promise rejection reasons
@typescript-eslint/prefer-readonly 3 BestPractices, TypeScript, Fixable Require private members to be marked as readonly if they're never modified outside of the constructor
@typescript-eslint/prefer-readonly-parameter-types 3 BestPractices, TypeScript Require function parameters to be typed as readonly to prevent accidental mutation of inputs
@typescript-eslint/prefer-reduce-type-parameter 2 ErrorProne, TypeScript, Fixable Enforce using type parameter when calling Array#reduce instead of using a type assertion
@typescript-eslint/prefer-regexp-exec 3 BestPractices, TypeScript, Fixable Enforce RegExp#exec over String#match if no global flag is provided
@typescript-eslint/prefer-return-this-type 3 BestPractices, TypeScript, Fixable Enforce that this is used when only this type is returned
@typescript-eslint/prefer-string-starts-ends-with 3 BestPractices, TypeScript, Fixable Enforce using String#startsWith and String#endsWith over other equivalent methods of checking substrings
@typescript-eslint/promise-function-async 3 BestPractices, TypeScript, Fixable Require any function or method that returns a Promise to be marked async
@typescript-eslint/related-getter-setter-pairs 2 ErrorProne, TypeScript Enforce that get() types should be assignable to their equivalent set() type
@typescript-eslint/require-array-sort-compare 2 ErrorProne, TypeScript Require Array#sort and Array#toSorted calls to always provide a compareFunction
@typescript-eslint/require-await 3 BestPractices, TypeScript Disallow async functions which do not return promises and have no await expression
@typescript-eslint/restrict-plus-operands 2 ErrorProne, TypeScript Require both operands of addition to be the same type and be bigint, number, or string
@typescript-eslint/restrict-template-expressions 2 ErrorProne, TypeScript Enforce template literal expressions to be of string type
@typescript-eslint/return-await 2 ErrorProne, TypeScript, Fixable Enforce consistent awaiting of returned promises
@typescript-eslint/strict-boolean-expressions 3 BestPractices, TypeScript Disallow certain types in boolean expressions
@typescript-eslint/strict-void-return 2 ErrorProne, TypeScript Disallow passing a value-returning function in a position accepting a void function
@typescript-eslint/switch-exhaustiveness-check 3 BestPractices, TypeScript Require switch-case statements to be exhaustive
@typescript-eslint/triple-slash-reference 3 Recommended, BestPractices, TypeScript Disallow certain triple slash directives in favor of ES6-style import declarations
@typescript-eslint/unbound-method 2 ErrorProne, TypeScript Enforce unbound methods are called with their expected scope
@typescript-eslint/unified-signatures 3 BestPractices, TypeScript Disallow two overloads that could be unified into one with a union or an optional/rest parameter
@typescript-eslint/use-unknown-in-catch-callback-variable 3 BestPractices, TypeScript Enforce typing arguments in Promise rejection callbacks as unknown
accessor-pairs 3 BestPractices, JavaScript, TypeScript Enforce getter and setter pairs in objects and classes
array-callback-return 2 ErrorProne, JavaScript, TypeScript Enforce return statements in callbacks of array methods
arrow-body-style 3 BestPractices, JavaScript, TypeScript, Fixable Require braces around arrow function bodies
block-scoped-var 3 BestPractices, JavaScript, TypeScript Enforce the use of variables within the scope they are defined
camelcase 3 BestPractices, JavaScript, TypeScript Enforce camelcase naming convention
capitalized-comments 3 BestPractices, JavaScript, TypeScript, Fixable Enforce or disallow capitalization of the first letter of a comment
class-methods-use-this 3 BestPractices, JavaScript Enforce that class methods utilize this
complexity 3 BestPractices, JavaScript, TypeScript Enforce a maximum cyclomatic complexity allowed in a program
consistent-return 3 BestPractices, JavaScript Require return statements to either always or never specify values
consistent-this 3 BestPractices, JavaScript, TypeScript Enforce consistent naming when capturing the current execution context
constructor-super 2 Recommended, ErrorProne, JavaScript Require super() calls in constructors
curly 3 BestPractices, JavaScript, TypeScript, Fixable Enforce consistent brace style for all control statements
default-case 3 BestPractices, JavaScript, TypeScript Require default cases in switch statements
default-case-last 3 BestPractices, JavaScript, TypeScript Enforce default clauses in switch statements to be last
default-param-last 3 BestPractices, JavaScript Enforce default parameters to be last
dot-notation 3 BestPractices, JavaScript, Fixable Enforce dot notation whenever possible
eqeqeq 3 BestPractices, JavaScript, TypeScript, Fixable Require the use of === and !==
for-direction 2 Recommended, ErrorProne, JavaScript, TypeScript Enforce for loop update clause moving the counter in the right direction
func-name-matching 3 BestPractices, JavaScript, TypeScript Require function names to match the name of the variable or property to which they are assigned
func-names 3 BestPractices, JavaScript, TypeScript Require or disallow named function expressions
func-style 3 BestPractices, JavaScript, TypeScript Enforce the consistent use of either function declarations or expressions assigned to variables
getter-return 2 Recommended, ErrorProne, JavaScript Enforce return statements in getters
grouped-accessor-pairs 3 BestPractices, JavaScript, TypeScript Require grouped accessor pairs in object literals and classes
guard-for-in 3 BestPractices, JavaScript, TypeScript Require for-in loops to include an if statement
id-denylist 3 BestPractices, JavaScript, TypeScript Disallow specified identifiers
id-length 3 BestPractices, JavaScript, TypeScript Enforce minimum and maximum identifier lengths
id-match 3 BestPractices, JavaScript, TypeScript Require identifiers to match a specified regular expression
import/default 2 Recommended, LWC, ErrorProne, JavaScript Ensure a default export is present, given a default import.
import/export 2 Recommended, LWC, ErrorProne, JavaScript Forbid any invalid exports, i.e. re-export of the same name.
import/named 2 Recommended, LWC, ErrorProne, JavaScript Ensure named imports correspond to a named export in the remote file.
import/namespace 2 Recommended, LWC, ErrorProne, JavaScript Ensure imported namespaces contain dereferenced properties as they are dereferenced.
init-declarations 3 BestPractices, JavaScript Require or disallow initialization in variable declarations
jest/expect-expect 5 Recommended, LWC, BestPractices, JavaScript Enforce assertion to be made in a test body
jest/no-alias-methods 3 Recommended, LWC, BestPractices, JavaScript, Fixable Disallow alias methods
jest/no-commented-out-tests 5 Recommended, LWC, BestPractices, JavaScript Disallow commented out tests
jest/no-conditional-expect 2 Recommended, LWC, ErrorProne, JavaScript Disallow calling expect conditionally
jest/no-disabled-tests 5 Recommended, LWC, BestPractices, JavaScript Disallow disabled tests
jest/no-done-callback 3 Recommended, LWC, BestPractices, JavaScript Disallow using a callback in asynchronous tests and hooks
jest/no-export 3 Recommended, LWC, BestPractices, JavaScript Disallow using exports in files containing tests
jest/no-focused-tests 3 Recommended, LWC, BestPractices, JavaScript Disallow focused tests
jest/no-identical-title 3 Recommended, LWC, BestPractices, JavaScript Disallow identical titles
jest/no-interpolation-in-snapshots 2 Recommended, LWC, ErrorProne, JavaScript Disallow string interpolation inside snapshots
jest/no-jasmine-globals 3 Recommended, LWC, BestPractices, JavaScript, Fixable Disallow Jasmine globals
jest/no-mocks-import 2 Recommended, LWC, ErrorProne, JavaScript Disallow manually importing from __mocks__
jest/no-standalone-expect 3 Recommended, LWC, BestPractices, JavaScript Disallow using expect outside of it or test blocks
jest/no-test-prefixes 3 Recommended, LWC, BestPractices, JavaScript, Fixable Require using .only and .skip over f and x
jest/valid-describe-callback 2 Recommended, LWC, ErrorProne, JavaScript Enforce valid describe() callback
jest/valid-expect 3 Recommended, LWC, BestPractices, JavaScript, Fixable Enforce valid expect() usage
jest/valid-expect-in-promise 3 Recommended, LWC, BestPractices, JavaScript Require promises that have expectations in their chain to be valid
jest/valid-title 3 Recommended, LWC, BestPractices, JavaScript, Fixable Enforce valid titles
jsx-a11y/alt-text 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce all elements that require alternative text have meaningful information to relay back to end user.
jsx-a11y/anchor-has-content 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce all anchors to contain accessible content.
jsx-a11y/anchor-is-valid 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce all anchors are valid, navigable elements.
jsx-a11y/aria-activedescendant-has-tabindex 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce elements with aria-activedescendant are tabbable.
jsx-a11y/aria-props 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce all aria-* props are valid.
jsx-a11y/aria-proptypes 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce ARIA state and property values are valid.
jsx-a11y/aria-role 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that elements with ARIA roles must use a valid, non-abstract ARIA role.
jsx-a11y/aria-unsupported-elements 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that elements that do not support ARIA roles, states, and properties do not have those attributes.
jsx-a11y/autocomplete-valid 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that autocomplete attributes are used correctly.
jsx-a11y/click-events-have-key-events 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce a clickable non-interactive element has at least one keyboard event listener.
jsx-a11y/heading-has-content 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce heading (h1, h2, etc) elements contain accessible content.
jsx-a11y/html-has-lang 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce <html> element has lang prop.
jsx-a11y/iframe-has-title 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce iframe elements have a title attribute.
jsx-a11y/img-redundant-alt 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce <img> alt prop does not contain the word "image", "picture", or "photo".
jsx-a11y/interactive-supports-focus 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that elements with interactive handlers like onClick must be focusable.
jsx-a11y/label-has-associated-control 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that a label tag has a text label and an associated control.
jsx-a11y/media-has-caption 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforces that <audio> and <video> elements must have a <track> for captions.
jsx-a11y/mouse-events-have-key-events 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that onMouseOver/onMouseOut are accompanied by onFocus/onBlur for keyboard-only users.
jsx-a11y/no-access-key 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that the accessKey prop is not used on any element to avoid complications with keyboard commands used by a screen reader.
jsx-a11y/no-autofocus 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce autoFocus prop is not used.
jsx-a11y/no-distracting-elements 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce distracting elements are not used.
jsx-a11y/no-interactive-element-to-noninteractive-role 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Interactive elements should not be assigned non-interactive roles.
jsx-a11y/no-noninteractive-element-interactions 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Non-interactive elements should not be assigned mouse or keyboard event listeners.
jsx-a11y/no-noninteractive-element-to-interactive-role 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Non-interactive elements should not be assigned interactive roles.
jsx-a11y/no-noninteractive-tabindex 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript tabIndex should only be declared on interactive elements.
jsx-a11y/no-redundant-roles 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce explicit role property is not the same as implicit/default role property on element.
jsx-a11y/no-static-element-interactions 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that non-interactive, visible elements (such as <div>) that have click handlers use the role attribute.
jsx-a11y/role-has-required-aria-props 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that elements with ARIA roles must have all required attributes for that role.
jsx-a11y/role-supports-aria-props 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce that elements with explicit or implicit roles defined contain only aria-* properties supported by that role.
jsx-a11y/scope 3 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce scope prop is only used on <th> elements.
jsx-a11y/tabindex-no-positive 2 Recommended, A11y, React, BestPractices, JavaScript, TypeScript Enforce tabIndex value is not greater than zero.
logical-assignment-operators 3 BestPractices, JavaScript, TypeScript, Fixable Require or disallow logical assignment operator shorthand
max-classes-per-file 3 BestPractices, JavaScript, TypeScript Enforce a maximum number of classes per file
max-depth 3 BestPractices, JavaScript, TypeScript Enforce a maximum depth that blocks can be nested
max-lines 3 BestPractices, JavaScript, TypeScript Enforce a maximum number of lines per file
max-lines-per-function 3 BestPractices, JavaScript, TypeScript Enforce a maximum number of lines of code in a function
max-nested-callbacks 3 BestPractices, JavaScript, TypeScript Enforce a maximum depth that callbacks can be nested
max-params 3 BestPractices, JavaScript Enforce a maximum number of parameters in function definitions
max-statements 3 BestPractices, JavaScript, TypeScript Enforce a maximum number of statements allowed in function blocks
new-cap 3 BestPractices, JavaScript, TypeScript Require constructor names to begin with a capital letter
no-alert 3 BestPractices, JavaScript, TypeScript Disallow the use of alert, confirm, and prompt
no-array-constructor 3 BestPractices, JavaScript, Fixable Disallow Array constructors
no-async-promise-executor 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow using an async function as a Promise executor
no-await-in-loop 2 ErrorProne, JavaScript, TypeScript Disallow await inside of loops
no-bitwise 3 BestPractices, JavaScript, TypeScript Disallow bitwise operators
no-caller 3 BestPractices, JavaScript, TypeScript Disallow the use of arguments.caller or arguments.callee
no-case-declarations 3 Recommended, BestPractices, JavaScript, TypeScript Disallow lexical declarations in case clauses
no-class-assign 2 Recommended, ErrorProne, JavaScript Disallow reassigning class members
no-compare-neg-zero 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow comparing against -0
no-cond-assign 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow assignment operators in conditional expressions
no-console 3 BestPractices, JavaScript, TypeScript Disallow the use of console
no-const-assign 2 Recommended, ErrorProne, JavaScript Disallow reassigning const, using, and await using variables
no-constant-binary-expression 2 ErrorProne, JavaScript, TypeScript Disallow expressions where the operation doesn't affect the value
no-constant-condition 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow constant expressions in conditions
no-constructor-return 2 ErrorProne, JavaScript, TypeScript Disallow returning value from constructor
no-continue 3 BestPractices, JavaScript, TypeScript Disallow continue statements
no-control-regex 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow control characters in regular expressions
no-debugger 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow the use of debugger
no-delete-var 3 Recommended, BestPractices, JavaScript, TypeScript Disallow deleting variables
no-div-regex 3 BestPractices, JavaScript, TypeScript, Fixable Disallow equal signs explicitly at the beginning of regular expressions
no-dupe-args 2 Recommended, ErrorProne, JavaScript Disallow duplicate arguments in function definitions
no-dupe-class-members 2 Recommended, ErrorProne, JavaScript Disallow duplicate class members
no-dupe-else-if 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow duplicate conditions in if-else-if chains
no-dupe-keys 2 Recommended, ErrorProne, JavaScript Disallow duplicate keys in object literals
no-duplicate-case 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow duplicate case labels
no-duplicate-imports 2 ErrorProne, JavaScript, TypeScript Disallow duplicate module imports
no-else-return 3 BestPractices, JavaScript, TypeScript, Fixable Disallow else blocks after return statements in if statements
no-empty 3 Recommended, BestPractices, JavaScript, TypeScript Disallow empty block statements
no-empty-character-class 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow empty character classes in regular expressions
no-empty-function 3 BestPractices, JavaScript Disallow empty functions
no-empty-pattern 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow empty destructuring patterns
no-empty-static-block 3 BestPractices, JavaScript, TypeScript Disallow empty static blocks
no-eq-null 3 BestPractices, JavaScript, TypeScript Disallow null comparisons without type-checking operators
no-eval 3 BestPractices, JavaScript, TypeScript Disallow the use of eval()
no-ex-assign 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow reassigning exceptions in catch clauses
no-extend-native 3 BestPractices, JavaScript, TypeScript Disallow extending native types
no-extra-bind 3 BestPractices, JavaScript, TypeScript, Fixable Disallow unnecessary calls to .bind()
no-extra-boolean-cast 3 Recommended, BestPractices, JavaScript, TypeScript, Fixable Disallow unnecessary boolean casts
no-extra-label 3 BestPractices, JavaScript, TypeScript, Fixable Disallow unnecessary labels
no-fallthrough 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow fallthrough of case statements
no-func-assign 2 Recommended, ErrorProne, JavaScript Disallow reassigning function declarations
no-global-assign 3 Recommended, BestPractices, JavaScript, TypeScript Disallow assignments to native objects or read-only global variables
no-implicit-coercion 3 BestPractices, JavaScript, TypeScript, Fixable Disallow shorthand type conversions
no-implicit-globals 3 BestPractices, JavaScript, TypeScript Disallow declarations in the global scope
no-implied-eval 3 BestPractices, JavaScript Disallow the use of eval()-like methods
no-import-assign 2 Recommended, ErrorProne, JavaScript Disallow assigning to imported bindings
no-inline-comments 3 BestPractices, JavaScript, TypeScript Disallow inline comments after code
no-inner-declarations 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow variable or function declarations in nested blocks
no-invalid-regexp 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow invalid regular expression strings in RegExp constructors
no-invalid-this 3 BestPractices, JavaScript Disallow use of this in contexts where the value of this is undefined
no-irregular-whitespace 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow irregular whitespace
no-iterator 3 BestPractices, JavaScript, TypeScript Disallow the use of the __iterator__ property
no-label-var 3 BestPractices, JavaScript, TypeScript Disallow labels that share a name with a variable
no-labels 3 BestPractices, JavaScript, TypeScript Disallow labeled statements
no-lone-blocks 3 BestPractices, JavaScript, TypeScript Disallow unnecessary nested blocks
no-lonely-if 3 BestPractices, JavaScript, TypeScript, Fixable Disallow if statements as the only statement in else blocks
no-loop-func 3 BestPractices, JavaScript Disallow function declarations that contain unsafe references inside loop statements
no-loss-of-precision 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow literal numbers that lose precision
no-magic-numbers 3 BestPractices, JavaScript Disallow magic numbers
no-misleading-character-class 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow characters which are made with multiple code points in character class syntax
no-multi-assign 3 BestPractices, JavaScript, TypeScript Disallow use of chained assignment expressions
no-multi-str 3 BestPractices, JavaScript, TypeScript Disallow multiline strings
no-negated-condition 3 BestPractices, JavaScript, TypeScript Disallow negated conditions
no-nested-ternary 3 BestPractices, JavaScript, TypeScript Disallow nested ternary expressions
no-new 3 BestPractices, JavaScript, TypeScript Disallow new operators outside of assignments or comparisons
no-new-func 3 BestPractices, JavaScript, TypeScript Disallow new operators with the Function object
no-new-native-nonconstructor 2 ErrorProne, JavaScript Disallow new operators with global non-constructor functions
no-new-wrappers 3 BestPractices, JavaScript, TypeScript Disallow new operators with the String, Number, and Boolean objects
no-nonoctal-decimal-escape 3 Recommended, BestPractices, JavaScript, TypeScript Disallow \8 and \9 escape sequences in string literals
no-obj-calls 2 Recommended, ErrorProne, JavaScript Disallow calling global object properties as functions
no-object-constructor 3 BestPractices, JavaScript, TypeScript Disallow calls to the Object constructor without an argument
no-octal 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow octal literals
no-octal-escape 3 BestPractices, JavaScript, TypeScript Disallow octal escape sequences in string literals
no-param-reassign 3 BestPractices, JavaScript, TypeScript Disallow reassigning function parameters
no-plusplus 3 BestPractices, JavaScript, TypeScript Disallow the unary operators ++ and --
no-promise-executor-return 2 ErrorProne, JavaScript, TypeScript Disallow returning values from Promise executor functions
no-proto 3 BestPractices, JavaScript, TypeScript Disallow the use of the __proto__ property
no-prototype-builtins 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow calling some Object.prototype methods directly on objects
no-redeclare 3 Recommended, BestPractices, JavaScript Disallow variable redeclaration
no-regex-spaces 3 Recommended, BestPractices, JavaScript, TypeScript, Fixable Disallow multiple spaces in regular expressions
no-restricted-exports 3 BestPractices, JavaScript, TypeScript Disallow specified names in exports
no-restricted-globals 3 BestPractices, JavaScript, TypeScript Disallow specified global variables
no-restricted-imports 3 BestPractices, JavaScript Disallow specified modules when loaded by import
no-restricted-properties 3 BestPractices, JavaScript, TypeScript Disallow certain properties on certain objects
no-restricted-syntax 3 BestPractices, JavaScript, TypeScript Disallow specified syntax
no-return-assign 3 BestPractices, JavaScript, TypeScript Disallow assignment operators in return statements
no-script-url 3 BestPractices, JavaScript, TypeScript Disallow javascript: URLs
no-self-assign 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow assignments where both sides are exactly the same
no-self-compare 2 ErrorProne, JavaScript, TypeScript Disallow comparisons where both sides are exactly the same
no-sequences 3 BestPractices, JavaScript, TypeScript Disallow comma operators
no-setter-return 2 Recommended, ErrorProne, JavaScript Disallow returning values from setters
no-shadow 3 BestPractices, JavaScript Disallow variable declarations from shadowing variables declared in the outer scope
no-shadow-restricted-names 3 Recommended, BestPractices, JavaScript, TypeScript Disallow identifiers from shadowing restricted names
no-sparse-arrays 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow sparse arrays
no-template-curly-in-string 2 ErrorProne, JavaScript, TypeScript Disallow template literal placeholder syntax in regular strings
no-ternary 3 BestPractices, JavaScript, TypeScript Disallow ternary operators
no-this-before-super 2 Recommended, ErrorProne, JavaScript Disallow this/super before calling super() in constructors
no-throw-literal 3 BestPractices, JavaScript Disallow throwing literals as exceptions
no-unassigned-vars 2 ErrorProne, JavaScript, TypeScript Disallow let or var variables that are read but never assigned
no-undef 2 Recommended, ErrorProne, JavaScript Disallow the use of undeclared variables unless mentioned in /*global */ comments
no-undef-init 3 BestPractices, JavaScript, TypeScript, Fixable Disallow initializing variables to undefined
no-undefined 3 BestPractices, JavaScript, TypeScript Disallow the use of undefined as an identifier
no-underscore-dangle 3 BestPractices, JavaScript, TypeScript Disallow dangling underscores in identifiers
no-unexpected-multiline 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow confusing multiline expressions
no-unmodified-loop-condition 2 ErrorProne, JavaScript, TypeScript Disallow unmodified loop conditions
no-unneeded-ternary 3 BestPractices, JavaScript, TypeScript, Fixable Disallow ternary operators when simpler alternatives exist
no-unreachable 2 Recommended, ErrorProne, JavaScript Disallow unreachable code after return, throw, continue, and break statements
no-unreachable-loop 2 ErrorProne, JavaScript, TypeScript Disallow loops with a body that allows only one iteration
no-unsafe-finally 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow control flow statements in finally blocks
no-unsafe-negation 2 Recommended, ErrorProne, JavaScript Disallow negating the left operand of relational operators
no-unsafe-optional-chaining 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow use of optional chaining in contexts where the undefined value is not allowed
no-unused-expressions 3 BestPractices, JavaScript Disallow unused expressions
no-unused-labels 3 Recommended, BestPractices, JavaScript, TypeScript, Fixable Disallow unused labels
no-unused-private-class-members 2 ErrorProne, JavaScript, TypeScript Disallow unused private class members
no-unused-vars 2 Recommended, ErrorProne, JavaScript Disallow unused variables
no-use-before-define 2 ErrorProne, JavaScript Disallow the use of variables before they are defined
no-useless-assignment 2 ErrorProne, JavaScript, TypeScript Disallow variable assignments when the value is not used
no-useless-backreference 2 Recommended, ErrorProne, JavaScript, TypeScript Disallow useless backreferences in regular expressions
no-useless-call 3 BestPractices, JavaScript, TypeScript Disallow unnecessary calls to .call() and .apply()
no-useless-catch 3 Recommended, BestPractices, JavaScript, TypeScript Disallow unnecessary catch clauses
no-useless-computed-key 3 BestPractices, JavaScript, TypeScript, Fixable Disallow unnecessary computed property keys in objects and classes
no-useless-concat 3 BestPractices, JavaScript, TypeScript Disallow unnecessary concatenation of literals or template literals
no-useless-constructor 3 BestPractices, JavaScript Disallow unnecessary constructors
no-useless-escape 3 Recommended, BestPractices, JavaScript, TypeScript Disallow unnecessary escape characters
no-useless-rename 3 BestPractices, JavaScript, TypeScript, Fixable Disallow renaming import, export, and destructured assignments to the same name
no-useless-return 3 BestPractices, JavaScript, TypeScript, Fixable Disallow redundant return statements
no-var 3 Recommended, BestPractices, JavaScript, TypeScript, Fixable Require let or const instead of var
no-void 3 BestPractices, JavaScript, TypeScript Disallow void operators
no-warning-comments 3 BestPractices, JavaScript, TypeScript Disallow specified warning terms in comments
no-with 3 Recommended, BestPractices, JavaScript Disallow with statements
object-shorthand 3 BestPractices, JavaScript, TypeScript, Fixable Require or disallow method and property shorthand syntax for object literals
one-var 3 BestPractices, JavaScript, TypeScript, Fixable Enforce variables to be declared either together or separately in functions
operator-assignment 3 BestPractices, JavaScript, TypeScript, Fixable Require or disallow assignment operator shorthand where possible
prefer-arrow-callback 3 BestPractices, JavaScript, TypeScript, Fixable Require using arrow functions for callbacks
prefer-const 3 Recommended, BestPractices, JavaScript, TypeScript, Fixable Require const declarations for variables that are never reassigned after declared
prefer-destructuring 3 BestPractices, JavaScript, Fixable Require destructuring from arrays and/or objects
prefer-exponentiation-operator 3 BestPractices, JavaScript, TypeScript, Fixable Disallow the use of Math.pow in favor of the ** operator
prefer-named-capture-group 3 BestPractices, JavaScript, TypeScript Enforce using named capture group in regular expression
prefer-numeric-literals 3 BestPractices, JavaScript, TypeScript, Fixable Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals
prefer-object-has-own 3 BestPractices, JavaScript, TypeScript, Fixable Disallow use of Object.prototype.hasOwnProperty.call() and prefer use of Object.hasOwn()
prefer-object-spread 3 BestPractices, JavaScript, TypeScript, Fixable Disallow using Object.assign with an object literal as the first argument and prefer the use of object spread instead
prefer-promise-reject-errors 3 BestPractices, JavaScript Require using Error objects as Promise rejection reasons
prefer-regex-literals 3 BestPractices, JavaScript, TypeScript Disallow use of the RegExp constructor in favor of regular expression literals
prefer-rest-params 3 Recommended, BestPractices, JavaScript, TypeScript Require rest parameters instead of arguments
prefer-spread 3 Recommended, BestPractices, JavaScript, TypeScript Require spread operators instead of .apply()
prefer-template 3 BestPractices, JavaScript, TypeScript, Fixable Require template literals instead of string concatenation
preserve-caught-error 4 BestPractices, JavaScript, TypeScript Disallow losing originally caught error when re-throwing custom errors
radix 3 BestPractices, JavaScript, TypeScript Enforce the consistent use of the radix argument when using parseInt()
react-hooks/exhaustive-deps 3 Recommended, React, Design, JavaScript, TypeScript, Fixable verifies the list of dependencies for Hooks like useEffect and similar
react-hooks/rules-of-hooks 2 Recommended, React, Design, JavaScript, TypeScript enforces the Rules of Hooks
react/boolean-prop-naming 4 React, CodeStyle, JavaScript, TypeScript Enforces consistent naming for boolean props
react/button-has-type 3 React, ErrorProne, JavaScript, TypeScript Disallow usage of button elements without an explicit type attribute
react/checked-requires-onchange-or-readonly 3 React, BestPractices, JavaScript, TypeScript Enforce using onChange or readonly attribute when checked is used
react/default-props-match-prop-types 3 React, ErrorProne, JavaScript, TypeScript Enforce all defaultProps have a corresponding non-required PropType
react/destructuring-assignment 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce consistent usage of destructuring assignment of props, state, and context
react/display-name 3 Recommended, React, BestPractices, JavaScript, TypeScript Disallow missing displayName in a React component definition
react/forbid-component-props 3 React, ErrorProne, JavaScript, TypeScript Disallow certain props on components
react/forbid-dom-props 3 React, BestPractices, JavaScript, TypeScript Disallow certain props on DOM Nodes
react/forbid-elements 4 React, CodeStyle, JavaScript, TypeScript Disallow certain elements
react/forbid-foreign-prop-types 3 React, ErrorProne, JavaScript, TypeScript Disallow using another component's propTypes
react/forbid-prop-types 4 React, CodeStyle, JavaScript, TypeScript Disallow certain propTypes
react/forward-ref-uses-ref 4 React, ErrorProne, JavaScript, TypeScript Require all forwardRef components include a ref parameter
react/function-component-definition 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce a specific function type for function components
react/hook-use-state 3 React, ErrorProne, JavaScript, TypeScript Ensure destructuring and symmetric naming of useState hook value and setter variables
react/iframe-missing-sandbox 2 React, Security, JavaScript, TypeScript Enforce sandbox attribute on iframe elements
react/jsx-boolean-value 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce boolean attributes notation in JSX
react/jsx-child-element-spacing 4 React, ErrorProne, JavaScript, TypeScript Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
react/jsx-closing-bracket-location 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce closing bracket location in JSX
react/jsx-closing-tag-location 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce closing tag location for multiline JSX
react/jsx-curly-brace-presence 4 React, CodeStyle, JavaScript, TypeScript, Fixable Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
react/jsx-curly-newline 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce consistent linebreaks in curly braces in JSX attributes and expressions
react/jsx-curly-spacing 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
react/jsx-equals-spacing 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce or disallow spaces around equal signs in JSX attributes
react/jsx-filename-extension 3 React, BestPractices, JavaScript, TypeScript Disallow file extensions that may contain JSX
react/jsx-first-prop-new-line 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce proper position of the first property in JSX
react/jsx-fragments 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce shorthand or standard form for React fragments
react/jsx-handler-names 4 React, CodeStyle, JavaScript, TypeScript Enforce event handler naming conventions in JSX
react/jsx-indent 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce JSX indentation
react/jsx-indent-props 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce props indentation in JSX
react/jsx-key 3 Recommended, React, BestPractices, JavaScript, TypeScript Disallow missing key props in iterators/collection literals
react/jsx-max-depth 2 React, Design, JavaScript, TypeScript Enforce JSX maximum depth
react/jsx-max-props-per-line 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce maximum of props on a single line in JSX
react/jsx-newline 4 React, CodeStyle, JavaScript, TypeScript, Fixable Require or prevent a new line after jsx elements and expressions.
react/jsx-no-bind 3 React, Performance, JavaScript, TypeScript Disallow .bind() or arrow functions in JSX props
react/jsx-no-comment-textnodes 3 Recommended, React, ErrorProne, JavaScript, TypeScript Disallow comments from being inserted as text nodes
react/jsx-no-constructed-context-values 2 React, Performance, JavaScript, TypeScript Disallows JSX context provider values from taking values that will cause needless rerenders
react/jsx-no-duplicate-props 2 Recommended, React, ErrorProne, JavaScript, TypeScript Disallow duplicate properties in JSX
react/jsx-no-leaked-render 3 React, ErrorProne, JavaScript, TypeScript, Fixable Disallow problematic leaked values from being rendered
react/jsx-no-literals 4 React, CodeStyle, JavaScript, TypeScript Disallow usage of string literals in JSX
react/jsx-no-script-url 2 React, Security, JavaScript, TypeScript Disallow usage of javascript: URLs
react/jsx-no-target-blank 2 Recommended, React, Security, JavaScript, TypeScript, Fixable Disallow target="_blank" attribute without rel="noreferrer"
react/jsx-no-undef 3 Recommended, React, ErrorProne, JavaScript, TypeScript Disallow undeclared variables in JSX
react/jsx-no-useless-fragment 4 React, Design, JavaScript, TypeScript, Fixable Disallow unnecessary fragments
react/jsx-one-expression-per-line 4 React, CodeStyle, JavaScript, TypeScript, Fixable Require one JSX element per line
react/jsx-pascal-case 4 React, CodeStyle, JavaScript, TypeScript Enforce PascalCase for user-defined JSX components
react/jsx-props-no-multi-spaces 4 React, CodeStyle, JavaScript, TypeScript, Fixable Disallow multiple spaces between inline JSX props
react/jsx-props-no-spread-multi 3 React, Performance, JavaScript, TypeScript Disallow JSX prop spreading the same identifier multiple times
react/jsx-props-no-spreading 4 React, CodeStyle, JavaScript, TypeScript Disallow JSX prop spreading
react/jsx-sort-props 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce props alphabetical sorting
react/jsx-tag-spacing 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce whitespace in and around the JSX opening and closing brackets
react/jsx-uses-vars 4 Recommended, React, BestPractices, JavaScript, TypeScript Disallow variables used in JSX to be incorrectly marked as unused
react/jsx-wrap-multilines 4 React, CodeStyle, JavaScript, TypeScript, Fixable Disallow missing parentheses around multiline JSX
react/no-access-state-in-setstate 3 React, ErrorProne, JavaScript, TypeScript Disallow when this.state is accessed within setState
react/no-adjacent-inline-elements 4 React, CodeStyle, JavaScript, TypeScript Disallow adjacent inline elements not separated by whitespace.
react/no-array-index-key 3 React, Performance, JavaScript, TypeScript Disallow usage of Array index in keys
react/no-arrow-function-lifecycle 3 React, Design, JavaScript, TypeScript, Fixable Lifecycle methods should be methods on the prototype, not class fields
react/no-children-prop 3 Recommended, React, BestPractices, JavaScript, TypeScript Disallow passing of children as props
react/no-danger 2 React, Security, JavaScript, TypeScript Disallow usage of dangerous JSX properties
react/no-danger-with-children 2 Recommended, React, Security, JavaScript, TypeScript Disallow when a DOM element is using both children and dangerouslySetInnerHTML
react/no-deprecated 4 Recommended, React, Design, JavaScript, TypeScript Disallow usage of deprecated methods
react/no-did-mount-set-state 3 React, Performance, JavaScript, TypeScript Disallow usage of setState in componentDidMount
react/no-did-update-set-state 3 React, Performance, JavaScript, TypeScript Disallow usage of setState in componentDidUpdate
react/no-direct-mutation-state 2 Recommended, React, ErrorProne, JavaScript, TypeScript Disallow direct mutation of this.state
react/no-find-dom-node 2 Recommended, React, BestPractices, JavaScript, TypeScript Disallow usage of findDOMNode
react/no-invalid-html-attribute 4 React, ErrorProne, JavaScript, TypeScript Disallow usage of invalid attributes
react/no-is-mounted 2 Recommended, React, BestPractices, JavaScript, TypeScript Disallow usage of isMounted
react/no-multi-comp 4 React, BestPractices, JavaScript, TypeScript Disallow multiple component definition per file
react/no-namespace 2 React, ErrorProne, JavaScript, TypeScript Enforce that namespaces are not used in React elements
react/no-object-type-as-default-prop 3 React, Performance, JavaScript, TypeScript Disallow usage of referential-type variables as default param in functional component
react/no-redundant-should-component-update 4 React, BestPractices, JavaScript, TypeScript Disallow usage of shouldComponentUpdate when extending React.PureComponent
react/no-render-return-value 3 Recommended, React, BestPractices, JavaScript, TypeScript Disallow usage of the return value of ReactDOM.render
react/no-set-state 4 React, Design, JavaScript, TypeScript Disallow usage of setState
react/no-string-refs 4 Recommended, React, BestPractices, JavaScript, TypeScript Disallow using string references
react/no-this-in-sfc 3 React, ErrorProne, JavaScript, TypeScript Disallow this from being used in stateless functional components
react/no-typos 3 React, ErrorProne, JavaScript, TypeScript Disallow common typos
react/no-unescaped-entities 3 Recommended, React, ErrorProne, JavaScript, TypeScript Disallow unescaped HTML entities from appearing in markup
react/no-unknown-property 3 Recommended, React, ErrorProne, JavaScript, TypeScript, Fixable Disallow usage of unknown DOM property
react/no-unsafe 3 React, ErrorProne, JavaScript, TypeScript Disallow usage of unsafe lifecycle methods
react/no-unstable-nested-components 4 React, ErrorProne, JavaScript, TypeScript Disallow creating unstable components inside components
react/no-unused-class-component-methods 4 React, Design, JavaScript, TypeScript Disallow declaring unused methods of component class
react/no-unused-prop-types 4 React, Design, JavaScript, TypeScript Disallow definitions of unused propTypes
react/no-unused-state 4 React, Design, JavaScript, TypeScript Disallow definitions of unused state
react/no-will-update-set-state 3 React, Design, JavaScript, TypeScript Disallow usage of setState in componentWillUpdate
react/prefer-es6-class 3 React, BestPractices, JavaScript, TypeScript Enforce ES5 or ES6 class for React Components
react/prefer-exact-props 3 React, ErrorProne, JavaScript, TypeScript Prefer exact proptype definitions
react/prefer-read-only-props 3 React, BestPractices, JavaScript, TypeScript, Fixable Enforce that props are read-only
react/prefer-stateless-function 4 React, BestPractices, JavaScript, TypeScript Enforce stateless components to be written as a pure function
react/prop-types 3 Recommended, React, BestPractices, JavaScript, TypeScript Disallow missing props validation in a React component definition
react/require-default-props 3 React, Design, JavaScript, TypeScript Enforce a defaultProps definition for every prop that is not a required prop
react/require-optimization 3 React, Performance, JavaScript, TypeScript Enforce React components to have a shouldComponentUpdate method
react/require-render-return 2 Recommended, React, ErrorProne, JavaScript, TypeScript Enforce ES5 or ES6 class for returning value in render function
react/self-closing-comp 4 React, CodeStyle, JavaScript, TypeScript, Fixable Disallow extra closing tags for components without children
react/sort-comp 4 React, CodeStyle, JavaScript, TypeScript Enforce component methods order
react/sort-default-props 4 React, CodeStyle, JavaScript, TypeScript Enforce defaultProps declarations alphabetical sorting
react/sort-prop-types 4 React, CodeStyle, JavaScript, TypeScript, Fixable Enforce propTypes declarations alphabetical sorting
react/state-in-constructor 4 React, CodeStyle, JavaScript, TypeScript Enforce class component state initialization style
react/static-property-placement 4 React, Design, JavaScript, TypeScript Enforces where React component static properties should be positioned.
react/style-prop-object 4 React, BestPractices, JavaScript, TypeScript Enforce style prop value is an object
react/void-dom-elements-no-children 3 React, ErrorProne, JavaScript, TypeScript Disallow void DOM elements (e.g. <img />, <br />) from receiving children
require-atomic-updates 2 ErrorProne, JavaScript, TypeScript Disallow assignments that can lead to race conditions due to usage of await or yield
require-await 3 BestPractices, JavaScript Disallow async functions which have no await expression
require-unicode-regexp 3 BestPractices, JavaScript, TypeScript Enforce the use of u or v flag on regular expressions
require-yield 3 Recommended, BestPractices, JavaScript, TypeScript Require generator functions to contain yield
sort-imports 3 BestPractices, JavaScript, TypeScript, Fixable Enforce sorted import declarations within modules
sort-keys 3 BestPractices, JavaScript, TypeScript Require object keys to be sorted
sort-vars 3 BestPractices, JavaScript, TypeScript, Fixable Require variables within the same declaration block to be sorted
strict 3 BestPractices, JavaScript, TypeScript, Fixable Require or disallow strict mode directives
symbol-description 3 BestPractices, JavaScript, TypeScript Require symbol descriptions
unicode-bom 4 CodeStyle, JavaScript, TypeScript, Fixable Require or disallow Unicode byte order mark (BOM)
use-isnan 2 Recommended, ErrorProne, JavaScript, TypeScript Require calls to isNaN() when checking for NaN
valid-typeof 2 Recommended, ErrorProne, JavaScript, TypeScript Enforce comparing typeof expressions against valid strings
vars-on-top 3 BestPractices, JavaScript, TypeScript Require var declarations be placed at the top of their containing scope
yoda 3 BestPractices, JavaScript, TypeScript, Fixable Require or disallow "Yoda" conditions

RetireJS

Rule Severity Tags What it reports
LibraryWithKnownCriticalSeverityVulnerability 1 Recommended, Security, JavaScript Identifies JavaScript libraries with known vulnerabilities of critical severity.
LibraryWithKnownHighSeverityVulnerability 2 Recommended, Security, JavaScript Identifies JavaScript libraries with known vulnerabilities of high severity.
LibraryWithKnownLowSeverityVulnerability 4 Recommended, Security, JavaScript Identifies JavaScript libraries with known vulnerabilities of low severity.
LibraryWithKnownMediumSeverityVulnerability 3 Recommended, Security, JavaScript Identifies JavaScript libraries with known vulnerabilities of medium severity.

Flow

Rule Severity Tags What it reports
CyclicSubflow 1 Recommended, Performance, XML This rule detects when a subflow calls a parent flow, creating a cyclic flow. The rule will detect cycles of any depth.
DbInLoop 2 Recommended, Performance, XML This rule detects when there are CRUD flow elements within a loop (RecordLookups, RecordCreates, RecordUpdates, RecordDeletes). This rule does not trigger if the CRUD element is in a fault handler. These DB operations should be bulkified by using collections and the "IN" condition. This rule does not follow subflows.
DefaultCopy 3 Recommended, CodeStyle, XML This rule detects default names and labels that were auto assigned to elements pasted elements in the flow builder UI. These labels and names should be changed to make the flow comprehensible to maintainers.
HardcodedId 3 Recommended, BestPractices, XML This rule detects hardcoded IDs within a flow. Hardcoded Ids are a bad practice, and such flows are not appropriate for distribution.
MissingDescription 4 CodeStyle, XML This rule detects elements that contain labels but are missing descriptions. All elements with labels should have accompanying descriptions to make theflow comprehensible to future maintainers.
MissingFaultHandler 2 BestPractices, XML This rule detects when elements that can fire fault events are missingfault handlers. The rule currently detects Create Records, Update Records, Delete Records, Action Calls, and Subflows.
MissingNextValueConnector 1 Recommended, BestPractices, XML This rule detects Loops without nextValue connectors. Loops should always have nextValue connectors, and lack of one usually signifies developer error when connecting the loop element to other elements.
PreventPassingUserDataIntoElementWithoutSharing 2 Recommended, Security, XML Avoid passing user data into Flow Scanner elements in run mode: Without Sharing
PreventPassingUserDataIntoElementWithSharing 4 Recommended, Security, XML Avoid passing user data into Flow Scanner elements in run mode: With Sharing
SameRecordUpdate 3 Recommended, Security, XML This rule detects when an AfterSave record trigger modifies the same record. Record modifications should be done in BeforeSave triggers, not AfterSave triggers. This rule follows subflows, so it will detect if the RecordId is passed to a child flow which then modifies a record with that id.
TriggerCallout 2 Recommended, Performance, XML This rule detects when a trigger performs a callout on the synchronous path. Triggers must be performant and may only contain callouts on async scheduled paths. This rule follows subflows.
TriggerEntryCriteria 2 Recommended, Performance, XML This rule detects when record trigger flows are missing entry criteria. All record trigger flows should have entry criteria specified in the flow trigger definition rather than solely in the flow's own business logic.
TriggerWaitEvent 2 Recommended, Performance, XML This rule detects when a wait event is reached during trigger execution. Triggers must be performant and cannot contain wait events. For async processing, use scheduled paths within your trigger and async callouts, not wait events. This rule follows subflows.
UnreachableElement 4 BestPractices, XML This rule identifies elements that have not been connected to the start element of the flow. Unreachable elements are usually due to incomplete flows or developer error.
UnusedResource 3 BestPractices, XML This rule detects redundant variables that are not used in the flow. This can be a sign of developer error.

CPD

Rule Severity Tags What it reports
DetectCopyPasteForApex 5 Recommended, Design, Apex Identify duplicate code blocks within your workspace files associated with the 'apex' language.
DetectCopyPasteForHtml 5 Design, Html Identify duplicate code blocks within your workspace files associated with the 'html' language.
DetectCopyPasteForJavascript 5 Recommended, Design, Javascript Identify duplicate code blocks within your workspace files associated with the 'javascript' language.
DetectCopyPasteForTypescript 5 Recommended, Design, Typescript Identify duplicate code blocks within your workspace files associated with the 'typescript' language.
DetectCopyPasteForVisualforce 5 Recommended, Design, Visualforce Identify duplicate code blocks within your workspace files associated with the 'visualforce' language.
DetectCopyPasteForXml 5 Design, Xml Identify duplicate code blocks within your workspace files associated with the 'xml' language.

Regex

Rule Severity Tags What it reports
AvoidGetHeapSizeInLoop 2 Recommended, Performance, Apex Detects usage of Limits.getHeapSize() in loops
AvoidOldSalesforceApiVersions 2 Recommended, Security, XML Detects usages of Salesforce API versions that are 3 or more years old.
AvoidTermsWithImplicitBias 5 Recommended, BestPractices "Detects usage of terms that reinforce implicit bias.
MinVersionForAbstractVirtualClassesWithPrivateMethod 2 Recommended, BestPractices, Apex Detects private methods within abstract/virtual classes when the corresponding API version of the class is less than v61.0.
NoMixedIndentation 3 Recommended, CodeStyle, Apex Identifies lines with both spaces and tabs in the leading indentation. Mixed indentation causes unexpected behavior in multiline strings because the indentation algorithm processes whitespace differently.
NoTrailingWhitespace 5 Recommended, CodeStyle, Apex Detects trailing whitespace (tabs or spaces) at the end of lines of code and lines that are only whitespace.

SFGE

Rule Severity Tags What it reports
ApexFlsViolation 2 DevPreview, Security, Apex This rule is in "Developer Preview" and is subject to change. Identifies data read/write operations that may not have CRUD/FLS
ApexNullPointerException 3 DevPreview, ErrorProne, Apex This rule is in "Developer Preview" and is subject to change. Identifies Apex operations that dereference null objects and throw NullPointerExceptions.
AvoidDatabaseOperationInLoop 2 DevPreview, Performance, Apex This rule is in "Developer Preview" and is subject to change. Detects database operations inside loops, which can cause degraded performance.
AvoidMultipleMassSchemaLookups 2 DevPreview, Performance, Apex This rule is in "Developer Preview" and is subject to change. Detects mass schema lookups that can cause performance degradation if made more than once in a path. These methods are: Schema.getGlobalDescribe() and Schema.describeSObjects(...). Flagged lookups include those within a loop or multiple invocations in a path.
DatabaseOperationsMustUseWithSharing 2 DevPreview, Security, Apex This rule is in "Developer Preview" and is subject to change. Identifies a database operation executed outside of a "with sharing" policy. Warns when DML or SOQL operations inherit sharing rules implicitly instead of explicitly.
MissingNullCheckOnSoqlVariable 3 DevPreview, Performance, Apex This rule is in "Developer Preview" and is subject to change. Identifies SOQL queries with variables in WHERE clauses that lack null checks.
UnimplementedType 4 DevPreview, Performance, Apex This rule is in "Developer Preview" and is subject to change. Identifies abstract classes and interfaces that are non-global and don't have implementations or extensions.

ApexGuru

Rule Severity Tags What it reports
apexguru-other 3 apex-guru Other ApexGuru rules - covers new rules added by Salesforce that are not yet explicitly declared
BusyLoopDelay 4 apex-guru Using empty loops to delay execution wastes CPU time - use System.enqueueJob with delay parameter
CopyingListOrSetElementsUsingAForLoop 3 apex-guru Copying list or set elements using a for loop is inefficient - use addAll() instead
DmlInALoop 2 apex-guru DML statement inside a loop causes performance issues and can hit governor limits
ExpensiveDebugStatements 4 apex-guru Expensive System.debug() statements add runtime overhead
ExpensiveMethods 2 apex-guru Method accounts for a large share of observed Apex CPU time and is a hotspot for performance work
ExpensiveStringComparison 4 apex-guru Inefficient string comparison wastes CPU time
LimitsGetHeapsizeMethods 4 apex-guru Frequent Limits.getHeapSize() calls add runtime overhead
Redundant Soql 3 apex-guru Multiple identical SOQL queries cause unnecessary database round trips
SchemaGetGlobalDescribeNotEfficient 2 apex-guru Using Schema.getGlobalDescribe() causes unnecessary overhead and decreases performance
SObjectMapInAForLoop 3 apex-guru Building Map using .put() in a for loop is inefficient - use map constructor or putAll()
Soql Aggregation 3 apex-guru Manual aggregation in Apex instead of using SOQL aggregate functions causes performance issues
SoqlInALoop 2 apex-guru SOQL query inside a loop causes performance issues and can hit governor limits
SoqlInALoopOneHop 3 apex-guru SOQL query reached one method-hop away inside a loop causes performance issues and can hit governor limits
SoqlWithApexFilter 3 apex-guru Filtering records in Apex instead of using SOQL WHERE clause causes performance issues
SoqlWithNegativeExpressions 4 apex-guru SOQL queries using negative expressions (NOT IN, !=) don't use indexes and cause full table scans
SoqlWithoutAWhereClauseOrLimitStatement 4 apex-guru SOQL query without WHERE clause or LIMIT statement can cause performance issues and heap size exceptions
SoqlWithoutPlatformCache 2 apex-guru Frequently executed SOQL query whose results could be served from Platform Cache to reduce database load
SoqlWithUnusedFields 4 apex-guru SOQL query selecting unused fields increases resource consumption unnecessarily
SoqlWithWildcardFilter 4 apex-guru SOQL query using LIKE with leading wildcard is inefficient and cannot use indexes
SortingInApex 4 apex-guru Sorting records in Apex wastes CPU time and can exceed governor limits - use ORDER BY in SOQL
UsingTheTestMethodKeyword 4 apex-guru The testMethod keyword is deprecated - use @isTest annotation instead
WritingFillerStatements 4 apex-guru Filler statements written to inflate code coverage instead of testing real behavior

UIBundle

Rule Severity Tags What it reports
coverage-analysis 5 UIBundle, UIBundleIntegrity Character-level coverage analysis (informational). Flags per-line unmapped regions of 50+ chars and raises a cumulative finding when more than 5% of the compiled file (line-1 preamble discounted up to 2000 chars) has no sourcemap coverage.
invalid-source-references 2 UIBundle, UIBundleIntegrity Every file referenced by a sourcemap sources[] entry (that doesn't have inline sourcesContent) must exist on disk. Missing files indicate tampering or an incomplete submission.
missing-sourcemap 2 UIBundle, UIBundleIntegrity Every compiled .js file in the build output must have a corresponding sourcemap (co-located .js.map or //# sourceMappingURL). Missing sourcemaps prevent source-to-compiled verification during security review.
path-leakage 3 UIBundle, UIBundleIntegrity Sourcemap sources[] entries must be relative paths. Absolute paths leak developer environment details (usernames, filesystem layout) into shipped artifacts.
source-content-verification 2 UIBundle, UIBundleIntegrity AST-based verification that the compiled JS actually traces back to the submitted source. Parses compiled output with @babel/parser, collects significant AST nodes, and checks each has a sourcemap mapping into a source file present on disk. Also enforces byte-equal sourcesContent, a virtual-source ratio cap, an AST type-mismatch threshold, and flags dangerous API patterns in unmapped regions.
structural-coherence 5 UIBundle, UIBundleIntegrity Structural coherence checks on sourcemap tokens (informational). Flags out-of-bounds mappings, sample-based whitespace/comment-only mappings above 80%, and cross-file jump ratios above 50% on consecutive same-line tokens.
token-consistency 5 UIBundle, UIBundleIntegrity Token-type consistency checks on sampled sourcemap tokens (informational). Every 20th mapping is compared between compiled and source positions; verifies names[] entries exist near the claimed source position (±3 col tolerance); flags scores below 85% (warning) and below 70% (suspicious).
vlq-integrity 2 UIBundle, UIBundleIntegrity Sourcemap "mappings" field must be valid Base64 VLQ and reference in-range source/name indices. Malformed mappings signal a fabricated or corrupted sourcemap.