bob-group-frontend-coding-standards
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28756