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

eslint-plugin-escompat

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-escompat - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

16

lib/rules/no-regexp-s-flag.js

@@ -8,3 +8,17 @@ module.exports = (context, badBrowser) => ({

'CallExpression[callee.name="RegExp"], NewExpression[callee.name="RegExp"]'(node) {
if (node.arguments[1] && node.arguments[1].value.includes('s')) {
const [, flags] = node.arguments;
if (
flags &&
(
(
flags.type === 'Literal' &&
typeof flags.value === 'string' &&
flags.value.includes('s')
) ||
(
flags.type === 'TemplateLiteral' &&
flags.quasis.some(({value: {raw}}) => raw.includes('s'))
)
)
) {
context.report(node, `RegExp "s" flag is not supported in ${badBrowser}`)

@@ -11,0 +25,0 @@ }

2

package.json
{
"name": "eslint-plugin-escompat",
"version": "2.1.2",
"version": "2.1.3",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

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