New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-react-native

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-native - npm Package Compare versions

Comparing version 2.3.2 to 3.0.1

2

index.js

@@ -36,3 +36,3 @@ /* eslint-disable global-require */

all: {
plugin: [
plugins: [
'react-native',

@@ -39,0 +39,0 @@ ],

@@ -14,2 +14,8 @@ /**

const conflictMessage = 'IOS and Android components can\'t be mixed';
const iosPathRegex = context.options[0] && context.options[0].iosPathRegex
? new RegExp(context.options[0].iosPathRegex)
: /\.ios\.js$/;
const androidPathRegex = context.options[0] && context.options[0].androidPathRegex
? new RegExp(context.options[0].androidPathRegex)
: /\.android\.js$/;

@@ -41,7 +47,7 @@ function getName(node) {

if (propName.includes('IOS') && !filename.endsWith('.ios.js')) {
if (propName.includes('IOS') && !filename.match(iosPathRegex)) {
context.report(node, containsAndroidAndIOS ? conflictMessage : iosMessage);
}
if (propName.includes('Android') && !filename.endsWith('.android.js')) {
if (propName.includes('Android') && !filename.match(androidPathRegex)) {
context.report(node, containsAndroidAndIOS ? conflictMessage : androidMessage);

@@ -76,2 +82,13 @@ }

module.exports.schema = [];
module.exports.schema = [{
type: 'object',
properties: {
androidPathRegex: {
type: 'string',
},
iosPathRegex: {
type: 'string',
},
},
additionalProperties: false,
}];

@@ -36,4 +36,4 @@

this.styleSheets[styleSheetName] = this
.styleSheets[styleSheetName]
.filter(property => property.key.name !== styleSheetProperty);
.styleSheets[styleSheetName]
.filter(property => property.key.name !== styleSheetProperty);
}

@@ -164,7 +164,7 @@ };

const styleReferenceContainers = node
.expression
.elements;
.expression
.elements;
return astHelpers.collectStyleObjectExpressionFromContainers(
styleReferenceContainers
styleReferenceContainers
);

@@ -186,7 +186,7 @@ } else if (node && node.expression) {

const styleReferenceContainers = node
.expression
.elements;
.expression
.elements;
return astHelpers.collectColorLiteralsFromContainers(
styleReferenceContainers
styleReferenceContainers
);

@@ -206,3 +206,3 @@ }

objectExpressions = objectExpressions
.concat(astHelpers.getStyleObjectExpressionFromNode(node));
.concat(astHelpers.getStyleObjectExpressionFromNode(node));
});

@@ -217,3 +217,3 @@

colorLiterals = colorLiterals
.concat(astHelpers.getColorLiteralsFromNode(node));
.concat(astHelpers.getColorLiteralsFromNode(node));
});

@@ -220,0 +220,0 @@

{
"name": "eslint-plugin-react-native",
"version": "2.3.2",
"version": "3.0.1",
"author": "Tom Hastjarjanto <tom@intellicode.nl>",

@@ -26,14 +26,14 @@ "description": "React Native specific linting rules for ESLint",

"devDependencies": {
"babel-eslint": "7.2.1",
"coveralls": "2.13.0",
"eslint": "^3.17.0",
"eslint-config-airbnb": "14.1.0",
"babel-eslint": "7.2.3",
"coveralls": "2.13.1",
"eslint": "^4.3.0",
"eslint-config-airbnb": "15.1.0",
"eslint-plugin-import": "^2.0.0",
"eslint-plugin-jsx-a11y": "4.0.0",
"eslint-plugin-react": "6.10.3",
"istanbul": "0.4.4",
"mocha": "3.2.0"
"eslint-plugin-jsx-a11y": "5.1.0",
"eslint-plugin-react": "7.0.1",
"istanbul": "0.4.5",
"mocha": "3.4.1"
},
"peerDependencies": {
"eslint": "^3.17.0"
"eslint": "^3.17.0 || ^4.0.0"
},

@@ -40,0 +40,0 @@ "keywords": [

@@ -5,2 +5,4 @@

[![Greenkeeper badge](https://badges.greenkeeper.io/Intellicode/eslint-plugin-react-native.svg)](https://greenkeeper.io/)
[![Maintenance Status][status-image]][status-url] [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][deps-image]][deps-url] [![Coverage Status][coverage-image]][coverage-url] [![Code Climate][climate-image]][climate-url] [![BCH compliance][bettercode-image]][bettercode-url]

@@ -7,0 +9,0 @@

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