JS Doc is displaying description wierdly - jsdoc

Problem
I am busy writing out a tutorial for myself about jenkins and I am using jsdoc to do it.
anyways I noticed on the homepage that the section that reads the Readme.md is displaying very strangely.
jsdoc.json
{
"source": {
"include": ["src"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(node_modules/|docs)_"
},
"plugins": ["plugins/markdown"],
"tags": {
"allowUnknownTags": true,
"dictionaries": ["jsdoc","closure"]
},
"templates": {
"cleverLinks": true,
"monospaceLinks": true
},
"opts":{
"recurse": true,
"destination": "./docs/",
"tutorials": "./tutorials",
"readme": "README.md"
}
}
README.md
# LearningJenkins
## Tutorials
<!-- [Link to tutorials](https://codenameninja.github.io/LearningJenkins/) -->

Related

Nuxt.js static app is loading indefinitely

I just finished a Nuxt.js project, and I want to deploy it on a web server. So, I executed the command nuxt generate to have a static app. Before this, everything was working perfectly, but now nothing is working : the page is loading indefinitely with a rotating black and gray round in the center of the page.
Here is a picture
EDIT:
I am hosting my app on OVHcloud, and here is a public repo of my app : https://github.com/maximehamou/public.mh-info.fr.
Here is my nuxt.config.js
export default {
// Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
ssr: false,
target: "static",
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: "Accueil | MH info",
htmlAttrs: {
lang: "fr",
},
meta: [
{ charset: "utf-8" },
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ hid: "description", name: "description", content: "" },
{ name: "format-detection", content: "telephone=no" },
],
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
script: [{ src: "https://kit.fontawesome.com/048c7a73f1.js/" }],
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ["./css/general.css"],
server: {
port: 4000,
},
};
Here is my package.json
{
"name": "mh-info.fr",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate",
"sass": "sass -w scss:css"
},
"dependencies": {
"buttercms": "^1.2.9",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"sass": "^1.54.9",
"vue": "^2.6.14",
"vue-server-renderer": "^2.6.14",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0"
}
}
Update regarding my latest changes on a cloned version of your project.
I achieved to have something properly working here: https://kissu-makes-great-sites.netlify.app/fr/tous-les-articles
Main conclusion is that there is a LOT of things to fix/improve on.
You're not writing your app as you should with Vue (even less in a Nuxt way).
There is too much to cover into a single response, so I recommend that you ping me on Twitter, Discord or by email if you want a more in-depth explanation/mentoring on how to fix all of this.
PS: I speak french, lived there for 20 years. 🇫🇷

When I copy an API response to a js file in vscode, it puts everything in double quotes

In chrome devtools, when I hover over the preview of a response from a REST API call and click 'copy value', then I paste that value in a json file, it looks as I expect. When I paste that value in a js file, it does not look like I expect. What this is 'supposed' to look like may be irrelevant, I NEED it to look like test-file.json for it to work in my tests. I do not see a prettier rc config file.
Ex) test-file.json
{
type: 'mover',
id: 888,
organization_id: null
}
Ex) test-file.js
{
"type": "mover",
"id: 888,
"organization_id: null
}
I do not want prettier or vscode to put the key in my key value pair in double quotes. It should have no quotes. This doesn't work unless I painstakingly manually edit it.
My settings json looks like this:
{
"redhat.telemetry.enabled": true,
//"editor.codeActionsOnSave": {
// "source.fixAll.eslint": true
//},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"git.confirmSync": false,
"git.ignoreRebaseWarning": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"diffEditor.ignoreTrimWhitespace": false,
"terminal.integrated.profiles.linux": {
"bash": {
"path": "bash",
"icon": "terminal-bash"
},
"zsh": {
"path": "zsh"
},
"fish": {
"path": "fish"
},
"tmux": {
"path": "tmux",
"icon": "terminal-tmux"
},
"pwsh": {
"path": "pwsh",
"icon": "terminal-powershell"
}
},
"html.completion.attributeDefaultValue": "empty",
}
My eslintrc.js looks like this:
module.exports = {
extends: ['../../.eslintrc', 'next', 'plugin:cypress/recommended'],
parserOptions: {
warnOnUnsupportedTypeScriptVersion: false,
},
overrides: [
{
files: ['./cypress/**/*/*.{tsx,ts,js,jsx}'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true },
],
},
},
],
};
In Preferences/Settings I have:
Javascript Preferences: Quote Style to "auto"
Typescript preferences: Quote Style to "auto"
I tried setting Editor: Auto Closing Quotes to never
My coworker can copy and paste values from REST responses all day and he does not have to manually edit anything. What in his settings is different?
It sounds like VS Code thinks you are editing JSON. You can manually set the type of file using the menu:
See how in the bottom right mine says Plain Text? Yours likely says JSON. Click that to open the menu you see at the top and then search for Javascript. That should fix it.

How to configure single folder's settings in vscode workspace

vscode document
The document told me that:
The concept of a workspace enables VS Code to:
Configure settings that only apply to a specific folder or folders but not others.
but I can not find the config method in the document.
I'm trying to configure settings that only apply to a specific folder but not others.
I've tried the configuration below, but no one validated it, does anybody know how to config that?
{
"folders": [
{
"path": "smart_claim"
},
{
"path": "claim-libaries",
"settings": {
"typescript.validate.enable": false,
"javascript.validate.enable": false
}
},
{
"path": "health-claim"
},
{
"path": "pet-claim"
},
{
"path": "xhb-claim"
}
],
"settings": {
"typescript.validate.enable": true,
"javascript.validate.enable": true
}
}
{
"folders": [
{
"path": "smart_claim"
},
{
"path": "claim-libaries",
"typescript.validate.enable": false,
"javascript.validate.enable": false
},
{
"path": "health-claim"
},
{
"path": "pet-claim"
},
{
"path": "xhb-claim"
}
],
"settings": {
"typescript.validate.enable": true,
"javascript.validate.enable": true
}
}

Using a different .eslintrc config file for typescript and javascript in VSCode?

I have a project with both JS and TS files (and JSX/TSX). I have a separate .eslintrc.json file for JS vs. TS. I'd like to be able to tell VSCode which eslint config file to use depending on the file extension.
Tried putting the settings in settings.json under the [typescript] field but that didn't work.
I think it should be possible to use 1 file and overrides option:
.eslintrc.js
module.exports = {
"root": true,
"plugins": ["#typescript-eslint"],
"rules": {
// JavaScript rules
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"parser": "#typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": [
"#typescript-eslint"
],
"rules": {
// TypeScript rules
}
}
]
}
And changing workspace settings:
"eslint.validate": [
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
]

Using Airbnb's JavaScript styling guide in Eclipse without Babel

How can I use the Airbnb JavaScript styling guide without using any additional tools? I already installed Tern (Tern IDE) for my Eclipse oxygen. I downloaded the latest release of the eslint-config-airbnb-base-v12.0.1 and selected under
Project -> Properties -> Tern ->Validation -> ESLint the .eslintrc file from the release. My Tern configuration is stored in a .tern-project file:
{
"ecmaVersion": 6,
"plugins": {
"guess-types": {
},
"outline": {
},
"eslint": {
"configFile": "C:\\dev\\workspace\\pyqt_web\\eslint-config-airbnb-base\\.eslintrc"
},
"browser-extension": {
},
"bootstrap": {
}
},
"libs": [
"browser",
"jquery"
]
}
The .eslintrc looks like:
{
"extends": "./index.js",
"rules": {
// disable requiring trailing commas because it might be nice to revert to
// being JSON at some point, and I don't want to make big changes now.
"comma-dangle": 0
},
}
and index.js:
module.exports = {
extends: [
'./rules/best-practices',
'./rules/errors',
'./rules/node',
'./rules/style',
'./rules/variables',
'./rules/es6',
'./rules/imports',
].map(require.resolve),
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
rules: {
strict: 'error',
},
};
From here i dont know how to go further. I would expect, that i get new warning which match these of airbnb style guide. Would this work for js code in html files?