Skip to content

Commit

Permalink
docs(links): convert jsdoc to md links
Browse files Browse the repository at this point in the history
  • Loading branch information
gregswindle committed Feb 18, 2018
1 parent 259df3a commit 63e64c8
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 26 deletions.
4 changes: 2 additions & 2 deletions lib/crc/crc-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ class CrcClass {
* @param {Object} [params] - A parameter object that sets all of
* the CrcClass's properties.
* @param {SourceCode} [params.code] - The ESLint
* {@link http://bit.ly/2kfR79f `SourceCode`} object.
* [`SourceCode`](http://bit.ly/2kfR79f) object.
* @param {string} [params.filePath] - The physcical path the source code
* file.
* @param {CrcMeta} [params.meta] - Information about the SourceCode.
* @param {string} [params.name] - The source code identifier of the class or
* object to be modeled.
* @param {array<ASTNode>} [params.references] - ESTree
* {@link https://goo.gl/yTwW1m#node-objects ASTNodes} with locations.
* [`ASTNodes`](https://goo.gl/yTwW1m#node-objects) with locations.
* @param {CrcClass} [params.superClass] - The `prototype` of the object being
* modeled. Defaults to `null`.
* @example
Expand Down
4 changes: 2 additions & 2 deletions lib/crc/crc-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ const defaultConstructorParams = {
class CrcMeta {
/**
* Collect metadata for CrcClasses, ESTree
* {@link https://goo.gl/yTwW1m#node-objects ASTNodes}, and ESLint Contexts.
* [ASTNodes](https://goo.gl/yTwW1m#node-objects), and ESLint Contexts.
*
* @param {Object} [params] - All possible parameters.
* @param {Context} [params.context] - The ESLint Context object.
* @param {string} [params.description] - A summary of the object's purpose.
* @param {string} [params.filePath] - The full path to the source code file.
* @param {string} [params.kind] - The
* {@link https://goo.gl/yTwW1m#node-objects ASTNode} type.
* [`ASTNodes`](https://goo.gl/yTwW1m#node-objects) type.
* @param {array.<ASTNode>} [params.references] - A list of dependents.
* @param {object} [params.toc] - Table of content links for template
* rendering.
Expand Down
2 changes: 1 addition & 1 deletion lib/crc/crc-responsibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class CrcResponsibility {

/**
* A factory method that generates a
* {@link https://github.com/eslint/doctrine doctrine} AST and
* [`doctrine`](https://github.com/eslint/doctrine) AST and
* responsibility string (if found).
*
* @param {ASTNode} node - An ESLint representation of ECMAScript programming
Expand Down
14 changes: 7 additions & 7 deletions lib/crc/node-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const prototypable = require("./prototypable");
const {get} = require("lodash");

/**
* A utility object that manages {@link https://goo.gl/yTwW1m#node-objects ASTNode} identity and parsing.
* A utility object that manages [`ASTNode`](https://goo.gl/yTwW1m#node-objects) identity and parsing.
*/

class NodeManager {
Expand All @@ -15,7 +15,7 @@ class NodeManager {
* a hash (#) to identify specific objects.
* @param {SourceCode} sourceCode An `eslint.SourceCode` object.
*
* @returns {Map.<string, ASTNode>} A Map of all {@link https://goo.gl/yTwW1m#node-objects ASTNodes}, referencable by
* @returns {Map.<string, ASTNode>} A Map of all [`ASTNodes`](https://goo.gl/yTwW1m#node-objects), referencable by
* source file.
*/

Expand All @@ -32,11 +32,11 @@ class NodeManager {
}

/**
* @static getNamespace - Provides a unique key for {@link https://goo.gl/yTwW1m#node-objects ASTNodes} in source code
* @static getNamespace - Provides a unique key for [`ASTNodes`](https://goo.gl/yTwW1m#node-objects) in source code
* files.
*
* @param {string} filePath - The path to the file with source code.
* @param {ASTNode} node - The {@link https://goo.gl/yTwW1m#node-objects ASTNode} within a source code file.
* @param {ASTNode} node - The [`ASTNode`](https://goo.gl/yTwW1m#node-objects) within a source code file.
*
* @returns {string|null} The source code file path followed by #Identifier.name
* (if applicable).
Expand All @@ -50,11 +50,11 @@ class NodeManager {
}

/**
* @static getNodeName - Provides the name of an {@link https://goo.gl/yTwW1m#node-objects ASTNode}.
* @static getNodeName - Provides the name of an [`ASTNode`](https://goo.gl/yTwW1m#node-objects).
*
* @param {ASTNode} node - The {@link https://goo.gl/yTwW1m#node-objects ASTNode} within a source code file.
* @param {ASTNode} node - The [`ASTNode`](https://goo.gl/yTwW1m#node-objects) within a source code file.
*
* @returns {string} The name of an {@link https://goo.gl/yTwW1m#node-objects ASTNode}, prepended by `/#`.
* @returns {string} The name of an [`ASTNode`](https://goo.gl/yTwW1m#node-objects), prepended by `/#`.
*/

static getNodeName (node) {
Expand Down
8 changes: 4 additions & 4 deletions lib/crc/prototypable.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ const getScopeOf = (context) => {
/**
* Detect the prototype of an object whenever possible.
*
* {@link https://goo.gl/yTwW1m#node-objects ASTNode}.
* [`ASTNode`](https://goo.gl/yTwW1m#node-objects).
*
* @name prototypable
* @exports eslint-plugin-crc/crc/prototypable
Expand All @@ -170,7 +170,7 @@ const getScopeOf = (context) => {

const prototypable = {
/**
* Returns a prototype {@link https://goo.gl/yTwW1m#node-objects ASTNode}.
* Returns a prototype [`ASTNode`](https://goo.gl/yTwW1m#node-objects).
*
* @param {ASTNode} node - A node to check. This node type is one of
* `Program`, `FunctionDeclaratikon`, `FunctionExpression`, and
Expand All @@ -181,11 +181,11 @@ const prototypable = {
getPrototypeOf,

/**
* Returns the {@link https://goo.gl/AXjJ84#scope-interface Scope} for
* Returns the [`Scope`](https://goo.gl/AXjJ84#scope-interface) for
* a given Context.
*
* @param {CrcContext} context - A CrcContext instance.
* @returns {@link https://goo.gl/AXjJ84#scope-interface Scope} The scope.
* @returns [`Scope`](https://goo.gl/AXjJ84#scope-interface) The scope.
*/

getScopeOf
Expand Down
18 changes: 9 additions & 9 deletions lib/crc/source-code-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const toSourceString =

/**
* A helper object that generates ESLint
* {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} objects.
* [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) objects.
*
* @hideconstructor
* @static
Expand All @@ -29,8 +29,8 @@ class SourceCodeFactory {
* @param {string} src - The raw source code.
* @param {AST} ast - An Abstract Syntax Tree.
*
* @returns {SourceCode} An ESLint {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode}
* object.
* @returns {SourceCode} An ESLint
* [SourceCode](https://goo.gl/Gp7Xjs#sourcecode) object.
*/

static create (src, ast) {
Expand All @@ -47,20 +47,20 @@ class SourceCodeFactory {
}

/**
* A {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} NullObject.
* A [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) NullObject.
*
* 🔒 **Note:** `NullSourceCode` instances can **only** be created
* using the static getter `SourceCode.nullObject`.
*
* @static
* @type NullSourceCode
* @returns {NullSourceCode} A
* {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} NullObject.
* [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) NullObject.
*/

static get nullObject () {
/**
* An ESLint {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} NullObject.
* An ESLint [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) NullObject.
*
* 🔒 **Note:** `NullSourceCode` instances can **only** be created using the
* static getter `SourceCode.nullObject`.
Expand All @@ -70,7 +70,7 @@ class SourceCodeFactory {
* @inner
* @example
* const nullSourceCode = SourceCode.nullObject;
* @see {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode}
* @see [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode)
*/

class NullSourceCode extends SourceCode {}
Expand All @@ -83,15 +83,15 @@ class SourceCodeFactory {

/**
* @static parse - Generate an ESLint
* {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} object from an ESLint
* [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) object from an ESLint
* {@link https://goo.gl/XMjsa1#the-result-object Result}
* object's `filePath`.
*
* @param {Result} result - An ESLint
* {@link https://goo.gl/XMjsa1#the-result-object Result} object.
*
* @returns {SourceCode} An ESLint
* {@link https://goo.gl/Gp7Xjs#sourcecode SourceCode} object.
* [`SourceCode`](https://goo.gl/Gp7Xjs#sourcecode) object.
*
* @see ESLint formatter
* {@link https://goo.gl/XMjsa1#the-result-object Result}
Expand Down
9 changes: 9 additions & 0 deletions lib/formatters/md/.templates/en/crc-page-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,12 @@
## CRC Models

<%= results %>

---

Thanks for using [`eslint-plugin-crc`](https://github.com/gregswindle/eslint-plugin-crc#eslint-plugin-crc)!

[![PRs Welcome][makeapullrequest-image]][makeapullrequest-url]

[makeapullrequest-image]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[makeapullrequest-url]: http://makeapullrequest.com
2 changes: 1 addition & 1 deletion lib/formatters/md/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** Eslint security/detect-non-literal-fs-filename: ["warn"] */

/**
* Format ESTree {@link https://goo.gl/yTwW1m#node-objects ASTNodes}
* Format ESTree [`ASTNodes`](https://goo.gl/yTwW1m#node-objects)
* as CRC Models.
*
* @module eslint-plugin-crc/formatters/md
Expand Down

0 comments on commit 63e64c8

Please sign in to comment.