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

eslint-plugin-quintoandar

Package Overview
Dependencies
Maintainers
6
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-quintoandar - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

rules/tests/no-themeprovider-import.test.js

2

package.json
{
"name": "eslint-plugin-quintoandar",
"version": "1.5.4",
"version": "1.5.5",
"description": "An eslint-plugin for PWA-Tenants custom rules",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,2 +0,3 @@

const notAllowedPath = 'assets/themes/';
const firstPath = 'assets/themes/';
const secondPath = 'assets/values/theme';

@@ -9,5 +10,6 @@ const reportText = `

module.exports = function noThemeImport(context) {
const checkString = (node, string) => node.indexOf(string) >= 0;
return {
ImportDeclaration(node) {
if (node.source.value.indexOf(notAllowedPath) >= 0) {
if (checkString(node.source.value, firstPath) || checkString(node.source.value, secondPath)) {
context.report({

@@ -14,0 +16,0 @@ node,

@@ -32,5 +32,5 @@

ruleTester.run('no-theme-import', rule, {
valid: [
{ code: "import withTheme from '@material-ui/core/styles/withTheme'" },
],
valid: [{
code: "import withTheme from '@material-ui/core/styles/withTheme'"
}],
invalid: [{

@@ -40,8 +40,14 @@ code: "import theme from 'assets/themes/blue'",

}, {
code: "import theme from 'block-party/assets/themes/light-v1'",
code: "import theme from 'block-party/assets/themes/blue'",
errors,
}, {
code: "import theme from 'block-party/assets/themes/blue'",
code: "import theme from 'block-party/assets/themes/green'",
errors,
}, {
code: "import theme from 'block-party/assets/values/theme'",
errors,
}, {
code: "import theme from 'assets/values/theme'",
errors,
}]
});
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