spatie-javascript

Applies Spatie's JavaScript coding standards when writing, reviewing, or formatting JavaScript and TypeScript code.

Updated Nov 29, 2025
One-click install
npx skills add https://github.com/achyutkneupane/Blog-Kit --skill spatie-javascript-achyutkneupane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spatie-javascript
Source: https://github.com/achyutkneupane/Blog-Kit/tree/main/.ai/skills/spatie-javascript
Command: npx skills add https://github.com/achyutkneupane/Blog-Kit --skill spatie-javascript-achyutkneupane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? JavaScript and TypeScript codebases often become inconsistent when multiple contributors use different conventions for variable declarations, comparisons, functions, and formatting. This Skill enforces Spatie's published JavaScript guidelines so every piece of JS/TS code follows one consistent, readable standard. ## Core Features & Use Cases - Code Style Enforcement: Applies rules for const over let, strict === comparisons, descriptive variable names, and proper function declaration styles. - Destructuring & Method Syntax: Promotes array/object destructuring and shorthand object method syntax over verbose alternatives. - Prettier Configuration Guidance: Defines Spatie's Prettier conventions including 4-space indentation, 120-character print width, and single quotes. - Use Case: When refactoring a Vue component or reviewing a TypeScript pull request, activate this Skill to ensure the code matches Spatie's conventions before committing. ## Quick Start Review this JavaScript file and refactor it to follow Spatie's JavaScript coding guidelines.

Frequently Asked Questions about spatie-javascript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I apply Spatie JavaScript coding standards to my project?

Activate this Skill whenever creating, editing, or reviewing JavaScript or TypeScript code. It enforces Spatie's conventions for variable declarations, comparisons, functions, destructuring, and Prettier configuration automatically during the coding task.

What Prettier configuration does Spatie use for JavaScript?

Spatie uses 4-space indentation set via .editorconfig rather than Prettier's default of 2, a print width of 120 characters instead of 80, and single quotes for strings.

Does this Skill work with TypeScript and Vue files?

Yes, the guidelines apply to .js, .ts, .jsx, .tsx, and .vue single-file components. PHP, Laravel, CSS-only files, and server configuration are explicitly out of scope.

When should I use arrow functions versus the function keyword?

Use the function keyword for named functions to signal intent clearly. Use arrow functions for terse single-line operations, anonymous callbacks, and higher-order functions, but avoid them when you need this context such as in jQuery event handlers.

Why does Spatie require strict equality in JavaScript comparisons?

Strict equality with === avoids unexpected type coercion bugs that occur with ==. If the type is uncertain, cast the value first, for example with parseInt, before comparing.