eslint-plugin-sonarjs
- Version 3.0.1
- Published
- 2.75 MB
- 15 dependencies
- LGPL-3.0-only license
Install
npm i eslint-plugin-sonarjs
yarn add eslint-plugin-sonarjs
pnpm add eslint-plugin-sonarjs
Overview
SonarJS rules for ESLint
Index
Variables
variable _default
const _default: { rules: { 'function-name': any; 'class-name': any; 'max-lines': any; 'no-tab': any; 'variable-name': any; 'comment-regex': any; 'no-commented-code': any; 'elseif-without-else': any; 'no-fallthrough': any; 'nested-control-flow': any; 'too-many-break-or-continue-in-loop': any; 'max-lines-per-function': any; 'no-nested-incdec': any; 'no-equals-in-for-termination': any; 'no-extra-arguments': any; 'no-collapsible-if': any; 'expression-complexity': any; 'no-redundant-parentheses': any; 'no-labels': any; 'no-nested-assignment': any; 'no-redundant-boolean': any; 'prefer-single-boolean-return': any; 'unused-import': any; 'fixme-tag': any; 'todo-tag': any; 'useless-string-operation': any; 'no-unused-function-argument': any; 'no-duplicate-string': any; 'no-case-label-in-switch': any; 'no-parameter-reassignment': any; 'prefer-while': any; 'no-sonar-comments': any; 'no-small-switch': any; 'no-hardcoded-ip': any; 'label-position': any; 'public-static-readonly': any; 'file-header': any; 'call-argument-line': any; 'max-switch-cases': any; 'no-unused-vars': any; 'prefer-immediate-return': any; 'function-inside-loop': any; 'code-eval': any; 'no-variable-usage-before-declaration': any; 'future-reserved-words': any; 'array-constructor': any; 'bitwise-operators': any; 'no-function-declaration-in-block': any; 'no-primitive-wrappers': any; 'for-in': any; 'cyclomatic-complexity': any; 'no-skipped-tests': any; 'no-one-iteration-loop': any; 'no-identical-expressions': any; 'no-nested-switch': any; 'constructor-for-side-effects': any; 'no-dead-store': any; 'no-identical-conditions': any; 'no-duplicated-branches': any; deprecation: any; 'no-inverted-boolean-check': any; 'misplaced-loop-counter': any; 'no-nested-functions': any; 'no-hardcoded-passwords': any; 'sql-queries': any; 'insecure-cookie': any; 'no-useless-increment': any; 'no-globals-shadowing': any; 'no-undefined-assignment': any; 'no-empty-test-file': any; 'no-ignored-return': any; 'no-wildcard-import': any; 'arguments-order': any; 'pseudo-random': any; 'for-loop-increment-sign': any; cookies: any; 'null-dereference': any; 'no-selector-parameter': any; 'updated-loop-counter': any; 'block-scoped-var': any; 'no-built-in-override': any; 'prefer-object-literal': any; 'no-ignored-exceptions': any; 'no-gratuitous-expressions': any; 'file-uploads': any; 'file-permissions': any; 'no-empty-character-class': any; 'no-unenclosed-multiline-block': any; 'index-of-compare-to-positive-number': any; 'assertions-in-tests': any; 'no-implicit-global': any; 'no-useless-catch': any; 'xml-parser-xxe': any; 'non-existent-operator': any; 'web-sql-database': any; 'post-message': any; 'no-array-delete': any; 'no-alphabetical-sort': any; 'no-incomplete-assertions': any; 'no-global-this': any; 'new-operator-misuse': any; 'no-delete-var': any; 'strings-comparison': any; 'file-name-differ-from-class': any; 'cookie-no-httponly': any; 'no-nested-conditional': any; 'no-incorrect-string-concat': any; 'different-types-comparison': any; 'inverted-assertion-arguments': any; 'shorthand-property-grouping': any; 'updated-const-var': any; 'arguments-usage': any; 'destructuring-assignment-syntax': any; 'no-invariant-returns': any; 'arrow-function-convention': any; 'class-prototype': any; 'generator-without-yield': any; 'no-require-or-define': any; 'no-associative-arrays': any; 'comma-or-logical-or-case': any; 'no-redundant-jump': any; 'inconsistent-function-call': any; 'no-use-of-empty-return-value': any; 'enforce-trailing-comma': { meta: any; create(context: any): any; schema?: any; }; 'void-use': any; 'operation-returning-nan': any; 'values-not-convertible-to-numbers': any; 'non-number-in-arithmetic-expression': any; 'cognitive-complexity': any; 'argument-type': any; 'in-operator-type-error': any; 'array-callback-without-return': any; 'declarations-in-global-scope': any; 'function-return-type': any; 'no-inconsistent-returns': any; 'no-reference-error': any; 'super-invocation': any; 'no-all-duplicated-branches': any; 'no-same-line-conditional': any; 'conditional-indentation': any; 'no-collection-size-mischeck': any; 'no-unthrown-error': any; 'no-unused-collection': any; 'no-os-command-from-path': any; 'no-misleading-array-reverse': any; 'no-invalid-await': any; 'no-for-in-iterable': any; 'no-element-overwrite': any; 'no-identical-functions': any; 'no-empty-collection': any; 'no-redundant-assignments': any; 'prefer-type-guard': any; 'use-type-alias': any; 'no-return-type-any': any; 'no-implicit-dependencies': any; 'no-useless-intersection': any; 'weak-ssl': any; 'no-weak-keys': any; csrf: any; 'production-debug': any; 'prefer-default-last': any; 'no-in-misuse': any; 'no-duplicate-in-composite': any; 'max-union-size': any; 'no-undefined-argument': any; 'no-nested-template-literals': any; 'prefer-promise-shorthand': any; 'os-command': any; 'no-redundant-optional': any; 'regular-expr': any; encryption: any; hashing: any; 'bool-param-default': any; xpath: any; sockets: any; 'no-try-promise': any; 'process-argv': any; 'standard-input': any; 'unverified-certificate': any; 'no-unsafe-unzip': any; cors: any; 'link-with-target-blank': any; 'disabled-auto-escaping': any; 'table-header': any; 'no-table-as-layout': any; 'table-header-reference': any; 'object-alt-content': any; 'no-clear-text-protocols': any; 'publicly-writable-directories': any; 'unverified-hostname': any; 'encryption-secure-mode': any; 'no-weak-cipher': any; 'no-intrusive-permissions': any; 'insecure-jwt-token': any; 'x-powered-by': any; 'hidden-files': any; 'content-length': any; 'disabled-resource-integrity': any; 'content-security-policy': any; 'no-mixed-content': any; 'frame-ancestors': any; 'no-mime-sniff': any; 'no-referrer-policy': any; 'strict-transport-security': any; 'certificate-transparency': any; 'dns-prefetching': any; 'confidential-information-logging': any; 'no-ip-forward': any; 'empty-string-repetition': any; 'regex-complexity': any; 'anchor-precedence': any; 'slow-regex': any; 'no-invalid-regexp': any; 'unused-named-groups': any; 'no-same-argument-assert': any; 'unicode-aware-regex': any; 'no-misleading-character-class': any; 'duplicates-in-character-class': any; 'session-regeneration': any; 'test-check-exception': any; 'stable-tests': any; 'no-empty-after-reluctant': any; 'single-character-alternation': any; 'no-code-after-done': any; 'disabled-timeout': any; 'chai-determinate-assertion': any; 'aws-s3-bucket-server-encryption': any; 'aws-s3-bucket-insecure-http': any; 'aws-s3-bucket-versioning': any; 'aws-s3-bucket-granted-access': any; 'no-angular-bypass-sanitization': any; 'aws-iam-public-access': any; 'aws-ec2-unencrypted-ebs-volume': any; 'aws-s3-bucket-public-access': any; 'no-vue-bypass-sanitization': any; 'aws-iam-all-privileges': any; 'aws-rds-unencrypted-databases': any; 'aws-iam-all-resources-accessible': any; 'aws-opensearchservice-domain': any; 'aws-iam-privilege-escalation': any; 'aws-sagemaker-unencrypted-notebook': any; 'aws-restricted-ip-admin-access': any; 'no-empty-alternatives': any; 'no-control-regex': any; 'no-regex-spaces': any; 'aws-sns-unencrypted-topics': any; 'existing-groups': any; 'aws-ec2-rds-dms-public': any; 'aws-sqs-unencrypted-queue': any; 'no-empty-group': any; 'aws-efs-unencrypted': any; 'aws-apigateway-public-api': any; 'stateful-regex': any; 'concise-regex': any; 'single-char-in-character-classes': any; 'no-hardcoded-secrets': any; 'no-exclusive-tests': any; 'jsx-no-leaked-render': any; 'no-hook-setter-in-body': any; 'no-useless-react-setstate': any; 'no-uniq-key': any; 'redundant-type-aliases': any; 'prefer-regexp-exec': any; 'no-internal-api-use': any; 'prefer-read-only-props': any; 'no-literal-call': any; 'reduce-initial-value': any; 'no-async-constructor': any; }; configs: { recommended: Linter.FlatConfig<Linter.RulesRecord> & { rules: Linter.RulesRecord; }; 'recommended-legacy': Linter.Config<Linter.RulesRecord, Linter.RulesRecord>; }; meta: { name: string; version: string };};
variable configs
const configs: { recommended: Linter.FlatConfig<Linter.RulesRecord> & { rules: Linter.RulesRecord; }; 'recommended-legacy': Linter.Config<Linter.RulesRecord, Linter.RulesRecord>;};
variable meta
const meta: { name: string; version: string };
I kept the meta export for compatibility, but we need to find a way to populate it without relying on the package manifest
variable rules
const rules: { 'function-name': any; 'class-name': any; 'max-lines': any; 'no-tab': any; 'variable-name': any; 'comment-regex': any; 'no-commented-code': any; 'elseif-without-else': any; 'no-fallthrough': any; 'nested-control-flow': any; 'too-many-break-or-continue-in-loop': any; 'max-lines-per-function': any; 'no-nested-incdec': any; 'no-equals-in-for-termination': any; 'no-extra-arguments': any; 'no-collapsible-if': any; 'expression-complexity': any; 'no-redundant-parentheses': any; 'no-labels': any; 'no-nested-assignment': any; 'no-redundant-boolean': any; 'prefer-single-boolean-return': any; 'unused-import': any; 'fixme-tag': any; 'todo-tag': any; 'useless-string-operation': any; 'no-unused-function-argument': any; 'no-duplicate-string': any; 'no-case-label-in-switch': any; 'no-parameter-reassignment': any; 'prefer-while': any; 'no-sonar-comments': any; 'no-small-switch': any; 'no-hardcoded-ip': any; 'label-position': any; 'public-static-readonly': any; 'file-header': any; 'call-argument-line': any; 'max-switch-cases': any; 'no-unused-vars': any; 'prefer-immediate-return': any; 'function-inside-loop': any; 'code-eval': any; 'no-variable-usage-before-declaration': any; 'future-reserved-words': any; 'array-constructor': any; 'bitwise-operators': any; 'no-function-declaration-in-block': any; 'no-primitive-wrappers': any; 'for-in': any; 'cyclomatic-complexity': any; 'no-skipped-tests': any; 'no-one-iteration-loop': any; 'no-identical-expressions': any; 'no-nested-switch': any; 'constructor-for-side-effects': any; 'no-dead-store': any; 'no-identical-conditions': any; 'no-duplicated-branches': any; deprecation: any; 'no-inverted-boolean-check': any; 'misplaced-loop-counter': any; 'no-nested-functions': any; 'no-hardcoded-passwords': any; 'sql-queries': any; 'insecure-cookie': any; 'no-useless-increment': any; 'no-globals-shadowing': any; 'no-undefined-assignment': any; 'no-empty-test-file': any; 'no-ignored-return': any; 'no-wildcard-import': any; 'arguments-order': any; 'pseudo-random': any; 'for-loop-increment-sign': any; cookies: any; 'null-dereference': any; 'no-selector-parameter': any; 'updated-loop-counter': any; 'block-scoped-var': any; 'no-built-in-override': any; 'prefer-object-literal': any; 'no-ignored-exceptions': any; 'no-gratuitous-expressions': any; 'file-uploads': any; 'file-permissions': any; 'no-empty-character-class': any; 'no-unenclosed-multiline-block': any; 'index-of-compare-to-positive-number': any; 'assertions-in-tests': any; 'no-implicit-global': any; 'no-useless-catch': any; 'xml-parser-xxe': any; 'non-existent-operator': any; 'web-sql-database': any; 'post-message': any; 'no-array-delete': any; 'no-alphabetical-sort': any; 'no-incomplete-assertions': any; 'no-global-this': any; 'new-operator-misuse': any; 'no-delete-var': any; 'strings-comparison': any; 'file-name-differ-from-class': any; 'cookie-no-httponly': any; 'no-nested-conditional': any; 'no-incorrect-string-concat': any; 'different-types-comparison': any; 'inverted-assertion-arguments': any; 'shorthand-property-grouping': any; 'updated-const-var': any; 'arguments-usage': any; 'destructuring-assignment-syntax': any; 'no-invariant-returns': any; 'arrow-function-convention': any; 'class-prototype': any; 'generator-without-yield': any; 'no-require-or-define': any; 'no-associative-arrays': any; 'comma-or-logical-or-case': any; 'no-redundant-jump': any; 'inconsistent-function-call': any; 'no-use-of-empty-return-value': any; 'enforce-trailing-comma': { meta: any; create(context: any): any; schema?: any }; 'void-use': any; 'operation-returning-nan': any; 'values-not-convertible-to-numbers': any; 'non-number-in-arithmetic-expression': any; 'cognitive-complexity': any; 'argument-type': any; 'in-operator-type-error': any; 'array-callback-without-return': any; 'declarations-in-global-scope': any; 'function-return-type': any; 'no-inconsistent-returns': any; 'no-reference-error': any; 'super-invocation': any; 'no-all-duplicated-branches': any; 'no-same-line-conditional': any; 'conditional-indentation': any; 'no-collection-size-mischeck': any; 'no-unthrown-error': any; 'no-unused-collection': any; 'no-os-command-from-path': any; 'no-misleading-array-reverse': any; 'no-invalid-await': any; 'no-for-in-iterable': any; 'no-element-overwrite': any; 'no-identical-functions': any; 'no-empty-collection': any; 'no-redundant-assignments': any; 'prefer-type-guard': any; 'use-type-alias': any; 'no-return-type-any': any; 'no-implicit-dependencies': any; 'no-useless-intersection': any; 'weak-ssl': any; 'no-weak-keys': any; csrf: any; 'production-debug': any; 'prefer-default-last': any; 'no-in-misuse': any; 'no-duplicate-in-composite': any; 'max-union-size': any; 'no-undefined-argument': any; 'no-nested-template-literals': any; 'prefer-promise-shorthand': any; 'os-command': any; 'no-redundant-optional': any; 'regular-expr': any; encryption: any; hashing: any; 'bool-param-default': any; xpath: any; sockets: any; 'no-try-promise': any; 'process-argv': any; 'standard-input': any; 'unverified-certificate': any; 'no-unsafe-unzip': any; cors: any; 'link-with-target-blank': any; 'disabled-auto-escaping': any; 'table-header': any; 'no-table-as-layout': any; 'table-header-reference': any; 'object-alt-content': any; 'no-clear-text-protocols': any; 'publicly-writable-directories': any; 'unverified-hostname': any; 'encryption-secure-mode': any; 'no-weak-cipher': any; 'no-intrusive-permissions': any; 'insecure-jwt-token': any; 'x-powered-by': any; 'hidden-files': any; 'content-length': any; 'disabled-resource-integrity': any; 'content-security-policy': any; 'no-mixed-content': any; 'frame-ancestors': any; 'no-mime-sniff': any; 'no-referrer-policy': any; 'strict-transport-security': any; 'certificate-transparency': any; 'dns-prefetching': any; 'confidential-information-logging': any; 'no-ip-forward': any; 'empty-string-repetition': any; 'regex-complexity': any; 'anchor-precedence': any; 'slow-regex': any; 'no-invalid-regexp': any; 'unused-named-groups': any; 'no-same-argument-assert': any; 'unicode-aware-regex': any; 'no-misleading-character-class': any; 'duplicates-in-character-class': any; 'session-regeneration': any; 'test-check-exception': any; 'stable-tests': any; 'no-empty-after-reluctant': any; 'single-character-alternation': any; 'no-code-after-done': any; 'disabled-timeout': any; 'chai-determinate-assertion': any; 'aws-s3-bucket-server-encryption': any; 'aws-s3-bucket-insecure-http': any; 'aws-s3-bucket-versioning': any; 'aws-s3-bucket-granted-access': any; 'no-angular-bypass-sanitization': any; 'aws-iam-public-access': any; 'aws-ec2-unencrypted-ebs-volume': any; 'aws-s3-bucket-public-access': any; 'no-vue-bypass-sanitization': any; 'aws-iam-all-privileges': any; 'aws-rds-unencrypted-databases': any; 'aws-iam-all-resources-accessible': any; 'aws-opensearchservice-domain': any; 'aws-iam-privilege-escalation': any; 'aws-sagemaker-unencrypted-notebook': any; 'aws-restricted-ip-admin-access': any; 'no-empty-alternatives': any; 'no-control-regex': any; 'no-regex-spaces': any; 'aws-sns-unencrypted-topics': any; 'existing-groups': any; 'aws-ec2-rds-dms-public': any; 'aws-sqs-unencrypted-queue': any; 'no-empty-group': any; 'aws-efs-unencrypted': any; 'aws-apigateway-public-api': any; 'stateful-regex': any; 'concise-regex': any; 'single-char-in-character-classes': any; 'no-hardcoded-secrets': any; 'no-exclusive-tests': any; 'jsx-no-leaked-render': any; 'no-hook-setter-in-body': any; 'no-useless-react-setstate': any; 'no-uniq-key': any; 'redundant-type-aliases': any; 'prefer-regexp-exec': any; 'no-internal-api-use': any; 'prefer-read-only-props': any; 'no-literal-call': any; 'reduce-initial-value': any; 'no-async-constructor': any;};
Package Files (2)
Dependencies (15)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/eslint-plugin-sonarjs
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/eslint-plugin-sonarjs)
- HTML<a href="https://www.jsdocs.io/package/eslint-plugin-sonarjs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 6815 ms. - Missing or incorrect documentation? Open an issue for this package.