Skip to content

Commit

Permalink
add jsdocs sub-config
Browse files Browse the repository at this point in the history
  • Loading branch information
pqt committed Sep 11, 2023
1 parent f8e7e57 commit aab4fc9
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 13 deletions.
4 changes: 2 additions & 2 deletions commonjs.cjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('eslint').Linter.Config} */
export default {
extends: ["./index.js"],
module.exports = {
extends: ["./index.cjs"],

env: {
commonjs: true,
Expand Down
5 changes: 3 additions & 2 deletions index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ module.exports = {
"import/order": [
"error",
{
pathGroups: [{ pattern: "node:**", group: "builtin" }],
"newlines-between": "always-and-inside-groups",
alphabetize: { order: "asc", caseInsensitive: true },
groups: [["builtin", "external"], "internal", ["parent", "sibling"], "index", "object", "type"],
"newlines-between": "always",
pathGroups: [{ pattern: "node:**", group: "builtin" }],
},
],
},
Expand Down
64 changes: 64 additions & 0 deletions jsdocs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ["./index.cjs"],

overrides: [
{
files: ["**.js", "**.cjs", "**.mjs"],
extends: ["plugin:jsdoc/recommended-typescript-flavor-error"],
plugins: ["jsdoc"],

rules: {
// "jsdoc/check-access": "error", // Recommended
"jsdoc/check-alignment": "error", // Recommended
// "jsdoc/check-examples": "error",
// "jsdoc/check-indentation": "error",
// "jsdoc/check-line-alignment": "error",
// "jsdoc/check-param-names": "error", // Recommended
// "jsdoc/check-property-names": "error", // Recommended
// "jsdoc/check-syntax": "error",
// "jsdoc/check-tag-names": "error", // Recommended
// "jsdoc/check-types": "error", // Recommended
// "jsdoc/check-values": "error", // Recommended
// "jsdoc/empty-tags": "error", // Recommended
// "jsdoc/implements-on-classes": "error", // Recommended
// "jsdoc/informative-docs": "error",
// "jsdoc/match-description": "error",
// "jsdoc/multiline-blocks": "error", // Recommended
// "jsdoc/no-bad-blocks": "error",
// "jsdoc/no-blank-block-descriptions": "error",
// "jsdoc/no-defaults": "error",
// "jsdoc/no-missing-syntax": "error",
// "jsdoc/no-multi-asterisks": "error", // Recommended
// "jsdoc/no-restricted-syntax": "error",
// "jsdoc/no-types": "error",
// "jsdoc/no-undefined-types": "error", // Recommended
"jsdoc/require-asterisk-prefix": "error",
"jsdoc/require-description": "error",
// "jsdoc/require-description-complete-sentence": "error",
// "jsdoc/require-example": "error",
// "jsdoc/require-file-overview": "error",
// "jsdoc/require-hyphen-before-param-description": "error",
// "jsdoc/require-jsdoc": "error", // Recommended
// "jsdoc/require-param": "error", // Recommended
// "jsdoc/require-param-description": "error", // Recommended
// "jsdoc/require-param-name": "error", // Recommended
// "jsdoc/require-param-type": "error", // Recommended
// "jsdoc/require-property": "error", // Recommended
// "jsdoc/require-property-description": "error", // Recommended
// "jsdoc/require-property-name": "error", // Recommended
// "jsdoc/require-property-type": "error", // Recommended
// "jsdoc/require-returns": "error", // Recommended
// "jsdoc/require-returns-check": "error", // Recommended
// "jsdoc/require-returns-description": "error", // Recommended
// "jsdoc/require-returns-type": "error", // Recommended
"jsdoc/require-throws": "error",
// "jsdoc/require-yields": "error", // Recommended
// "jsdoc/require-yields-check": "error", // Recommended
// "jsdoc/sort-tags": "error",
// "jsdoc/tag-lines": "error", // Recommended
// "jsdoc/valid-types": "error", // Recommended
},
},
],
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@forcir/eslint-config",
"version": "1.0.3",
"version": "1.1.0",
"private": false,
"description": "Shared configuration for a consistent experience using JavaScript.",
"license": "MIT",
Expand All @@ -27,6 +27,7 @@
"devDependencies": {
"@forcir/prettier-config": "1.0.0",
"eslint": "8.46.0",
"eslint-plugin-jsdoc": "46.5.1",
"prettier": "3.0.0"
},
"peerDependencies": {
Expand Down
55 changes: 47 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aab4fc9

Please sign in to comment.