eslint-plugin-sonarjs
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -41,3 +41,4 @@ "use strict"; | ||
const parent = nodes_1.getParent(context); | ||
if (typeof literal.value === "string" && (parent && parent.type !== "ExpressionStatement")) { | ||
if (typeof literal.value === "string" && | ||
(parent && !["ExpressionStatement", "TSLiteralType"].includes(parent.type))) { | ||
const stringContent = literal.value.trim(); | ||
@@ -44,0 +45,0 @@ if (!isExcludedByUsageContext(context, literal) && |
{ | ||
"name": "eslint-plugin-sonarjs", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "SonarJS rules for ESLint", | ||
@@ -9,3 +9,7 @@ "main": "lib/index.js", | ||
"license": "LGPL-3.0", | ||
"keywords": ["sonarjs", "eslint", "eslintplugin"], | ||
"keywords": [ | ||
"sonarjs", | ||
"eslint", | ||
"eslintplugin" | ||
], | ||
"bugs": { | ||
@@ -61,4 +65,9 @@ "url": "https://github.com/SonarSource/eslint-plugin-sonarjs/issues" | ||
"jest": { | ||
"roots": ["tests", "src"], | ||
"collectCoverageFrom": ["src/**/*.ts"], | ||
"roots": [ | ||
"tests", | ||
"src" | ||
], | ||
"collectCoverageFrom": [ | ||
"src/**/*.ts" | ||
], | ||
"globals": { | ||
@@ -69,12 +78,25 @@ "ts-jest": { | ||
}, | ||
"moduleFileExtensions": ["ts", "js", "json"], | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"js", | ||
"json" | ||
], | ||
"transform": { | ||
"^.+\\.ts$": "ts-jest" | ||
}, | ||
"testMatch": ["<rootDir>/tests/**/*.test.ts"] | ||
"testMatch": [ | ||
"<rootDir>/tests/**/*.test.ts" | ||
] | ||
}, | ||
"lint-staged": { | ||
"*.{ts,tsx,js}": ["eslint", "prettier --write", "git add"], | ||
"*.json": ["prettier --write", "git add"] | ||
"*.{ts,tsx,js}": [ | ||
"eslint", | ||
"prettier --write", | ||
"git add" | ||
], | ||
"*.json": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# eslint-plugin-sonarjs [![npm version](https://badge.fury.io/js/eslint-plugin-sonarjs.svg)](https://badge.fury.io/js/eslint-plugin-sonarjs) [![Build Status](https://travis-ci.org/SonarSource/eslint-plugin-sonarjs.svg?branch=master)](https://travis-ci.org/SonarSource/eslint-plugin-sonarjs) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=eslint-plugin-sonarjs&metric=alert_status)](https://sonarcloud.io/dashboard?id=eslint-plugin-sonarjs) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=eslint-plugin-sonarjs&metric=coverage)](https://sonarcloud.io/dashboard?id=eslint-plugin-sonarjs) | ||
# eslint-plugin-sonarjs [![npm version](https://badge.fury.io/js/eslint-plugin-sonarjs.svg)](https://badge.fury.io/js/eslint-plugin-sonarjs) [![Build Status](https://api.cirrus-ci.com/github/SonarSource/eslint-plugin-sonarjs.svg?branch=master)](https://cirrus-ci.com/github/SonarSource/eslint-plugin-sonarjs) [![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=eslint-plugin-sonarjs&metric=alert_status)](https://sonarcloud.io/dashboard?id=eslint-plugin-sonarjs) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=eslint-plugin-sonarjs&metric=coverage)](https://sonarcloud.io/dashboard?id=eslint-plugin-sonarjs) | ||
@@ -3,0 +3,0 @@ SonarJS rules for ESLint to detect bugs and suspicious patterns in your code. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
214560
105
2839
0