UNPKG

eslint-plugin-sonarjs

Version:
197 lines (192 loc) β€’ 92.9 kB
# eslint-plugin-sonarjs [![npm version](https://badge.fury.io/js/eslint-plugin-sonarjs.svg)](https://badge.fury.io/js/eslint-plugin-sonarjs) SonarJS rules for ESLint to help developers produce [Clean Code](https://www.sonarsource.com/solutions/clean-code/) by detecting bugs and suspicious patterns. ## Rules <!-- begin auto-generated rules list --> πŸ’Ό Configurations enabled in.\ 🚫 Configurations disabled in.\ βœ… Set in the `recommended` configuration.\ πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\ πŸ’‘ Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\ πŸ’­ Requires [type information](https://typescript-eslint.io/linting/typed-linting).\ ❌ Deprecated. | NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | 🚫 | πŸ”§ | πŸ’‘ | πŸ’­ | ❌ | | :------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------- | :-- | :-- | :-- | :-- | :-- | :-- | | [accessor-pairs](https://sonarsource.github.io/rspec/#/rspec/S2376/javascript) | Property getters and setters should come in pairs | | βœ… | | | | | | [alt-text](https://sonarsource.github.io/rspec/#/rspec/S1077/javascript) | Image, area, button with image and object elements should have an alternative text | βœ… | | | | | | | [anchor-has-content](https://sonarsource.github.io/rspec/#/rspec/S6827/javascript) | Anchors should contain accessible content | βœ… | | | πŸ’‘ | | | | [anchor-is-valid](https://sonarsource.github.io/rspec/#/rspec/S6844/javascript) | Anchor tags should not be used as buttons | βœ… | | | | | | | [anchor-precedence](https://sonarsource.github.io/rspec/#/rspec/S5850/javascript) | Alternatives in regular expressions should be grouped when used with anchors | βœ… | | | | πŸ’­ | | | [argument-type](https://sonarsource.github.io/rspec/#/rspec/S3782/javascript) | Arguments to built-in functions should match documented types | βœ… | | | | πŸ’­ | | | [arguments-order](https://sonarsource.github.io/rspec/#/rspec/S2234/javascript) | Parameters should be passed in the correct order | βœ… | | | | πŸ’­ | | | [arguments-usage](https://sonarsource.github.io/rspec/#/rspec/S3513/javascript) | "arguments" should not be accessed directly | | βœ… | | | | | | [array-callback-without-return](https://sonarsource.github.io/rspec/#/rspec/S3796/javascript) | Callbacks of array methods should have return statements | βœ… | | | | πŸ’­ | | | [array-constructor](https://sonarsource.github.io/rspec/#/rspec/S1528/javascript) | Array constructors should not be used | | βœ… | πŸ”§ | πŸ’‘ | | | | [arrow-function-convention](https://sonarsource.github.io/rspec/#/rspec/S3524/javascript) | Braces and parentheses should be used consistently with arrow functions | | βœ… | | | | | | [assertions-in-tests](https://sonarsource.github.io/rspec/#/rspec/S2699/javascript) | Tests should include assertions | βœ… | | | | | | | [aws-apigateway-public-api](https://sonarsource.github.io/rspec/#/rspec/S6333/javascript) | Creating public APIs is security-sensitive | βœ… | | | | | | | [aws-ec2-rds-dms-public](https://sonarsource.github.io/rspec/#/rspec/S6329/javascript) | Allowing public network access to cloud resources is security-sensitive | βœ… | | | | | | | [aws-ec2-unencrypted-ebs-volume](https://sonarsource.github.io/rspec/#/rspec/S6275/javascript) | Using unencrypted EBS volumes is security-sensitive | βœ… | | | | | | | [aws-efs-unencrypted](https://sonarsource.github.io/rspec/#/rspec/S6332/javascript) | Using unencrypted EFS file systems is security-sensitive | βœ… | | | | | | | [aws-iam-all-privileges](https://sonarsource.github.io/rspec/#/rspec/S6302/javascript) | Policies granting all privileges are security-sensitive | βœ… | | | | | | | [aws-iam-all-resources-accessible](https://sonarsource.github.io/rspec/#/rspec/S6304/javascript) | Policies granting access to all resources of an account are security-sensitive | | βœ… | | | | | | [aws-iam-privilege-escalation](https://sonarsource.github.io/rspec/#/rspec/S6317/javascript) | AWS IAM policies should limit the scope of permissions given | βœ… | | | | | | | [aws-iam-public-access](https://sonarsource.github.io/rspec/#/rspec/S6270/javascript) | Policies authorizing public access to resources are security-sensitive | βœ… | | | | | | | [aws-opensearchservice-domain](https://sonarsource.github.io/rspec/#/rspec/S6308/javascript) | Using unencrypted Elasticsearch domains is security-sensitive | βœ… | | | | | | | [aws-rds-unencrypted-databases](https://sonarsource.github.io/rspec/#/rspec/S6303/javascript) | Using unencrypted RDS DB resources is security-sensitive | βœ… | | | | | | | [aws-restricted-ip-admin-access](https://sonarsource.github.io/rspec/#/rspec/S6321/javascript) | Administration services access should be restricted to specific IP addresses | βœ… | | | | | | | [aws-s3-bucket-granted-access](https://sonarsource.github.io/rspec/#/rspec/S6265/javascript) | Granting access to S3 buckets to all or authenticated users is security-sensitive | βœ… | | | | | | | [aws-s3-bucket-insecure-http](https://sonarsource.github.io/rspec/#/rspec/S6249/javascript) | Authorizing HTTP communications with S3 buckets is security-sensitive | βœ… | | | | | | | [aws-s3-bucket-public-access](https://sonarsource.github.io/rspec/#/rspec/S6281/javascript) | Allowing public ACLs or policies on a S3 bucket is security-sensitive | βœ… | | | | | | | [aws-s3-bucket-server-encryption](https://sonarsource.github.io/rspec/#/rspec/S6245/javascript) | Disabling server-side encryption of S3 buckets is security-sensitive | | βœ… | | | | ❌ | | [aws-s3-bucket-versioning](https://sonarsource.github.io/rspec/#/rspec/S6252/javascript) | Disabling versioning of S3 buckets is security-sensitive | βœ… | | | | | | | [aws-sagemaker-unencrypted-notebook](https://sonarsource.github.io/rspec/#/rspec/S6319/javascript) | Using unencrypted SageMaker notebook instances is security-sensitive | βœ… | | | | | | | [aws-sns-unencrypted-topics](https://sonarsource.github.io/rspec/#/rspec/S6327/javascript) | Using unencrypted SNS topics is security-sensitive | βœ… | | | | | | | [aws-sqs-unencrypted-queue](https://sonarsource.github.io/rspec/#/rspec/S6330/javascript) | Using unencrypted SQS queues is security-sensitive | βœ… | | | | | | | [bitwise-operators](https://sonarsource.github.io/rspec/#/rspec/S1529/javascript) | Bitwise operators should not be used in boolean contexts | βœ… | | | | | | | [bool-param-default](https://sonarsource.github.io/rspec/#/rspec/S4798/javascript) | Optional boolean parameters should have default value | | βœ… | | | | | | [brace-style](https://sonarsource.github.io/rspec/#/rspec/S1105/javascript) | An open curly brace should be located at the end of a line | | βœ… | πŸ”§ | | | ❌ | | [call-argument-line](https://sonarsource.github.io/rspec/#/rspec/S1472/javascript) | Function call arguments should not start on new lines | βœ… | | | | | | | [certificate-transparency](https://sonarsource.github.io/rspec/#/rspec/S5742/javascript) | Disabling Certificate Transparency monitoring is security-sensitive | βœ… | | | | | | | [chai-determinate-assertion](https://sonarsource.github.io/rspec/#/rspec/S6092/javascript) | Chai assertions should have only one reason to succeed | βœ… | | | | | | | [class-name](https://sonarsource.github.io/rspec/#/rspec/S101/javascript) | Class names should comply with a naming convention | βœ… | | | | | | | [class-prototype](https://sonarsource.github.io/rspec/#/rspec/S3525/javascript) | Class methods should be used instead of "prototype" assignments | | βœ… | | | πŸ’­ | | | [code-eval](https://sonarsource.github.io/rspec/#/rspec/S1523/javascript) | Dynamically executing code is security-sensitive | βœ… | | | | | | | [cognitive-complexity](https://sonarsource.github.io/rspec/#/rspec/S3776/javascript) | Cognitive Complexity of functions should not be too high | βœ… | | | | | | | [comma-or-logical-or-case](https://sonarsource.github.io/rspec/#/rspec/S3616/javascript) | Comma and logical OR operators should not be used in switch cases | βœ… | | | | | | | [comment-regex](https://sonarsource.github.io/rspec/#/rspec/S124/javascript) | Track comments matching a regular expression | | βœ… | | | | | | [concise-regex](https://sonarsource.github.io/rspec/#/rspec/S6353/javascript) | Regular expression quantifiers and character classes should be used concisely | βœ… | | | | πŸ’­ | | | [conditional-indentation](https://sonarsource.github.io/rspec/#/rspec/S3973/javascript) | A conditionally executed single line should be denoted by indentation | | βœ… | | | | ❌ | | [confidential-information-logging](https://sonarsource.github.io/rspec/#/rspec/S5757/javascript) | Allowing confidential information to be logged is security-sensitive | βœ… | | | | | | | [constructor-for-side-effects](https://sonarsource.github.io/rspec/#/rspec/S1848/javascript) | Objects should not be created to be dropped immediately without being used | βœ… | | | | | | | [content-length](https://sonarsource.github.io/rspec/#/rspec/S5693/javascript) | Allowing requests with excessive content length is security-sensitive | βœ… | | | | | | | [content-security-policy](https://sonarsource.github.io/rspec/#/rspec/S5728/javascript) | Disabling content security policy fetch directives is security-sensitive | βœ… | | | | | | | [cookie-no-httponly](https://sonarsource.github.io/rspec/#/rspec/S3330/javascript) | Creating cookies without the "HttpOnly" flag is security-sensitive | βœ… | | | | | | | [cookies](https://sonarsource.github.io/rspec/#/rspec/S2255/javascript) | Writing cookies is security-sensitive | | βœ… | | | | ❌ | | [cors](https://sonarsource.github.io/rspec/#/rspec/S5122/javascript) | Having a permissive Cross-Origin Resource Sharing policy is security-sensitive | βœ… | | | | | | | [csrf](https://sonarsource.github.io/rspec/#/rspec/S4502/javascript) | Disabling CSRF protections is security-sensitive | βœ… | | | | | | | [cyclomatic-complexity](https://sonarsource.github.io/rspec/#/rspec/S1541/javascript) | Cyclomatic Complexity of functions should not be too high | | βœ… | | | | | | [declarations-in-global-scope](https://sonarsource.github.io/rspec/#/rspec/S3798/javascript) | Variables and functions should not be declared in the global scope | | βœ… | | | | | | [default-param-last](https://sonarsource.github.io/rspec/#/rspec/S1788/javascript) | Function parameters with default values should be last | βœ… | | | | | | | [deprecation](https://sonarsource.github.io/rspec/#/rspec/S1874/javascript) | Deprecated APIs should not be used | βœ… | | | | πŸ’­ | | | [destructuring-assignment-syntax](https://sonarsource.github.io/rspec/#/rspec/S3514/javascript) | Destructuring syntax should be used for assignments | | βœ… | | | | | | [different-types-comparison](https://sonarsource.github.io/rspec/#/rspec/S3403/javascript) | Strict equality operators should not be used with dissimilar types | βœ… | | πŸ”§ | πŸ’‘ | πŸ’­ | | | [disabled-auto-escaping](https://sonarsource.github.io/rspec/#/rspec/S5247/javascript) | Disabling auto-escaping in template engines is security-sensitive | βœ… | | | | πŸ’­ | | | [disabled-resource-integrity](https://sonarsource.github.io/rspec/#/rspec/S5725/javascript) | Using remote artifacts without integrity checks is security-sensitive | βœ… | | | | πŸ’­ | | | [disabled-timeout](https://sonarsource.github.io/rspec/#/rspec/S6080/javascript) | Disabling Mocha timeouts should be explicit | βœ… | | | | | | | [dns-prefetching](https://sonarsource.github.io/rspec/#/rspec/S5743/javascript) | Allowing browsers to perform DNS prefetching is security-sensitive | | βœ… | | | | ❌ | | [duplicates-in-character-class](https://sonarsource.github.io/rspec/#/rspec/S5869/javascript) | Character classes in regular expressions should not contain the same character twice | βœ… | | | | πŸ’­ | | | [elseif-without-else](https://sonarsource.github.io/rspec/#/rspec/S126/javascript) | "if ... else if" constructs should end with "else" clauses | | βœ… | | | | | | [empty-string-repetition](https://sonarsource.github.io/rspec/#/rspec/S5842/javascript) | Repeated patterns in regular expressions should not match the empty string | βœ… | | | | πŸ’­ | | | [encryption](https://sonarsource.github.io/rspec/#/rspec/S4787/javascript) | Encrypting data is security-sensitive | | βœ… | | | | ❌ | | [encryption-secure-mode](https://sonarsource.github.io/rspec/#/rspec/S5542/javascript) | Encryption algorithms should be used with secure mode and padding scheme | βœ… | | | | | | | [enforce-trailing-comma](https://sonarsource.github.io/rspec/#/rspec/S3723/javascript) | Trailing commas should be used | | βœ… | πŸ”§ | | | ❌ | | [existing-groups](https://sonarsource.github.io/rspec/#/rspec/S6328/javascript) | Replacement strings should reference existing regular expression groups | βœ… | | | | πŸ’­ | | | [expression-complexity](https://sonarsource.github.io/rspec/#/rspec/S1067/javascript) | Expressions should not be too complex | | βœ… | | | | | | [file-header](https://sonarsource.github.io/rspec/#/rspec/S1451/javascript) | Track lack of copyright and license headers | | βœ… | | | | | | [file-name-differ-from-class](https://sonarsource.github.io/rspec/#/rspec/S3317/javascript) | Default export names and file names should match | | βœ… | | | | | | [file-permissions](https://sonarsource.github.io/rspec/#/rspec/S2612/javascript) | Setting loose POSIX file permissions is security-sensitive | βœ… | | | | | | | [file-uploads](https://sonarsource.github.io/rspec/#/rspec/S2598/javascript) | File uploads should be restricted | βœ… | | | | | | | [fixme-tag](https://sonarsource.github.io/rspec/#/rspec/S1134/javascript) | Track uses of "FIXME" tags | βœ… | | | | | | | [for-in](https://sonarsource.github.io/rspec/#/rspec/S1535/javascript) | "for...in" loops should filter properties before acting on them | | βœ… | | | | | | [for-loop-increment-sign](https://sonarsource.github.io/rspec/#/rspec/S2251/javascript) | A "for" loop update clause should move the counter in the right direction | βœ… | | | | | | | [frame-ancestors](https://sonarsource.github.io/rspec/#/rspec/S5732/javascript) | Disabling content security policy frame-ancestors directive is security-sensitive | βœ… | | | | | | | [function-inside-loop](https://sonarsource.github.io/rspec/#/rspec/S1515/javascript) | Functions should not be defined inside loops | βœ… | | | | | | | [function-name](https://sonarsource.github.io/rspec/#/rspec/S100/javascript) | Function and method names should comply with a naming convention | | βœ… | | | | | | [function-return-type](https://sonarsource.github.io/rspec/#/rspec/S3800/javascript) | Functions should always return the same type | βœ… | | | | πŸ’­ | | | [future-reserved-words](https://sonarsource.github.io/rspec/#/rspec/S1527/javascript) | Future reserved words should not be used as identifiers | βœ… | | | | | | | [generator-without-yield](https://sonarsource.github.io/rspec/#/rspec/S3531/javascript) | Generators should explicitly "yield" a value | βœ… | | | | | | | [hashing](https://sonarsource.github.io/rspec/#/rspec/S4790/javascript) | Using weak hashing algorithms is security-sensitive | βœ… | | | | | | | [hidden-files](https://sonarsource.github.io/rspec/#/rspec/S5691/javascript) | Statically serving hidden files is security-sensitive | βœ… | | | | | | | [hook-use-state](https://sonarsource.github.io/rspec/#/rspec/S6754/javascript) | The return value of "useState" should be destructured and named symmetrically | βœ… | | πŸ”§ | πŸ’‘ | | | | [html-has-lang](https://sonarsource.github.io/rspec/#/rspec/S5254/javascript) | HTML elements should have a valid language attribute | βœ… | | | πŸ’‘ | | | | [in-operator-type-error](https://sonarsource.github.io/rspec/#/rspec/S3785/javascript) | "in" should not be used with primitive types | βœ… | | | | πŸ’­ | | | [inconsistent-function-call](https://sonarsource.github.io/rspec/#/rspec/S3686/javascript) | Functions should be called consistently with or without "new" | βœ… | | | | | | | [index-of-compare-to-positive-number](https://sonarsource.github.io/rspec/#/rspec/S2692/javascript) | "indexOf" checks should not be for positive numbers | βœ… | | | | πŸ’­ | | | [insecure-cookie](https://sonarsource.github.io/rspec/#/rspec/S2092/javascript) | Creating cookies without the "secure" flag is security-sensitive | βœ… | | | | | | | [insecure-jwt-token](https://sonarsource.github.io/rspec/#/rspec/S5659/javascript) | JWT should be signed and verified with strong cipher algorithms | βœ… | | | | | | | [inverted-assertion-arguments](https://sonarsource.github.io/rspec/#/rspec/S3415/javascript) | Assertion arguments should be passed in the correct order | βœ… | | πŸ”§ | πŸ’‘ | | | | [jsx-key](https://sonarsource.github.io/rspec/#/rspec/S6477/javascript) | JSX list components should have a key property | βœ… | | | | | | | [jsx-no-constructed-context-values](https://sonarsource.github.io/rspec/#/rspec/S6481/javascript) | React Context Provider values should have stable identities | βœ… | | | | | | | [jsx-no-useless-fragment](https://sonarsource.github.io/rspec/#/rspec/S6749/javascript) | Redundant React fragments should be removed | βœ… | | πŸ”§ | πŸ’‘ | | | | [label-has-associated-control](https://sonarsource.github.io/rspec/#/rspec/S6853/javascript) | Label elements should have a text label and an associated control | βœ… | | | | | | | [label-position](https://sonarsource.github.io/rspec/#/rspec/S1439/javascript) | Only "while", "do", "for" and "switch" statements should be labelled | βœ… | | | | | | | [link-with-target-blank](https://sonarsource.github.io/rspec/#/rspec/S5148/javascript) | Authorizing an opened window to access back to the originating window is security-sensitive | βœ… | | | | | | | [max-switch-cases](https://sonarsource.github.io/rspec/#/rspec/S1479/javascript) | "switch" statements should not have too many "case" clauses | βœ… | | | | | | | [max-union-size](https://sonarsource.github.io/rspec/#/rspec/S4622/javascript) | Union types should not have too many elements | | βœ… | | | | | | [media-has-caption](https://sonarsource.github.io/rspec/#/rspec/S4084/javascript) | Media elements should have captions | βœ… | | | | | | | [misplaced-loop-counter](https://sonarsource.github.io/rspec/#/rspec/S1994/javascript) | "for" loop increment clauses should modify the loops' counters | βœ… | | | | | | | [mouse-events-a11y](https://sonarsource.github.io/rspec/#/rspec/S1082/javascript) | Mouse events should have corresponding keyboard events | βœ… | | | πŸ’‘ | | | | [nested-control-flow](https://sonarsource.github.io/rspec/#/rspec/S134/javascript) | Control flow statements "if", "for", "while", "switch" and "try" should not be nested too deeply | | βœ… | | | | | | [new-cap](https://sonarsource.github.io/rspec/#/rspec/S2430/javascript) | Constructor names should start with an upper case letter | βœ… | | | | | | | [new-operator-misuse](https://sonarsource.github.io/rspec/#/rspec/S2999/javascript) | "new" should only be used with functions and classes | βœ… | | | | πŸ’­ | | | [no-accessor-field-mismatch](https://sonarsource.github.io/rspec/#/rspec/S4275/javascript) | Getters and setters should access the expected fields | βœ… | | | | | | | [no-all-duplicated-branches](https://sonarsource.github.io/rspec/#/rspec/S3923/javascript) | All branches in a conditional structure should not have exactly the same implementation | βœ… | | | | | | | [no-alphabetical-sort](https://sonarsource.github.io/rspec/#/rspec/S2871/javascript) | "Array.prototype.sort()" and "Array.prototype.toSorted()" should use a compare function | βœ… | | πŸ”§ | πŸ’‘ | πŸ’­ | | | [no-angular-bypass-sanitization](https://sonarsource.github.io/rspec/#/rspec/S6268/javascript) | Disabling Angular built-in sanitization is security-sensitive | βœ… | | | | | | | [no-array-delete](https://sonarsource.github.io/rspec/#/rspec/S2870/javascript) | "delete" should not be used on arrays | βœ… | | | | πŸ’­ | | | [no-array-index-key](https://sonarsource.github.io/rspec/#/rspec/S6479/javascript) | JSX list components should not use array indexes as key | βœ… | | | | | | | [no-associative-arrays](https://sonarsource.github.io/rspec/#/rspec/S3579/javascript) | Array indexes should be numeric | βœ… | | | | πŸ’­ | | | [no-base-to-string](https://sonarsource.github.io/rspec/#/rspec/S6551/javascript) | Objects and classes converted or coerced to strings should define a "toString()" method | βœ… | | | | πŸ’­ | | | [no-built-in-override](https://sonarsource.github.io/rspec/#/rspec/S2424/javascript) | Built-in objects should not be overridden | | βœ… | | | | | | [no-case-label-in-switch](https://sonarsource.github.io/rspec/#/rspec/S1219/javascript) | "switch" statements should not contain non-case labels | βœ… | | | | | | | [no-clear-text-protocols](https://sonarsource.github.io/rspec/#/rspec/S5332/javascript) | Using clear-text protocols is security-sensitive | βœ… | | | | | | | [no-code-after-done](https://sonarsource.github.io/rspec/#/rspec/S6079/javascript) | Tests should not execute any code after "done()" is called | βœ… | | | | | | | [no-collapsible-if](https://sonarsource.github.io/rspec/#/rspec/S1066/javascript) | Mergeable "if" statements should be combined | | βœ… | | | | | | [no-collection-size-mischeck](https://sonarsource.github.io/rspec/#/rspec/S3981/javascript) | Collection size and array length comparisons should make sense | βœ… | | πŸ”§ | πŸ’‘ | πŸ’­ | | | [no-commented-code](https://sonarsource.github.io/rspec/#/rspec/S125/javascript) | Sections of code should not be commented out | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-dead-store](https://sonarsource.github.io/rspec/#/rspec/S1854/javascript) | Unused assignments should be removed | βœ… | | | | | | | [no-delete-var](https://sonarsource.github.io/rspec/#/rspec/S3001/javascript) | "delete" should be used only with object properties | βœ… | | | | | | | [no-deprecated-react](https://sonarsource.github.io/rspec/#/rspec/S6957/javascript) | Deprecated React APIs should not be used | βœ… | | | | | | | [no-duplicate-in-composite](https://sonarsource.github.io/rspec/#/rspec/S4621/javascript) | Union and intersection types should not include duplicated constituents | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-duplicate-string](https://sonarsource.github.io/rspec/#/rspec/S1192/javascript) | String literals should not be duplicated | | βœ… | | | | | | [no-duplicated-branches](https://sonarsource.github.io/rspec/#/rspec/S1871/javascript) | Two branches in a conditional structure should not have exactly the same implementation | βœ… | | | | | | | [no-element-overwrite](https://sonarsource.github.io/rspec/#/rspec/S4143/javascript) | Collection elements should not be replaced unconditionally | βœ… | | | | | | | [no-empty-after-reluctant](https://sonarsource.github.io/rspec/#/rspec/S6019/javascript) | Reluctant quantifiers in regular expressions should be followed by an expression that can't match the empty string | βœ… | | | | πŸ’­ | | | [no-empty-alternatives](https://sonarsource.github.io/rspec/#/rspec/S6323/javascript) | Alternation in regular expressions should not contain empty alternatives | βœ… | | | | πŸ’­ | | | [no-empty-collection](https://sonarsource.github.io/rspec/#/rspec/S4158/javascript) | Empty collections should not be accessed or iterated | βœ… | | | | | | | [no-empty-function](https://sonarsource.github.io/rspec/#/rspec/S1186/javascript) | Functions should not be empty | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-empty-group](https://sonarsource.github.io/rspec/#/rspec/S6331/javascript) | Regular expressions should not contain empty groups | βœ… | | | | πŸ’­ | | | [no-empty-interface](https://sonarsource.github.io/rspec/#/rspec/S4023/javascript) | Interfaces should not be empty | | βœ… | πŸ”§ | πŸ’‘ | | | | [no-empty-test-file](https://sonarsource.github.io/rspec/#/rspec/S2187/javascript) | Test files should contain at least one test case | βœ… | | | | | | | [no-equals-in-for-termination](https://sonarsource.github.io/rspec/#/rspec/S888/javascript) | Equality operators should not be used in "for" loop termination conditions | βœ… | | | | | | | [no-exclusive-tests](https://sonarsource.github.io/rspec/#/rspec/S6426/javascript) | Exclusive tests should not be commited to version control | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-extend-native](https://sonarsource.github.io/rspec/#/rspec/S6643/javascript) | Prototypes of builtin objects should not be modified | βœ… | | | | | | | [no-extra-arguments](https://sonarsource.github.io/rspec/#/rspec/S930/javascript) | Function calls should not pass extra arguments | βœ… | | | | | | | [no-extra-semi](https://sonarsource.github.io/rspec/#/rspec/S1116/javascript) | Extra semicolons should be removed | | βœ… | πŸ”§ | | | ❌ | | [no-find-dom-node](https://sonarsource.github.io/rspec/#/rspec/S6788/javascript) | React's "findDOMNode" should not be used | βœ… | | | | | | | [no-for-in-iterable](https://sonarsource.github.io/rspec/#/rspec/S4139/javascript) | "for in" should not be used with iterables | | βœ… | | | πŸ’­ | | | [no-function-declaration-in-block](https://sonarsource.github.io/rspec/#/rspec/S1530/javascript) | Function declarations should not be made within blocks | | βœ… | | | | | | [no-global-this](https://sonarsource.github.io/rspec/#/rspec/S2990/javascript) | The global "this" object should not be used | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-globals-shadowing](https://sonarsource.github.io/rspec/#/rspec/S2137/javascript) | Special identifiers should not be bound or assigned | βœ… | | | | | | | [no-gratuitous-expressions](https://sonarsource.github.io/rspec/#/rspec/S2589/javascript) | Boolean expressions should not be gratuitous | βœ… | | | | | | | [no-hardcoded-credentials](https://sonarsource.github.io/rspec/#/rspec/S2068/javascript) | Hard-coded credentials are security-sensitive | βœ… | | | | | | | [no-hardcoded-ip](https://sonarsource.github.io/rspec/#/rspec/S1313/javascript) | Using hardcoded IP addresses is security-sensitive | βœ… | | | | | | | [no-hook-setter-in-body](https://sonarsource.github.io/rspec/#/rspec/S6442/javascript) | React's useState hook should not be used directly in the render function or body of a component | βœ… | | | | | | | [no-identical-conditions](https://sonarsource.github.io/rspec/#/rspec/S1862/javascript) | "if/else if" chains and "switch" cases should not have the same condition | βœ… | | | | | | | [no-identical-expressions](https://sonarsource.github.io/rspec/#/rspec/S1764/javascript) | Identical expressions should not be used on both sides of a binary operator | βœ… | | | | | | | [no-identical-functions](https://sonarsource.github.io/rspec/#/rspec/S4144/javascript) | Functions should not have identical implementations | βœ… | | | | | | | [no-ignored-exceptions](https://sonarsource.github.io/rspec/#/rspec/S2486/javascript) | Exceptions should not be ignored | βœ… | | | | | | | [no-ignored-return](https://sonarsource.github.io/rspec/#/rspec/S2201/javascript) | Return values from functions without side effects should not be ignored | βœ… | | | | πŸ’­ | | | [no-implicit-dependencies](https://sonarsource.github.io/rspec/#/rspec/S4328/javascript) | Dependencies should be explicit | | βœ… | | | | | | [no-implicit-global](https://sonarsource.github.io/rspec/#/rspec/S2703/javascript) | Variables should be declared explicitly | βœ… | | | | | | | [no-in-misuse](https://sonarsource.github.io/rspec/#/rspec/S4619/javascript) | "in" should not be used on arrays | βœ… | | πŸ”§ | πŸ’‘ | πŸ’­ | | | [no-incomplete-assertions](https://sonarsource.github.io/rspec/#/rspec/S2970/javascript) | Assertions should be complete | βœ… | | | | | | | [no-inconsistent-returns](https://sonarsource.github.io/rspec/#/rspec/S3801/javascript) | Functions should use "return" consistently | | βœ… | | | | | | [no-incorrect-string-concat](https://sonarsource.github.io/rspec/#/rspec/S3402/javascript) | Strings and non-strings should not be added | | βœ… | | | πŸ’­ | | | [no-infinite-loop](https://sonarsource.github.io/rspec/#/rspec/S2189/javascript) | Loops should not be infinite | βœ… | | | | | | | [no-intrusive-permissions](https://sonarsource.github.io/rspec/#/rspec/S5604/javascript) | Using intrusive permissions is security-sensitive | βœ… | | | | | | | [no-invalid-await](https://sonarsource.github.io/rspec/#/rspec/S4123/javascript) | "await" should only be used with promises | βœ… | | | | πŸ’­ | | | [no-invariant-returns](https://sonarsource.github.io/rspec/#/rspec/S3516/javascript) | Function returns should not be invariant | βœ… | | | | | | | [no-inverted-boolean-check](https://sonarsource.github.io/rspec/#/rspec/S1940/javascript) | Boolean checks should not be inverted | βœ… | | πŸ”§ | πŸ’‘ | | | | [no-ip-forward](https://sonarsource.github.io/rspec/#/rspec/S5759/javascript) | Forwarding client IP address is security-sensitive | βœ… | | | | | | | [no-labels](https://sonarsource.github.io/rspec/#/rspec/S1119/javascript) | Labels should not be used | βœ… | | | | | | | [no-literal-call](https://sonarsource.github.io/rspec/#/rspec/S6958/javascript) | Literals should not be used as functions | βœ… | | | | | | | [no-lonely-if](https://sonarsource.github.io/rspec/#/rspec/S6660/javascript) | If statements should not be the only statement in else blocks | βœ… | | πŸ”§ | | | | | [no-mime-sniff](https://sonarsource.github.io/rspec/#/rspec/S5734/javascript) | Allowing browsers to sniff MIME types is security-sensitive | βœ… | | | | | | | [no-misleading-array-reverse](https://sonarsource.github.io/rspec/#/rspec/S4043/javascript) | Array-mutating methods should not be used misleadingly | βœ… | | πŸ”§ | πŸ’‘ | πŸ’­ | | | [no-misused-promises](https://sonarsource.github.io/rspec/#/rspec/S6544/javascript) | Promises should not be misused | βœ… | | | πŸ’‘ | πŸ’­ | | | [no-mixed-content](https://sonarsource.github.io/rspec/#/rspec/S5730/javascript) | Allowing mixed-content is security-sensitive | βœ… | | | | | | | [no-nested-assignment](https://sonarsource.github.io/rspec/#/rspec/S1121/javascript) | Assignments should not be made from within sub-expressions | βœ… | | | | | | | [no-nested-conditional](https://sonarsource.github.io/rspec/#/rspec/S3358/javascript) | Ternary operators should not be nested | βœ… | | | | | | | [no-nested-functions](https://sonarsource.github.io/rspec/#/rspec/S2004/javascript) | Functions should not be nested too deeply | βœ… | | | | | | | [no-nested-incdec](https://sonarsource.github.io/rspec/#/rspec/S881/javascript) | Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression | | βœ… | |