Index of every page on this site: llms.txt
All skills
fubits1 avatar

/js-config

@a024d57
by Iljafubits1/svelte-skills11 stars
2
Run it yourself

Use when editing ESLint, Prettier, Stylelint, PostCSS, or Svelte config files. Use when adding or removing linting plugins, resolving formatter conflicts, auditing JS/TS toolchain configuration, or deciding whether a config package is needed.

Use this Skill: https://skilld.dev/gh/fubits1/svelte-skills/js-config

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈63 tokens for metadata: the name and description. ≈764 when used: this file. ≈1.7k more on demand in 1 file.

Description uses 3.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈254 characters, or 3.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

JS Config

Actionable decisions for JS/TS toolchain configuration.

ESLint + Prettier: What To Do

Scenario: ESLint and Prettier conflict on formatting

  1. Run pnpm exec eslint-config-prettier src/some-file.js
  2. If conflicts found, add eslint-config-prettier. See eslint-prettier.md for flat config setup.
  3. If no conflicts, ESLint config has no formatting rules. Nothing to fix.

Scenario: Should I add/keep eslint-config-prettier?

  • Only needed if ESLint has active formatting rules (indent, quotes, semi, comma-dangle, etc.)
  • Modern recommended configs enable zero formatting rules
  • Legacy configs (airbnb, standard) enable many, so you need it
  • Verify: pnpm exec eslint-config-prettier src/some-file.js

Scenario: Knip/audit flags eslint-config-prettier as unused

  • If not imported in eslint.config.js, it has zero effect. Safe to remove.
  • If imported but CLI checker finds no conflicts, safe to remove.

Three different packages: know which is which

Package What it does When to use
eslint-config-prettier Turns OFF ESLint formatting rules that clash with Prettier When ESLint config has formatting rules active
eslint-plugin-prettier Runs Prettier inside ESLint as a linting rule Rarely, slower, worse editor DX. Prefer running Prettier separately.
svelte.configs.prettier Built into eslint-plugin-svelte, turns off Svelte-specific formatting rules When using eslint-plugin-svelte with Prettier

Full research, flat config code examples, and sources: eslint-prettier.md

Svelte Config vs Vite Config vs Astro Config

Three config files touch Svelte/Vite behavior. Know which one owns what.

File What goes here NOT here
svelte.config.js Svelte compiler options, preprocessors (vitePreprocess), inspector toggle Vite plugins
astro.config.mjs under vite.plugins Vite plugins that transform imports (SVG-as-component, YAML, devtools) Svelte compiler options
vite.config.js Only in pure Vite/SvelteKit projects. Astro owns Vite config via astro.config.mjs

Scenario: Adding a Vite plugin (e.g. @poppanator/sveltekit-svg) to an Astro project

Goes in astro.config.mjs under vite.plugins, NOT in svelte.config.js:

// astro.config.mjs
import svg from '@poppanator/sveltekit-svg'

export default defineConfig({
  vite: {
    plugins: [svg()]
  }
})

@poppanator/sveltekit-svg works with any Vite+Svelte project despite the name. It transforms import Icon from './icon.svg' into Svelte components.

Scenario: Enabling Svelte inspector

Goes in svelte.config.js under vitePlugin, NOT in astro/vite config:

// svelte.config.js
export default {
  vitePlugin: { inspector: true }
}

Scenario: Adding preprocessors (SCSS in Svelte, etc.)

Goes in svelte.config.js via vitePreprocess:

import { vitePreprocess } from '@astrojs/svelte'
export default { preprocess: vitePreprocess() }

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts4mo3 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill provides configuration advice and snippets for JavaScript toolchains such as ESLint, Prettier, Svelte, and Astro. It uses standard diagnostic commands and references well-known community packages.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: LOW · No issues

Signed by skilld at a024d57. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Activeupdated 5 months ago
user-invocable
true

README badge

README badge for fubits1/svelte-skills/js-config