eslint-plugin-obsidian
Version:
ESLint rules for Obsidian
29 lines • 1.2 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.noCircularDependenciesGenerator = void 0;
const utils_1 = require("@typescript-eslint/utils");
const createRule_1 = require("./createRule");
const context_1 = require("../../dto/context");
const createRule = utils_1.ESLintUtils.RuleCreator((name) => `https://wix-incubator.github.io/obsidian/docs/documentation/meta/eslint#${name}`);
const noCircularDependenciesGenerator = () => {
return createRule({
create: (context) => {
return (0, createRule_1.create)(new context_1.Context(context));
},
name: 'no-circular-dependencies',
meta: {
docs: {
description: 'Dependencies must be defined in the graph or its subgraphs.',
recommended: 'strict',
},
messages: {
'no-circular-dependencies': 'Circular dependency detected starting from {{firstDependency}}: {{path}}',
},
schema: [],
type: 'problem',
},
defaultOptions: [],
});
};
exports.noCircularDependenciesGenerator = noCircularDependenciesGenerator;
//# sourceMappingURL=index.js.map