Skip to content

Getting started

Tools

To get started with a JavaScript/TypeScript project you will need some basic tools.

  • Node.js - JavaScript runtime, includes npm. Also covers Yarn and pnpm setup.
  • IDE / Editors - VS Code and Zed setup with Vue/Nuxt extensions.
  • Git - Version control commands and Beaulieu workflow.

Git — Beaulieu setup

Before working with our repositories you need to be added to the organization by an administrator. Your GitHub account must have 2FA enabled and an SSH key linked.

Configure SSH key

  1. On your local computer run:
sh
ssh-keygen -t ed25519 -C "your_email@example.com"
  1. You can leave the passphrase empty by pressing ENTER
  2. On Windows navigate to %userprofile%/.ssh in Explorer
  3. If there isn't a config file, create it
  4. Open it with a text editor and add:
txt
Host github.com
    User git
    Hostname github.com
    PreferredAuthentications publickey
    IdentityFile ~/.ssh/id_ed25519
  1. Open id_ed25519.pub and copy the content
  2. Go to your GitHub account settings and click SSH and GPG keys
  3. Click New SSH key, give it a title, paste the contents and click Add SSH key

Add project to GitHub

There are 2 ways to add a project to GitHub: initialize it in GitHub and clone it locally, or push an existing project.

Create in GitHub

  1. Go to our organization and click New
  2. Fill out the form and make sure the repository is private
  3. Initialize with a README, choose a .gitignore template (Node)
  4. Don't select a license and click Create repository
  5. Click Code, copy the URL, then on your computer run:
sh
git clone {your repository url}

Push existing repository to GitHub

  1. Initialize a git repo in your project folder:
sh
git init
  1. Go to our organization and click New
  2. Fill out the form, make sure the repository is private
  3. Don't initialize with a README or .gitignore
  4. Don't select a license and click Create repository
  5. In your project folder run:
sh
git remote add origin {your repository url}
git add .
git commit -am "First commit"
git push -u origin master

ESLint

ESLint statically analyzes your code to find problems. For editor integration and auto-fix on save, see IDE / Editors.

Antfu

We use Antfu's eslint config which is configured for TypeScript, JavaScript, Vue and Nuxt. It uses flat config by default and auto-detects your stack.

To install in your project:

sh
pnpm add -D eslint @antfu/eslint-config
yarn
sh
yarn add -D eslint @antfu/eslint-config
npm
sh
npm install -D eslint @antfu/eslint-config

Then create eslint.config.mjs in the root of your project:

js
import antfu from '@antfu/eslint-config'

export default antfu()

Typescript vs Javascript

TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale. It adds additional syntax to JavaScript to support a tighter integration with your editor and catches errors early.

What's next

Then decide if you are making a frontend or a backend project.

Released under the MIT License.