eslint-plugin-feature-modules
Advanced tools
Comparing version 1.0.1 to 1.0.2
const path = require('path'); | ||
const lintingErrorMessage = "Importing of feature module components (outside of [feature]/index.js) is not allowed" | ||
const isRequireFunction = node => { | ||
@@ -79,3 +81,3 @@ return ( | ||
if (isDeepNonIndexImport(modulePathParts)) { | ||
context.report(node, 'Cannot request module thats too deep!'); | ||
context.report(node, lintingErrorMessage); | ||
} | ||
@@ -82,0 +84,0 @@ }; |
{ | ||
"name": "eslint-plugin-feature-modules", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Plugin for eslint rules that apply to feature modules directory structure", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
const { RuleTester } = require('eslint'); | ||
const rule = require('../../../../lib/rules/no-deep-module-require'); | ||
const path = require('path') | ||
const path = require('path'); | ||
@@ -13,4 +13,4 @@ const config = { | ||
const normalizePath = filePath => { | ||
return path.resolve(filePath) | ||
} | ||
return path.resolve(filePath); | ||
}; | ||
@@ -22,3 +22,3 @@ const ruleOptions = [{ moduleFolderName: 'module' }]; | ||
const invalid = testConfig => { | ||
testConfig.errors = [{ message: 'Cannot request module thats too deep!' }]; | ||
testConfig.errors = [{ message: 'Importing of feature module components (outside of [feature]/index.js) is not allowed' }]; | ||
@@ -25,0 +25,0 @@ return testConfig; |
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
99372
212