eslint-plugin-is-story-prefix
Advanced tools
Comparing version 0.0.0 to 0.0.1
@@ -7,3 +7,11 @@ module.exports = { | ||
type: "problem", | ||
schema: [] | ||
schema: [{ | ||
type: "object", | ||
properties: { | ||
customPrefix: { | ||
type: "string" | ||
} | ||
}, | ||
additionalProperties: false | ||
}] | ||
}, | ||
@@ -15,3 +23,3 @@ create(context) { | ||
const fileName = fileNamePath.split("/")[fileNamePath.split("/").length - 1] | ||
if(!fileName.startsWith("STORY_") && fileName.endsWith("stories.jsx")) { | ||
if(!fileName.startsWith( context.options[0].customPrefix || "STORY_") && fileName.endsWith("stories.jsx")) { | ||
context.report({ | ||
@@ -18,0 +26,0 @@ node, |
{ | ||
"name": "eslint-plugin-is-story-prefix", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "A eslint plugin to check if filename has a prefix", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
3129
53