Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jsdoc throw errors #2

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ root = true

[*]
charset = utf-8
end_of_line = lf
end_of_line = crlf
indent_size = 2
indent_style = space
insert_final_newline = true
Expand Down
21 changes: 19 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
{
"extends": "canonical",
"root": true,
"env": {
"browser": false
},
"parser": "vue-eslint-parser",
"parserOptions": {
"sourceType": "module",
"parser": "babel-eslint"
},
"plugins": ["vue","jsdoc"],
"extends": ["plugin:vue/recommended", "canonical"],
"overrides": [{
"files": ".ncurc.js",
"parserOptions": {
Expand All @@ -17,11 +23,22 @@
"strict": ["error", "global"]
}
}],
"env": {
"browser": true,
"node": true
},
"rules": {
"linebreak-style": "off",
"array-element-newline": 0,
"filenames/match-regex": 0,
"prefer-named-capture-group": 0,
"import/extensions": 0,
"unicorn/prevent-abbreviations": 0
"unicorn/prevent-abbreviations": 0,


"jsdoc/require-description": ["error", { "descriptionStyle": "tag" }], // NOT Recommended: was 0
"jsdoc/require-param": "error", // Recommended
"jsdoc/require-param-description": "error" // Recommended

}
}
16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lodash": "^4.17.21",
"regextras": "^0.8.0",
"semver": "^7.3.5",
"spdx-expression-parse": "^3.0.1"
"spdx-expression-parse": "^3.0.1",
"vue": "^2.6.14"
},
"description": "JSDoc linting rules for ESLint.",
"devDependencies": {
Expand All @@ -27,12 +28,15 @@
"@babel/register": "^7.15.3",
"@hkdobrev/run-if-changed": "^0.3.1",
"@typescript-eslint/parser": "^4.31.0",
"babel-eslint": "10.1.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.3.4",
"cross-env": "^7.0.3",
"eslint": "7.32.0",
"eslint-config-canonical": "^27.0.0",
"eslint-plugin-jsdoc": "^36.1.0",
"eslint-plugin-vue": "7.18.0",
"gitdown": "^3.1.4",
"glob": "^7.1.7",
"husky": "^7.0.2",
Expand All @@ -42,7 +46,8 @@
"open-editor": "^3.0.0",
"rimraf": "^3.0.2",
"semantic-release": "^17.4.7",
"typescript": "^4.4.2"
"typescript": "^4.4.2",
"vue-eslint-parser": "^7.11.0"
},
"engines": {
"node": "^12 || ^14 || ^16"
Expand All @@ -63,7 +68,7 @@
],
"license": "BSD-3-Clause",
"main": "./dist/index.js",
"name": "eslint-plugin-jsdoc",
"name": "eslint-plugin-jsdoc-fork",
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0"
},
Expand All @@ -77,8 +82,9 @@
"create-readme": "babel-node ./src/bin/generateReadme.js",
"create-rule": "babel-node ./src/bin/generateRule.js",
"install-offline": "npm install --prefer-offline --no-audit",
"lint-fix": "eslint --report-unused-disable-directives --fix ./src ./test",
"lint": "eslint --report-unused-disable-directives --ignore-pattern '!.ncurc.js' ./src ./test .ncurc.js",
"lint-fix": "eslint --report-unused-disable-directives --fix ./src ./test --ext .js,.vue",
"lint": "eslint --report-unused-disable-directives --ignore-pattern '!.ncurc.js' --ext .vue ./src .ncurc.js ",
"lintReport": "eslint --report-unused-disable-directives --ignore-pattern '!.ncurc.js' ./src .ncurc.js --ext .vue --fix",
"lint-arg": "eslint --report-unused-disable-directives",
"test-cov": "cross-env BABEL_ENV=test nyc mocha --parallel --reporter dot --recursive --require @babel/register --timeout 12000",
"test-no-cov": "cross-env BABEL_ENV=test mocha --parallel --reporter dot --recursive --require @babel/register --timeout 12000",
Expand Down
19 changes: 19 additions & 0 deletions src/errorToReport/AppToReport.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div>HELLO WORLD</div>
</template>

<script>

export default {
computed: {
/**
* @description TESTSTETSTST
* @param {string} arg - lorem
* @return {string} - someDescription
*/
isForTestingLint (arg) {
return arg;
},
},
};
</script>
28 changes: 28 additions & 0 deletions src/errorToReport/toReport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const toReport = {

/**
* @description TESTSTETSTST
* @param {string} arg - lorem
* @returns {boolean} - true if window.location.host starts by "dev-", false in every other case
*/
isDevBackoffice (arg) {
// eslint-disable-next-line no-console
console.log(arg);
},

/**
* @description Abstraction of Bootstrap Vue Toast notification
* @see https://bootstrap-vue.org/docs/components/toast
* @param {object} config - The config object
* @param {object} config.vue - The Vue instance
* @param {string} config.msg - the message that will be displayed in BO
* @param {string} [config.variant=null] - Can be one of those [primary,secondary,success,info,warning,danger]
* @param {string} [config.title='BO - Notification'] - The toast title
*/
toastNotification ({vue, msg, variant, title}) {
// eslint-disable-next-line no-console
console.log(vue, msg, variant, title);
},
};

export default toReport;