Skip to content

viamrobotics/js-config

Repository files navigation

Viam Shared JS/TS Config

Shared configuration for JavaScript and TypeScript tools.

Libraries

Tool NPM Module Version
ESLint @viamrobotics/eslint-config eslint version
ESLint + Svelte @viamrobotics/eslint-config-svelte eslint-svelte version
Prettier @viamrobotics/prettier-config prettier version
Prettier + Svelte @viamrobotics/prettier-config-svelte prettier-svelte version
TypeScript @viamrobotics/typescript-config typescript version

Actions

For usages with GitHub Actions CI

Setup

Install Node.js, pnpm, and development dependencies

- name: Setup Node.js
  uses: viamrobotics/js-config/.github/actions/setup
  with:
    node-version: '20'
Option Description Default
node-version Which Node.js version to install 20
registry-url Configure a registry URL for publish Unset
install-dependencies Run pnpm install true

Publish

Publish a package to npm and add a tag to the repository.

Note

Prefer pnpm publish --recursive if you are publishing packages from a monorepo.

- name: Publish to npm
  uses: viamrobotics/js-config/.github/actions/publish
  with:
    package: 'packages/cool-lib'
    token: ${{ secrets.NPM_TOKEN }}
Option Description Default
package Path to package.json or directory to publish Required
token npm auth token Required

Contributing

Node.js v18 or higher is required to develop on this repository. To get started, clone the repository and install the project's development dependencies. .

git clone https://github.com/viamrobotics/js-config.git
cd js-config
corepack enable
pnpm install

Once your development dependencies are installed, you can verify that all checks and tests are passing:

# run all checks and builds
pnpm all

# lint and check formatting
pnpm lint

# resolve fixable lints and autoformat
pnpm format

# check and build types
pnpm build

Releasing

Modules in this repository are continuously deployed to npm from the main branch. To trigger a release, create a commit that bumps version in one or more package.json files and create a pull request to merge that commit into main.

About

Common configuration for JS/TS tooling

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •