Skip to content

Instantly share code, notes, and snippets.

View matthewaubert's full-sized avatar

Matthew Aubert matthewaubert

View GitHub Profile
@ManonLef
ManonLef / ESLint-and-Prettier-Workflow-VSCode.md
Created May 17, 2023 08:54
a workflow to set up ESLint and Prettier in VSCode

Workflow ESLint and Prettier VSCode Updated: feb 2023

Setting up Prettier

  1. npm install --save-dev --save-exact prettier in the repo you’re working on so on a per project basis
  2. echo {}> .prettierrc.json to create a file that is needed to recognise this repo uses prettier
  3. create a .prettierignore file with touch .prettierignore and put files to be ignored in it based on your ESLintignore and/or gitignore file (gitignore would be recommended to copy over)
  4. install Prettier extension in VSCode to be able to format using a shortcut or set it up to run on save etc

For more info on setting up a gitignore file: https://www.freecodecamp.org/news/gitignore-file-how-to-ignore-files-and-folders-in-git/

@jherax
jherax / configure.md
Last active June 13, 2024 18:10
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

Upload images to GitHub

  1. Create a new issue on GitHub.

  2. Drag an image into the comment field.

  3. Wait for the upload process to finish.

  4. Copy the URL and use it in your Markdown files on GitHub.

@chranderson
chranderson / nvmCommands.js
Last active June 28, 2024 23:08
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node