Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Commit

Permalink
Add URL to rule documentation to the metadata
Browse files Browse the repository at this point in the history
ESLint v4.15.0 added an official location for rules to store a URL to
their documentation in the rule metadata in eslint/eslint#9788. This
adds the URL to all the existing rules so anything consuming them can
know where their documentation is without having to resort to external
packages to guess.
  • Loading branch information
Arcanemagus committed Mar 7, 2018
1 parent 7b2fe65 commit 6de74dc
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 20 deletions.
3 changes: 2 additions & 1 deletion rules/consistent-compose.js
Expand Up @@ -31,7 +31,8 @@ module.exports = {
schema,
docs: {
description: 'Enforce a consistent composition method.',
recommended: 'off'
recommended: 'off',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/consistent-compose.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/consistent-name.js
Expand Up @@ -56,7 +56,8 @@ module.exports = {
schema,
docs: {
description: 'Enforce a consistent name for Lodash.',
recommended: ['error', '_']
recommended: ['error', '_'],
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/consistent-name.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-argumentless-calls.js
Expand Up @@ -26,7 +26,8 @@ module.exports = {
meta: {
docs: {
description: 'Forbid argument-less calls of Lodash methods.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-argumentless-calls.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-chain.js
Expand Up @@ -26,7 +26,8 @@ module.exports = {
meta: {
docs: {
description: 'Forbid the use of [`_.chain`](https://lodash.com/docs#chain)',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-chain.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-extraneous-args.js
Expand Up @@ -43,7 +43,8 @@ module.exports = {
meta: {
docs: {
description: 'No extraneous arguments to methods with a fixed arity.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-extraneous-args.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-extraneous-function-wrapping.js
Expand Up @@ -85,7 +85,8 @@ module.exports = {
meta: {
docs: {
description: 'Avoid unnecessary function wrapping.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-extraneous-function-wrapping.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-extraneous-iteratee-args.js
Expand Up @@ -36,7 +36,8 @@ module.exports = {
meta: {
docs: {
description: 'No extraneous parameters in iteratees.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-extraneous-iteratee-args.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-for-each.js
Expand Up @@ -42,7 +42,8 @@ module.exports = {
schema,
docs: {
description: ' Forbid the use of [`_.forEach`](https://lodash.com/docs#forEach)',
recommended: 'off'
recommended: 'off',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-for-each.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-partial-of-curried.js
Expand Up @@ -25,7 +25,8 @@ module.exports = {
meta: {
docs: {
description: 'No use of [`_.partial`](https://lodash.com/docs#partial) on curried Lodash methods.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-partial-of-curried.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-single-composition.js
Expand Up @@ -32,7 +32,8 @@ module.exports = {
meta: {
docs: {
description: 'Enforce at least two methods arguments for composition methods.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-single-composition.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-submodule-destructuring.js
Expand Up @@ -44,7 +44,8 @@ module.exports = {
meta: {
docs: {
description: 'Forbid destructuring of Lodash submodules.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-submodule-destructuring.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/no-unused-result.js
Expand Up @@ -38,7 +38,8 @@ module.exports = {
meta: {
docs: {
description: 'Enforce that the result of a Lodash method call gets used.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/no-unused-result.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-compact.js
Expand Up @@ -31,7 +31,8 @@ module.exports = {
meta: {
docs: {
description: 'Prefer [`_.compact`](https://lodash.com/docs#compact) over [`_.filter`](https://lodash.com/docs#filter) with identity function.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-compact.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-composition-grouping.js
Expand Up @@ -51,7 +51,8 @@ module.exports = {
meta: {
docs: {
description: 'Prefer grouping similar methods in composition methods.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-composition-grouping.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-constant.js
Expand Up @@ -56,7 +56,8 @@ module.exports = {
schema,
docs: {
description: 'Prefer [`_.constant`](https://lodash.com/docs#constant) over functions returning literals.',
recommended: ['error', {arrowFunctions: false}]
recommended: ['error', {arrowFunctions: false}],
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-constant.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-flat-map.js
Expand Up @@ -56,7 +56,8 @@ module.exports = {
meta: {
docs: {
description: 'Prefer [`_.flatMap`](https://lodash.com/docs#flatMap) over consecutive [`_.map`](https://lodash.com/docs#map) and [`_.flatten`](https://lodash.com/docs#flatten).',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-flat-map.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-get.js
Expand Up @@ -54,7 +54,8 @@ module.exports = {
schema,
docs: {
description: 'Prefer [`_.get`](https://lodash.com/docs#get) over multiple `&&`.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-get.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/prefer-identity.js
Expand Up @@ -40,7 +40,8 @@ module.exports = {
schema,
docs: {
description: 'Prefer [`_.identity`](https://lodash.com/docs#identity) over functions returning their argument.',
recommended: ['error', {arrowFunctions: false}]
recommended: ['error', {arrowFunctions: false}],
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/prefer-identity.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/preferred-alias.js
Expand Up @@ -64,7 +64,8 @@ module.exports = {
schema,
docs: {
description: 'Limit the use of aliases.',
recommended: 'off'
recommended: 'off',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/preferred-alias.md'
}
}
};
3 changes: 2 additions & 1 deletion rules/use-fp.js
Expand Up @@ -31,7 +31,8 @@ module.exports = {
meta: {
docs: {
description: 'Use lodash/fp instead of Lodash.',
recommended: 'error'
recommended: 'error',
url: 'https://github.com/jfmengels/eslint-plugin-lodash-fp/tree/master/docs/rules/use-fp.md'
}
}
};

0 comments on commit 6de74dc

Please sign in to comment.