eslint-plugin-boundaries 5.1.0-beta.1 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/config.js +3 -0
- package/package.json +1 -1
package/dist/configs/config.js
CHANGED
|
@@ -33,6 +33,9 @@ function renamePluginRules(rules, pluginName = plugin_1.PLUGIN_NAME) {
|
|
|
33
33
|
const allowedPrefixes = [plugin_1.PLUGIN_NAME, pluginName];
|
|
34
34
|
// Return the same rules objects, but converting plugin default rule keys with provided plugin name
|
|
35
35
|
return Object.entries(rules).reduce((acc, [key, value]) => {
|
|
36
|
+
if (!key.includes("/")) {
|
|
37
|
+
throw new Error(`Invalid rule key "${key}". When using createConfig, all rules must belong to eslint-plugin-boundaries. You can prefix them with the original plugin name "${plugin_1.PLUGIN_NAME}/", or with the provided plugin name "${pluginName}/".`);
|
|
38
|
+
}
|
|
36
39
|
const splittedRuleKey = key.split("/");
|
|
37
40
|
const rulePrefix = splittedRuleKey[0];
|
|
38
41
|
const ruleName = splittedRuleKey[1];
|