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

eslint-plugin-pagecall-test

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-pagecall-test - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

17

dist/rules/not-use-global-pagecall-in-stores.js
"use strict";
const tslib_1 = require("tslib");
const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
const path_1 = (0, tslib_1.__importDefault)(require("path"));
function parseFilename(filename) {
var ext = path_1.default.extname(filename);
return {
dir: path_1.default.dirname(filename),
base: path_1.default.basename(filename),
ext: ext,
name: path_1.default.basename(filename, ext),
};
}
const rule = experimental_utils_1.ESLintUtils.RuleCreator(str => 'temp')({

@@ -28,8 +17,4 @@ defaultOptions: [],

create: context => {
const root = context.options[1];
const filename = context.getFilename();
const absoluteFilename = path_1.default.resolve(filename);
const parsed = parseFilename(absoluteFilename);
const [, relativePath] = parsed.dir.split(root);
if (relativePath === null || relativePath === void 0 ? void 0 : relativePath.includes(`states\/stores`))
if (!filename.includes('states/stores'))
return {};

@@ -36,0 +21,0 @@ return {

5

package.json
{
"name": "eslint-plugin-pagecall-test",
"version": "1.0.7",
"version": "1.0.8",
"main": "./dist/index.js",

@@ -10,3 +10,4 @@ "dependencies": {

"scripts": {
"build": "tsc -p tsconfig.json"
"build": "tsc -p tsconfig.json",
"dev": "yarn build -w"
},

@@ -13,0 +14,0 @@ "devDependencies": {

import { ESLintUtils } from '@typescript-eslint/experimental-utils';
import path from 'path';
function parseFilename(filename: string) {
var ext = path.extname(filename);
return {
dir: path.dirname(filename),
base: path.basename(filename),
ext: ext,
name: path.basename(filename, ext),
};
}
const rule = ESLintUtils.RuleCreator(str => 'temp')({

@@ -29,8 +17,4 @@ defaultOptions: [],

create: context => {
const root = context.options[1];
const filename = context.getFilename();
const absoluteFilename = path.resolve(filename);
const parsed = parseFilename(absoluteFilename);
const [, relativePath] = parsed.dir.split(root);
if (relativePath?.includes(`states\/stores`)) return {};
if (!filename.includes('states/stores')) return {};
return {

@@ -37,0 +21,0 @@ Identifier: node => {

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