Skill Wiki v0.1.0

Marketplace / Browse / web-style

web-style

Domain plugin for JavaScript style corpora. Covers naming conventions, variable declarations, function shape, object and array idioms, module layout, and core readability principles drawn from Airbnb and Google style guides.

v0.1.0 20 atoms 33 tags 3 axes

Atom counts by kind

KindCount
rule 14
anti-pattern 4
principle 2

Tag vocabulary

Words a brief might contain that signal this domain.

javascriptjstypescriptstylestyle-guidelintlintingeslintairbnbgooglenamingvariabledeclarationconstletvarcamelcasepascalcasefunctionarrow-functiondefault-parametersspreadrestobjectarraydestructuringimportexportmodulees6readabilityclarityconsistency

Retrieval axes

Domain-specific dimensions used by Prime's retrieval scoring.

scope · 9 matches

The language surface the rule governs — declarations, names, functions, objects, arrays, modules.

namingdeclarationfunctionobjectarraymoduleimportexportcontrol-flow
severity · 3 matches

How firmly a style guide enforces the rule — error (always), warning (almost always), suggestion (preference).

errorwarningsuggestion
language · 6 matches

Which language family the atom applies to. JavaScript-specific atoms apply to TypeScript by inheritance unless otherwise noted.

javascripttypescriptjsxtsxes6es2015-plus

Sample atoms

anti-pattern @web-style

Import For Side Effects

Writing `import './polyfills'` or `import 'register-handlers'` to trigger code execution at module load.…

web-style ↗ 2 · q4.0
anti-pattern @web-style

Mutable Named Export

Declaring `export let counter = 0` (or similar) and then reassigning it elsewhere in the module so importers' references update with each change.…

web-style ↗ 2 · q4.0
anti-pattern @web-style

Reassign Parameters

Treating a parameter as a mutable local — assigning to it, mutating its properties when the caller did not opt in, or using it as scratch space.…

web-style ↗ 3 · q4.0
anti-pattern @web-style

Use Var

Using `var` to declare any binding in modern JavaScript or TypeScript. `var` is hoisted to the enclosing function, has no temporal-dead-zone protection, and is silently re-declarable — three properties that exist only be…

web-style ↗ 2 · q4.0
principle @web-style

Clarity Over Cleverness

When a clever idiom and an obvious idiom both work, pick the obvious one. Save the cleverness for the cases where it earns its keep — performance hot paths backed by benchmarks, language-level constraints that allow no o…

web-style ↗ 3 · q4.0
principle @web-style

Consistency Within Codebase

Local consistency outranks personal preference. If the existing code uses arrow functions everywhere, the new arrow function is correct even if you would have written `function`. If the codebase imports from `.…

web-style ↗ 3 · q4.0
rule @web-style

Arrow Functions For Callbacks

When the function is anonymous and passed inline as an argument or assigned to a binding, use an arrow function.…

web-style ↗ 3 · q4.0
rule @web-style

Camelcase Variables And Functions

Local variables, parameters, function names, methods, and non-static class fields are written in `camelCase` — first word lowercase, every subsequent word capitalised, no underscores or hyphens.…

web-style ↗ 3 · q4.0
rule @web-style

Default Parameters Not Mutate Args

Express defaults in the parameter list with `=`. Do not patch missing values inside the body with reassignment, `||`, or by writing into `arguments`.…

web-style ↗ 2 · q4.0
rule @web-style

Descriptive Not Abbreviated Names

Identifier length follows information content. Use whole words that describe the role of the binding.…

web-style ↗ 2 · q4.0
rule @web-style

Destructure Objects And Arrays

When a function reads more than one property of an object — its parameter, its return value, or any local — pull them out with destructuring.…

web-style ↗ 2 · q4.0
rule @web-style

Group Const Then Let

Within a scope, list every `const` binding before any `let` binding. The reader can then scan the top of the scope and immediately see which bindings are fixed and which will mutate, without re-checking each line.

web-style ↗ 2 · q4.0

See all 20 atoms in web-style →