Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-sonarjs

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-sonarjs - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

.cirrus.yml

3

lib/rules/no-duplicate-string.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc