diff --git a/lint/.gitignore b/lint/.gitignore index 6b6bf3270b..0d22081b3b 100644 --- a/lint/.gitignore +++ b/lint/.gitignore @@ -1,4 +1,3 @@ /dist/ /coverage/ /node-modules/ -/docs/ diff --git a/lint/README.md b/lint/README.md index 1ea1fd5b65..61f508df79 100644 --- a/lint/README.md +++ b/lint/README.md @@ -5,8 +5,8 @@ Custom ESLint rules for DSpace Angular peculiarities. ## Documentation The rules are split up into plugins by language: -- [TypeScript rules](./docs/ts/index.md) -- [HTML rules](./docs/html/index.md) +- [TypeScript rules](../docs/lint/ts/index.md) +- [HTML rules](../docs/lint/html/index.md) > Run `yarn docs:lint` to generate this documentation! diff --git a/lint/generate-docs.ts b/lint/generate-docs.ts index ade2edea65..ccc58994a2 100644 --- a/lint/generate-docs.ts +++ b/lint/generate-docs.ts @@ -28,7 +28,7 @@ function lazyEJS(path: string, data: object) { return templates.get(path)(data); } -const docsDir = join('lint', 'docs'); +const docsDir = join('docs', 'lint'); const tsDir = join(docsDir, 'ts'); const htmlDir = join(docsDir, 'html'); diff --git a/lint/src/util/templates/index.ejs b/lint/src/util/templates/index.ejs index 7ce8c15d6b..3acfadf226 100644 --- a/lint/src/util/templates/index.ejs +++ b/lint/src/util/templates/index.ejs @@ -1,4 +1,4 @@ -[DSpace ESLint plugins](../../README.md) > <%= plugin.language %> rules +[DSpace ESLint plugins](../../../lint/README.md) > <%= plugin.language %> rules <% rules.forEach(rule => { %> - [`<%= plugin.name %>/<%= rule.name %>`](./rules/<%= rule.name %>.md)<% if (rule.meta?.docs?.description) {%>: <%= rule.meta.docs.description.split('\n')[0] %><% }%> diff --git a/lint/src/util/templates/rule.ejs b/lint/src/util/templates/rule.ejs index ac5df5815d..489fa0348a 100644 --- a/lint/src/util/templates/rule.ejs +++ b/lint/src/util/templates/rule.ejs @@ -1,11 +1,11 @@ -[DSpace ESLint plugins](../../../README.md) > [<%= plugin.language %> rules](../index.md) > `<%= plugin.name %>/<%= rule.name %>` +[DSpace ESLint plugins](../../../../lint/README.md) > [<%= plugin.language %> rules](../index.md) > `<%= plugin.name %>/<%= rule.name %>` _______ <%- rule.meta.docs?.description %> _______ -[Source code](../../../src/rules/<%- plugin.name.replace('dspace-angular-', '') %>/<%- rule.name %>.ts) +[Source code](../../../../lint/src/rules/<%- plugin.name.replace('dspace-angular-', '') %>/<%- rule.name %>.ts) ### Examples