diff --git a/.eslint-doc-generatorrc.cjs b/.eslint-doc-generatorrc.cjs
index 8ecc04aa986..0777469cd6b 100644
--- a/.eslint-doc-generatorrc.cjs
+++ b/.eslint-doc-generatorrc.cjs
@@ -15,13 +15,14 @@
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
const rules = require('./lib').rules;
+const prettier = require('prettier');
+const { prettier: prettierOpts } = require('./package.json');
/** @type {import('eslint-doc-generator').GenerateOptions} */
const config = {
urlRuleDoc(name) {
return rules[name].meta.docs.url;
},
- postprocess: content => content.replace('
', '<table>'),
ignoreConfig: ['recommended-legacy'],
pathRuleDoc(name) {
return `docs/${name}.md`;
@@ -36,6 +37,11 @@ const config = {
'requiresTypeChecking',
'deprecated',
],
+ postprocess: content =>
+ prettier.format(content.replace('', '<table>'), {
+ ...prettierOpts,
+ parser: 'markdown',
+ }),
};
module.exports = config;
diff --git a/generate-eslint-package-json.mjs b/generate-eslint-package-json.mjs
index c87f137f131..b1568e7f632 100644
--- a/generate-eslint-package-json.mjs
+++ b/generate-eslint-package-json.mjs
@@ -26,22 +26,14 @@ const eslintPluginDependencies = [
'@babel/preset-flow',
'@babel/preset-react',
'@eslint-community/regexpp',
- '@typescript-eslint/eslint-plugin',
- '@typescript-eslint/utils',
'builtin-modules',
'bytes',
- 'eslint-plugin-import',
- 'eslint-plugin-jsx-a11y',
- 'eslint-plugin-react',
- 'eslint-plugin-react-hooks',
- 'eslint-scope',
'functional-red-black-tree',
'jsx-ast-utils',
'minimatch',
'scslre',
'semver',
'typescript',
- 'vue-eslint-parser',
];
const mainPackageJson = JSON.parse(
@@ -90,7 +82,7 @@ await fs.writeFile(
'https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md',
dependencies,
peerDependencies: {
- eslint: '8.0.0 - 9.14',
+ eslint: '^8.0.0 || ^9.0.0',
},
},
null,
diff --git a/its/eslint8-plugin-sonarjs/eslint.config.cjs b/its/eslint8-plugin-sonarjs/eslint.config.cjs
index cff8b819894..dc69639cb5b 100644
--- a/its/eslint8-plugin-sonarjs/eslint.config.cjs
+++ b/its/eslint8-plugin-sonarjs/eslint.config.cjs
@@ -26,7 +26,6 @@ module.exports = [
plugin.configs.recommended,
{
rules: {
- 'sonarjs/accessor-pairs': 'error',
'sonarjs/no-implicit-dependencies': 'error',
},
},
diff --git a/its/eslint8-plugin-sonarjs/eslint.config.mjs b/its/eslint8-plugin-sonarjs/eslint.config.mjs
index 3fbe393d1b9..ae7ed0ff976 100644
--- a/its/eslint8-plugin-sonarjs/eslint.config.mjs
+++ b/its/eslint8-plugin-sonarjs/eslint.config.mjs
@@ -26,7 +26,6 @@ export default [
plugin.configs.recommended,
{
rules: {
- 'sonarjs/accessor-pairs': 'error',
'sonarjs/no-implicit-dependencies': 'error',
},
},
diff --git a/its/eslint8-plugin-sonarjs/tseslint.config.mjs b/its/eslint8-plugin-sonarjs/tseslint.config.mjs
index d1402107fe8..21cf1736288 100644
--- a/its/eslint8-plugin-sonarjs/tseslint.config.mjs
+++ b/its/eslint8-plugin-sonarjs/tseslint.config.mjs
@@ -23,7 +23,6 @@ import parser from '@typescript-eslint/parser';
console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules ?? {}).length} rules`);
export default tseslint.config(plugin.configs.recommended, {
- rules: { 'sonarjs/accessor-pairs': 'error' },
files: ['**/*.ts'],
languageOptions: {
parser,
diff --git a/its/eslint9-plugin-sonarjs/eslint.config.cjs b/its/eslint9-plugin-sonarjs/eslint.config.cjs
index cff8b819894..dc69639cb5b 100644
--- a/its/eslint9-plugin-sonarjs/eslint.config.cjs
+++ b/its/eslint9-plugin-sonarjs/eslint.config.cjs
@@ -26,7 +26,6 @@ module.exports = [
plugin.configs.recommended,
{
rules: {
- 'sonarjs/accessor-pairs': 'error',
'sonarjs/no-implicit-dependencies': 'error',
},
},
diff --git a/its/eslint9-plugin-sonarjs/eslint.config.mjs b/its/eslint9-plugin-sonarjs/eslint.config.mjs
index 3fbe393d1b9..ae7ed0ff976 100644
--- a/its/eslint9-plugin-sonarjs/eslint.config.mjs
+++ b/its/eslint9-plugin-sonarjs/eslint.config.mjs
@@ -26,7 +26,6 @@ export default [
plugin.configs.recommended,
{
rules: {
- 'sonarjs/accessor-pairs': 'error',
'sonarjs/no-implicit-dependencies': 'error',
},
},
diff --git a/its/eslint9-plugin-sonarjs/tseslint.config.mjs b/its/eslint9-plugin-sonarjs/tseslint.config.mjs
index d1402107fe8..21cf1736288 100644
--- a/its/eslint9-plugin-sonarjs/tseslint.config.mjs
+++ b/its/eslint9-plugin-sonarjs/tseslint.config.mjs
@@ -23,7 +23,6 @@ import parser from '@typescript-eslint/parser';
console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules ?? {}).length} rules`);
export default tseslint.config(plugin.configs.recommended, {
- rules: { 'sonarjs/accessor-pairs': 'error' },
files: ['**/*.ts'],
languageOptions: {
parser,
diff --git a/package-lock.json b/package-lock.json
index ab8d396b982..ab14413baa3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -33,7 +33,7 @@
"htmlparser2": "9.1.0",
"jsx-ast-utils": "3.3.5",
"lodash.clone": "4.5.0",
- "minimatch": "10.0.1",
+ "minimatch": "9.0.5",
"module-alias": "2.2.3",
"postcss": "8.4.49",
"postcss-html": "0.36.0",
@@ -3410,21 +3410,6 @@
}
}
},
- "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {
- "version": "9.0.5",
- "resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/@typescript-eslint/utils": {
"version": "7.18.0",
"resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/@typescript-eslint/utils/-/utils-7.18.0.tgz",
@@ -6623,21 +6608,6 @@
"node": ">= 6"
}
},
- "node_modules/glob/node_modules/minimatch": {
- "version": "9.0.5",
- "resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/global-modules": {
"version": "2.0.0",
"resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/global-modules/-/global-modules-2.0.0.tgz",
@@ -8183,15 +8153,14 @@
}
},
"node_modules/minimatch": {
- "version": "10.0.1",
- "resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/minimatch/-/minimatch-10.0.1.tgz",
- "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
- "license": "ISC",
+ "version": "9.0.5",
+ "resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/minimatch/-/minimatch-9.0.5.tgz",
+ "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
- "node": "20 || >=22"
+ "node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
@@ -9744,6 +9713,21 @@
"node": "20 || >=22"
}
},
+ "node_modules/rimraf/node_modules/minimatch": {
+ "version": "10.0.1",
+ "resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/minimatch/-/minimatch-10.0.1.tgz",
+ "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": "20 || >=22"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/rimraf/node_modules/path-scurry": {
"version": "2.0.0",
"resolved": "https://repox.jfrog.io/artifactory/api/npm/npm/path-scurry/-/path-scurry-2.0.0.tgz",
@@ -11415,22 +11399,6 @@
"typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x"
}
},
- "node_modules/typedoc/node_modules/minimatch": {
- "version": "9.0.5",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
- "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
- "dev": true,
- "license": "ISC",
- "dependencies": {
- "brace-expansion": "^2.0.1"
- },
- "engines": {
- "node": ">=16 || 14 >=14.17"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
"node_modules/typescript": {
"version": "5.7.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz",
diff --git a/package.json b/package.json
index 94d4c982159..1b88afbef86 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"ruling-parametrized": "node tools/prepare-ruling.js && SONAR_RULING_SETTINGS=../settings.js tsx --tsconfig packages/tsconfig.test.json --test packages/ruling/tests/projects/*.ruling.test.ts",
"ruling-sync": "rsync -avh packages/ruling/tests/actual/jsts/ its/ruling/src/test/expected/jsts/ --delete",
"update-ruling-data": "mvn -f sonar-plugin/sonar-javascript-plugin/pom.xml compile && npx tsx packages/ruling/tests/tools/parseRulesData.ts",
+ "create-rule-indexes": "tsx tools/generate-rule-indexes.ts",
"bridge:compile": "tsc -b packages profiling && npm run _:bridge:copy-protofiles",
"bridge:test": "tsx --tsconfig packages/tsconfig.test.json --test --test-reporter spec --test-reporter-destination stdout \"packages/*/src/rules/*[!node_modules]/**/*.test.ts\" \"packages/*[!ruling]/tests/**/*.test.ts\"",
"bridge:test:cov": "odz run npm run bridge:test || true && odz report --reporters=text-lcov > lcov.info",
@@ -28,7 +29,7 @@
"plugin:build:fast": "mvn install -DskipTests && npm run update-ruling-data",
"pbf": "npm run plugin:build:fast",
"td": "npm --prefix typedoc/searchable-parameters-plugin run setup && npx typedoc --options typedoc/typedoc.js",
- "prepare": "husky",
+ "prepare": "husky && npm run create-rule-indexes",
"precommit": "pretty-quick --staged",
"count-rules": "node tools/count-rules.js",
"_:bridge:copy-protofiles": "cpy --flat packages/jsts/src/parsers/estree.proto sonar-plugin/bridge/src/main/protobuf && cpy --flat packages/jsts/src/parsers/estree.proto lib/jsts/src/parsers",
@@ -44,7 +45,7 @@
"eslint-plugin:types": "tsc -p tsconfig-plugin.json --declaration true --emitDeclarationOnly --outDir lib/types",
"eslint-plugin:package-json": "node generate-eslint-package-json.mjs",
"eslint-plugin:copy-assets": "cpy LICENSE.txt lib/ --rename LICENSE && cpy packages/jsts/src/rules/README.md lib/ --flat",
- "eslint-docs": "npm run eslint-plugin:compile && eslint-doc-generator lib --init-rule-docs"
+ "eslint-docs": "npm run eslint-plugin:compile && eslint-doc-generator lib --init-rule-docs && tsx tools/generate-external-rules-docs.ts"
},
"repository": {
"type": "git",
@@ -121,7 +122,7 @@
"htmlparser2": "9.1.0",
"jsx-ast-utils": "3.3.5",
"lodash.clone": "4.5.0",
- "minimatch": "10.0.1",
+ "minimatch": "9.0.5",
"module-alias": "2.2.3",
"postcss": "8.4.49",
"postcss-html": "0.36.0",
diff --git a/packages/jsts/src/analysis/analyzer.ts b/packages/jsts/src/analysis/analyzer.ts
index 217d53d83c3..e122646dab6 100644
--- a/packages/jsts/src/analysis/analyzer.ts
+++ b/packages/jsts/src/analysis/analyzer.ts
@@ -17,7 +17,7 @@
import { debug, info } from '../../../shared/src/helpers/logging.js';
import { SourceCode } from 'eslint';
import { JsTsAnalysisInput, JsTsAnalysisOutput } from './analysis.js';
-import { TSESTree } from '@typescript-eslint/utils';
+import type { TSESTree } from '@typescript-eslint/utils';
import { JsTsLanguage } from '../../../shared/src/helpers/language.js';
import { getLinter } from '../linter/linters.js';
import { buildSourceCode } from '../builders/build.js';
diff --git a/packages/jsts/src/linter/visitors/cpd.ts b/packages/jsts/src/linter/visitors/cpd.ts
index b77ad020043..8c4be1a295e 100644
--- a/packages/jsts/src/linter/visitors/cpd.ts
+++ b/packages/jsts/src/linter/visitors/cpd.ts
@@ -15,7 +15,7 @@
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import estree from 'estree';
-import { TSESTree } from '@typescript-eslint/utils';
+import type { TSESTree } from '@typescript-eslint/utils';
import { SourceCode, AST } from 'eslint';
import { visit } from './visitor.js';
import { Location } from './metrics/helpers/location.js';
diff --git a/packages/jsts/src/linter/visitors/symbol-highlighting.ts b/packages/jsts/src/linter/visitors/symbol-highlighting.ts
index 5ccf4183d5d..123964e2689 100644
--- a/packages/jsts/src/linter/visitors/symbol-highlighting.ts
+++ b/packages/jsts/src/linter/visitors/symbol-highlighting.ts
@@ -16,7 +16,7 @@
*/
import { Rule, Scope } from 'eslint';
import estree from 'estree';
-import { TSESTree } from '@typescript-eslint/utils';
+import type { TSESTree } from '@typescript-eslint/utils';
import { AST } from 'vue-eslint-parser';
import { convertLocation, extractTokensAndComments, Location } from './metrics/helpers/index.js';
diff --git a/packages/jsts/src/parsers/ast.ts b/packages/jsts/src/parsers/ast.ts
index ccf05d9585e..2a63ec8c4be 100644
--- a/packages/jsts/src/parsers/ast.ts
+++ b/packages/jsts/src/parsers/ast.ts
@@ -15,7 +15,7 @@
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
import protobuf from 'protobufjs';
-import { TSESTree } from '@typescript-eslint/utils';
+import type { TSESTree } from '@typescript-eslint/utils';
import { debug } from '../../../shared/src/helpers/logging.js';
import path from 'path';
diff --git a/packages/jsts/src/rules/.gitignore b/packages/jsts/src/rules/.gitignore
new file mode 100644
index 00000000000..532cabda6eb
--- /dev/null
+++ b/packages/jsts/src/rules/.gitignore
@@ -0,0 +1,2 @@
+rules.ts
+plugin-rules.ts
diff --git a/packages/jsts/src/rules/README.md b/packages/jsts/src/rules/README.md
index 046cba96d5c..1cc0005a283 100644
--- a/packages/jsts/src/rules/README.md
+++ b/packages/jsts/src/rules/README.md
@@ -64,7 +64,9 @@ We include a `recommended-legacy` configuration to be backward compatible with E
## ESLint and Sonar
-This plugin exposes to ESLint users all JS/TS rules from Sonar-\* products (aka [SonarJS](https://github.com/SonarSource/SonarJS)). We extracted the rules to be beneficial for the ESLint community.
+This plugin exposes to ESLint users all original JS/TS rules from Sonar products (aka [SonarJS](https://github.com/SonarSource/SonarJS)). We extracted the rules to be beneficial for the ESLint community.
+
+This ESLint plugin does not contain all the rules from the SonarQube JS/TS analyzer. Aside of the rules available here, SonarQube uses rules from other ESLint plugins ([some](#eslint-rules) used as they are, [some others](#improved-eslint-rules) have been modified). We recommend installing those ESLint plugins and enabling those rules if you are looking for similar results to SonarQube using ESLint.
If you are a [SonarQube](https://www.sonarqube.org) or [SonarCloud](https://sonarcloud.io) user, to lint your code locally, we suggest using [SonarLint](https://www.sonarlint.org) IDE extension (available for VSCode, JetBrains IDEs and Eclipse). You can connect SonarLint to your SonarQube/SonarCloud project to synchronize rules configuration, issue statuses, etc.
@@ -79,337 +81,472 @@ If you are a [SonarQube](https://www.sonarqube.org) or [SonarCloud](https://sona
π 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-async-constructor](https://sonarsource.github.io/rspec/#/rspec/S7059/javascript) | Constructors should not contain asynchronous operations | β
| | | | |
-| [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-ip](https://sonarsource.github.io/rspec/#/rspec/S1313/javascript) | Using hardcoded IP addresses is security-sensitive | β
| | | | |
-| [no-hardcoded-passwords](https://sonarsource.github.io/rspec/#/rspec/S2068/javascript) | Hard-coded passwords are security-sensitive | β
| | | | |
-| [no-hardcoded-secrets](https://sonarsource.github.io/rspec/#/rspec/S6418/javascript) | Hard-coded secrets are 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-internal-api-use](https://sonarsource.github.io/rspec/#/rspec/S6627/javascript) | Users should not use internal APIs | β
| | | | |
-| [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 | | | | | |
-| [no-nested-switch](https://sonarsource.github.io/rspec/#/rspec/S1821/javascript) | "switch" statements should not be nested | | | | | |
-| [no-nested-template-literals](https://sonarsource.github.io/rspec/#/rspec/S4624/javascript) | Template literals should not be nested | β
| | | | |
-| [no-one-iteration-loop](https://sonarsource.github.io/rspec/#/rspec/S1751/javascript) | Loops with at most one iteration should be refactored | β
| | | | |
-| [no-os-command-from-path](https://sonarsource.github.io/rspec/#/rspec/S4036/javascript) | Searching OS commands in PATH is security-sensitive | β
| | | | |
-| [no-parameter-reassignment](https://sonarsource.github.io/rspec/#/rspec/S1226/javascript) | Initial values of parameters, caught exceptions, and loop variables should not be ignored | β
| | | | |
-| [no-primitive-wrappers](https://sonarsource.github.io/rspec/#/rspec/S1533/javascript) | Wrapper objects should not be used for primitive types | β
| | π‘ | | |
-| [no-redeclare](https://sonarsource.github.io/rspec/#/rspec/S2814/javascript) | Variables and functions should not be redeclared | β
| | | | |
-| [no-redundant-assignments](https://sonarsource.github.io/rspec/#/rspec/S4165/javascript) | Assignments should not be redundant | β
| | | | |
-| [no-redundant-boolean](https://sonarsource.github.io/rspec/#/rspec/S1125/javascript) | Boolean literals should not be used in comparisons | β
| | | | |
-| [no-redundant-jump](https://sonarsource.github.io/rspec/#/rspec/S3626/javascript) | Jump statements should not be redundant | β
| | π‘ | | |
-| [no-redundant-optional](https://sonarsource.github.io/rspec/#/rspec/S4782/javascript) | Optional property declarations should not use both '?' and 'undefined' syntax | β
| | π‘ | π | |
-| [no-redundant-parentheses](https://sonarsource.github.io/rspec/#/rspec/S1110/javascript) | Redundant pairs of parentheses should be removed | | | π‘ | | β |
-| [no-redundant-type-constituents](https://sonarsource.github.io/rspec/#/rspec/S6571/javascript) | Type constituents of unions and intersections should not be redundant | β
| | | π | |
-| [no-reference-error](https://sonarsource.github.io/rspec/#/rspec/S3827/javascript) | Variables should be defined before being used | | | | | |
-| [no-referrer-policy](https://sonarsource.github.io/rspec/#/rspec/S5736/javascript) | Disabling strict HTTP no-referrer policy is security-sensitive | β
| | | | |
-| [no-require-or-define](https://sonarsource.github.io/rspec/#/rspec/S3533/javascript) | "import" should be used to include external code | | | | π | |
-| [no-return-type-any](https://sonarsource.github.io/rspec/#/rspec/S4324/javascript) | Primitive return types should be used | | | | π | |
-| [no-same-argument-assert](https://sonarsource.github.io/rspec/#/rspec/S5863/javascript) | Assertions should not be given twice the same argument | β
| | | | |
-| [no-same-line-conditional](https://sonarsource.github.io/rspec/#/rspec/S3972/javascript) | Conditionals should start on new lines | β
| | π‘ | | |
-| [no-selector-parameter](https://sonarsource.github.io/rspec/#/rspec/S2301/javascript) | Methods should not contain selector parameters | β
| | | π | |
-| [no-self-compare](https://sonarsource.github.io/rspec/#/rspec/S6679/javascript) | "Number.isNaN()" should be used to check for "NaN" value | β
| | π‘ | | |
-| [no-self-import](https://sonarsource.github.io/rspec/#/rspec/S7060/javascript) | Module should not import itself | β
| | π‘ | | |
-| [no-skipped-test](https://sonarsource.github.io/rspec/#/rspec/S1607/javascript) | Tests should not be skipped without providing a reason | β
| | | | |
-| [no-small-switch](https://sonarsource.github.io/rspec/#/rspec/S1301/javascript) | "if" statements should be preferred over "switch" when simpler | β
| | | | |
-| [no-sonar-comments](https://sonarsource.github.io/rspec/#/rspec/S1291/javascript) | Track uses of "NOSONAR" comments | | | | | |
-| [no-tab](https://sonarsource.github.io/rspec/#/rspec/S105/javascript) | Tabulation characters should not be used | | | | | β |
-| [no-table-as-layout](https://sonarsource.github.io/rspec/#/rspec/S5257/javascript) | HTML "<table>" should not be used for layout purposes | β
| | | | |
-| [no-this-alias](https://sonarsource.github.io/rspec/#/rspec/S4327/javascript) | "this" should not be assigned to variables | | | | | |
-| [no-throw-literal](https://sonarsource.github.io/rspec/#/rspec/S3696/javascript) | Literals should not be thrown | β
| | π‘ | π | |
-| [no-try-promise](https://sonarsource.github.io/rspec/#/rspec/S4822/javascript) | Promise rejections should not be caught by "try" blocks | β
| | | π | |
-| [no-undefined-argument](https://sonarsource.github.io/rspec/#/rspec/S4623/javascript) | "undefined" should not be passed as the value of optional parameters | β
| | π‘ | π | |
-| [no-undefined-assignment](https://sonarsource.github.io/rspec/#/rspec/S2138/javascript) | "undefined" should not be assigned | | | | | |
-| [no-unenclosed-multiline-block](https://sonarsource.github.io/rspec/#/rspec/S2681/javascript) | Multiline blocks should be enclosed in curly braces | β
| | | | |
-| [no-uniq-key](https://sonarsource.github.io/rspec/#/rspec/S6486/javascript) | JSX list components keys should match up between renders | β
| | | | |
-| [no-unknown-property](https://sonarsource.github.io/rspec/#/rspec/S6747/javascript) | JSX elements should not use unknown properties and attributes | β
| | π‘ | | |
-| [no-unreachable](https://sonarsource.github.io/rspec/#/rspec/S1763/javascript) | All code should be reachable | β
| | π‘ | | |
-| [no-unsafe](https://sonarsource.github.io/rspec/#/rspec/S6791/javascript) | React legacy lifecycle methods should not be used | β
| | | | |
-| [no-unsafe-unzip](https://sonarsource.github.io/rspec/#/rspec/S5042/javascript) | Expanding archive files without controlling resource consumption is security-sensitive | β
| | | | |
-| [no-unstable-nested-components](https://sonarsource.github.io/rspec/#/rspec/S6478/javascript) | React components should not be nested | β
| | | | |
-| [no-unthrown-error](https://sonarsource.github.io/rspec/#/rspec/S3984/javascript) | Errors should not be created without being thrown | β
| | π‘ | | |
-| [no-unused-collection](https://sonarsource.github.io/rspec/#/rspec/S4030/javascript) | Collection contents should be used | β
| | | | |
-| [no-unused-expressions](https://sonarsource.github.io/rspec/#/rspec/S905/javascript) | Non-empty statements should change control flow or have at least one side-effect | β
| | | | |
-| [no-unused-function-argument](https://sonarsource.github.io/rspec/#/rspec/S1172/javascript) | Unused function parameters should be removed | | | π‘ | | |
-| [no-unused-private-class-members](https://sonarsource.github.io/rspec/#/rspec/S1068/javascript) | Unused private class members should be removed | β
| | π‘ | | |
-| [no-use-of-empty-return-value](https://sonarsource.github.io/rspec/#/rspec/S3699/javascript) | The return value of void functions should not be used | β
| | | | |
-| [no-useless-call](https://sonarsource.github.io/rspec/#/rspec/S6676/javascript) | Calls to ".call()" and ".apply()" methods should not be redundant | β
| | π‘ | | |
-| [no-useless-catch](https://sonarsource.github.io/rspec/#/rspec/S2737/javascript) | "catch" clauses should do more than rethrow | β
| | | | |
-| [no-useless-constructor](https://sonarsource.github.io/rspec/#/rspec/S6647/javascript) | Unnecessary constructors should be removed | β
| | π‘ | | |
-| [no-useless-increment](https://sonarsource.github.io/rspec/#/rspec/S2123/javascript) | Values should not be uselessly incremented | β
| | | | |
-| [no-useless-intersection](https://sonarsource.github.io/rspec/#/rspec/S4335/javascript) | Type intersections should use meaningful types | β
| | | π | |
-| [no-useless-react-setstate](https://sonarsource.github.io/rspec/#/rspec/S6443/javascript) | React state setter function should not be called with its matching state variable | β
| | | | |
-| [no-var](https://sonarsource.github.io/rspec/#/rspec/S3504/javascript) | Variables should be declared with "let" or "const" | β
| π§ | | | |
-| [no-variable-usage-before-declaration](https://sonarsource.github.io/rspec/#/rspec/S1526/javascript) | Variables declared with "var" should be declared before they are used | | | | | |
-| [no-vue-bypass-sanitization](https://sonarsource.github.io/rspec/#/rspec/S6299/javascript) | Disabling Vue.js built-in escaping is security-sensitive | β
| | | | |
-| [no-weak-cipher](https://sonarsource.github.io/rspec/#/rspec/S5547/javascript) | Cipher algorithms should be robust | β
| | | | |
-| [no-weak-keys](https://sonarsource.github.io/rspec/#/rspec/S4426/javascript) | Cryptographic keys should be robust | β
| | | | |
-| [no-wildcard-import](https://sonarsource.github.io/rspec/#/rspec/S2208/javascript) | Wildcard imports should not be used | | | | | |
-| [non-existent-operator](https://sonarsource.github.io/rspec/#/rspec/S2757/javascript) | Non-existent operators '=+', '=-' and '=!' should not be used | β
| | π‘ | | |
-| [non-number-in-arithmetic-expression](https://sonarsource.github.io/rspec/#/rspec/S3760/javascript) | Arithmetic operators should only have numbers as operands | | | | π | |
-| [null-dereference](https://sonarsource.github.io/rspec/#/rspec/S2259/javascript) | Properties of variables with "null" or "undefined" values should not be accessed | β
| | | π | |
-| [object-alt-content](https://sonarsource.github.io/rspec/#/rspec/S5264/javascript) | "