Spatie Javascript

spatie/guidelines-skills/resources/boost/skills/spatie-javascript

by spatiec31006972d0b8c8db71e7b75c1b1d505b479023dMITListed Oct 9, 2026Updated Oct 9, 2026

Apply Spatie's JavaScript coding standards for any task that creates, edits, reviews, refactors, or formats JavaScript or TypeScript code; use for variable declarations, comparisons, functions, destructuring, and Prettier configuration to align with Spatie's JS conventions.

Instructions onlySoftware Development
AI-generated overview

Applies Spatie's JavaScript and TypeScript coding standards to code creation, editing, review, refactoring and formatting.

What it does
This skill guides an agent to apply Spatie's JavaScript coding conventions when working on JavaScript, TypeScript, Vue single-file components, or Prettier configuration. It directs the agent to read a bundled reference file of guidelines and apply Prettier settings first, then the language rules relevant to the change. It covers rules such as four-space indentation, a 120-character print width, single quotes, preferring const, strict equality, and destructuring. It produces code and configuration aligned with those conventions rather than a separate artifact.
When to use it
Use it for any JavaScript or TypeScript coding task, including creating, editing, reviewing, refactoring, or formatting code. It is also meant for work on .js, .ts, .jsx, .tsx, or .vue files and for configuring Prettier in a project. It is not intended for PHP, Laravel, CSS-only files, or server configuration.
Requirements
No scripts or special tooling are required; it is instructions only. It relies on a bundled reference file, references/spatie-javascript-guidelines.md, which the agent reads. No credentials or network access are mentioned.

Spatie JavaScript Guidelines

Overview

Apply Spatie's JavaScript coding standards to keep JS/TS code consistent and readable.

When to Activate

  • Activate this skill for any JavaScript or TypeScript coding work.
  • Activate this skill when working on .js, .ts, .jsx, .tsx, or .vue files.
  • Activate this skill when configuring Prettier for a project.

Scope

  • In scope: JavaScript, TypeScript, Vue single-file components, Prettier configuration.
  • Out of scope: PHP, Laravel, CSS-only files, server configuration.

Workflow

  1. Identify the JavaScript, TypeScript, Vue, or Prettier artifact being changed.
  2. Read references/spatie-javascript-guidelines.md and focus on the relevant sections.
  3. Apply Prettier configuration first, then the language rules relevant to the change.

Core Rules (Summary)

  • Use four-space indentation, a 120-character print width, and single quotes.
  • Prefer const, use let only for reassignment, and never use var.
  • Avoid abbreviated variable names except in clear single-line arrow functions.
  • Always use strict equality and cast values before comparing different types.
  • Use function for declarations and arrow functions for anonymous or terse functions when appropriate.
  • Keep functions pure, limit this, and use shorthand object methods.
  • Prefer object and array destructuring.

References

  • references/spatie-javascript-guidelines.md

Source and attribution

Source:spatie/guidelines-skillsinresources/boost/skills/spatie-javascriptat commitc310069

License: MIT

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal