Socket
Socket
Sign inDemoInstall

bob-group-frontend-coding-standards

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bob-group-frontend-coding-standards - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

index.js

@@ -161,3 +161,3 @@ "use strict";

// CRITERIA: Page component file name should follow the pattern <SomePageName>Page.tsx
const pageComponentFileNamePattern = /^[A-Z][A-Za-z]*\Page\.tsx$/;
const pageComponentFileNamePattern = /^[A-Z][A-Za-z0-9]*\Page\.tsx$/;
if (!pageComponentFileNamePattern.test(file)) {

@@ -169,3 +169,3 @@ errors.incorrectComponentFileNames.push({ file });

// CRITERIA: Component file name should follow the pattern <SomeComponentName>.tsx
const componentFileNamePattern = /^[A-Z][A-Za-z]*\.tsx$/;
const componentFileNamePattern = /^[A-Z][A-Za-z0-9]*\.tsx$/;
if (!componentFileNamePattern.test(file)) {

@@ -177,3 +177,3 @@ errors.incorrectComponentFileNames.push({ file });

// CRITERIA: Component name should be upper camel case
const componentNamePattern = /function\s+([a-zA-Z]*)\(/;
const componentNamePattern = /function\s+([a-zA-Z0-9]*)\(/;
let match = componentNamePattern.exec(data);

@@ -180,0 +180,0 @@ if (match) {

@@ -200,3 +200,3 @@ const fs = require("fs");

// CRITERIA: Page component file name should follow the pattern <SomePageName>Page.tsx
const pageComponentFileNamePattern = /^[A-Z][A-Za-z]*\Page\.tsx$/;
const pageComponentFileNamePattern = /^[A-Z][A-Za-z0-9]*\Page\.tsx$/;

@@ -208,3 +208,3 @@ if (!pageComponentFileNamePattern.test(file)) {

// CRITERIA: Component file name should follow the pattern <SomeComponentName>.tsx
const componentFileNamePattern = /^[A-Z][A-Za-z]*\.tsx$/;
const componentFileNamePattern = /^[A-Z][A-Za-z0-9]*\.tsx$/;

@@ -218,3 +218,3 @@ if (!componentFileNamePattern.test(file)) {

// CRITERIA: Component name should be upper camel case
const componentNamePattern = /function\s+([a-zA-Z]*)\(/;
const componentNamePattern = /function\s+([a-zA-Z0-9]*)\(/;
let match = componentNamePattern.exec(data);

@@ -221,0 +221,0 @@ if (match) {

{
"name": "bob-group-frontend-coding-standards",
"version": "1.0.1",
"version": "1.0.2",
"description": "Script to check that frontend code follows coding standards",

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

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