@mytechtoday/augment-extensions 1.7.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -8
- package/augment-extensions/coding-standards/bash/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/bash/metadata.json +21 -0
- package/augment-extensions/coding-standards/c/metadata.json +50 -0
- package/augment-extensions/coding-standards/css/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/css/metadata.json +30 -0
- package/augment-extensions/coding-standards/go/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/go/metadata.json +57 -0
- package/augment-extensions/coding-standards/html/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/html/metadata.json +25 -0
- package/augment-extensions/coding-standards/html-css-js/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/html-css-js/metadata.json +40 -0
- package/augment-extensions/coding-standards/js/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/js/metadata.json +37 -0
- package/augment-extensions/coding-standards/php/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/php/metadata.json +35 -0
- package/augment-extensions/coding-standards/powershell/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/powershell/metadata.json +33 -0
- package/augment-extensions/coding-standards/python/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/python/metadata.json +38 -0
- package/augment-extensions/coding-standards/react/CHANGELOG.md +51 -0
- package/augment-extensions/coding-standards/react/metadata.json +31 -0
- package/augment-extensions/coding-standards/typescript/CHANGELOG.md +39 -0
- package/augment-extensions/coding-standards/typescript/README.md +248 -19
- package/augment-extensions/coding-standards/typescript/VERSION +2 -0
- package/augment-extensions/coding-standards/typescript/examples/biome.json +199 -0
- package/augment-extensions/coding-standards/typescript/examples/eslint-flat-config.js +166 -0
- package/augment-extensions/coding-standards/typescript/examples/monorepo-config/README.md +47 -0
- package/augment-extensions/coding-standards/typescript/examples/monorepo-config/package.json +37 -0
- package/augment-extensions/coding-standards/typescript/examples/monorepo-config/pnpm-workspace.yaml +5 -0
- package/augment-extensions/coding-standards/typescript/examples/monorepo-config/tsconfig.base.json +50 -0
- package/augment-extensions/coding-standards/typescript/examples/monorepo-config/turbo.json +47 -0
- package/augment-extensions/coding-standards/typescript/examples/vitest-setup.ts +198 -0
- package/augment-extensions/coding-standards/typescript/metadata.json +46 -0
- package/augment-extensions/coding-standards/typescript/module.json +25 -7
- package/augment-extensions/coding-standards/typescript/rules/architecture.md +1096 -0
- package/augment-extensions/coding-standards/typescript/rules/error-handling.md +1174 -0
- package/augment-extensions/coding-standards/typescript/rules/modern-features.md +625 -0
- package/augment-extensions/coding-standards/typescript/rules/monorepo.md +745 -0
- package/augment-extensions/coding-standards/typescript/rules/security-performance.md +850 -0
- package/augment-extensions/coding-standards/typescript/rules/testing.md +918 -0
- package/augment-extensions/coding-standards/typescript/rules/tooling.md +1071 -0
- package/augment-extensions/coding-standards/typescript/rules/type-patterns.md +750 -0
- package/augment-extensions/domain-rules/api-design/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/api-design/metadata.json +32 -0
- package/augment-extensions/domain-rules/database/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/database/metadata.json +50 -0
- package/augment-extensions/domain-rules/design/color/themes/catppuccin-latte/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/catppuccin-latte/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/catppuccin-mocha/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/catppuccin-mocha/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/dracula/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/dracula/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/gruvbox-dark/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/gruvbox-dark/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/gruvbox-light/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/gruvbox-light/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/high-contrast/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/high-contrast/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/monokai/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/monokai/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/nord/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/nord/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/one-dark/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/one-dark/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/one-light/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/one-light/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/solarized-dark/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/solarized-dark/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/solarized-light/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/solarized-light/metadata.json +18 -0
- package/augment-extensions/domain-rules/design/color/themes/tokyo-night/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/design/color/themes/tokyo-night/metadata.json +18 -0
- package/augment-extensions/domain-rules/mcp/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/mcp/metadata.json +42 -0
- package/augment-extensions/domain-rules/security/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/security/metadata.json +33 -0
- package/augment-extensions/domain-rules/seo-sales-marketing/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/seo-sales-marketing/metadata.json +40 -0
- package/augment-extensions/domain-rules/software-architecture/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/software-architecture/metadata.json +55 -0
- package/augment-extensions/domain-rules/wordpress/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/wordpress/metadata.json +42 -0
- package/augment-extensions/domain-rules/wordpress-plugin/CHANGELOG.md +51 -0
- package/augment-extensions/domain-rules/wordpress-plugin/metadata.json +70 -0
- package/augment-extensions/examples/design-patterns/CHANGELOG.md +51 -0
- package/augment-extensions/examples/design-patterns/metadata.json +29 -0
- package/augment-extensions/examples/gutenberg-block-plugin/CHANGELOG.md +51 -0
- package/augment-extensions/examples/gutenberg-block-plugin/metadata.json +26 -0
- package/augment-extensions/examples/rest-api-plugin/CHANGELOG.md +51 -0
- package/augment-extensions/examples/rest-api-plugin/metadata.json +27 -0
- package/augment-extensions/examples/woocommerce-extension/CHANGELOG.md +51 -0
- package/augment-extensions/examples/woocommerce-extension/metadata.json +27 -0
- package/augment-extensions/visual-design/metadata.json +34 -0
- package/augment-extensions/workflows/adr-support/CHANGELOG.md +51 -0
- package/augment-extensions/workflows/adr-support/metadata.json +41 -0
- package/augment-extensions/workflows/beads/CHANGELOG.md +51 -0
- package/augment-extensions/workflows/beads/metadata.json +23 -0
- package/augment-extensions/workflows/beads-integration/CHANGELOG.md +51 -0
- package/augment-extensions/workflows/beads-integration/metadata.json +30 -0
- package/augment-extensions/workflows/database/CHANGELOG.md +51 -0
- package/augment-extensions/workflows/database/metadata.json +30 -0
- package/augment-extensions/workflows/wordpress-plugin/CHANGELOG.md +51 -0
- package/augment-extensions/workflows/wordpress-plugin/metadata.json +41 -0
- package/augment-extensions/writing-standards/literature/shakespeare/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/literature/shakespeare/metadata.json +60 -0
- package/augment-extensions/writing-standards/screenplay/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/monty-python/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/monty-python/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/saturday-night-live/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/comedy-formats/saturday-night-live/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/alfred-hitchcock/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/alfred-hitchcock/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/ari-aster/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/ari-aster/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/brad-bird/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/brad-bird/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/brian-de-palma/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/brian-de-palma/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/buster-keaton/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/buster-keaton/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/christopher-nolan/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/christopher-nolan/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/clint-eastwood/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/clint-eastwood/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/coen-brothers/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/coen-brothers/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/darren-aronofsky/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/darren-aronofsky/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/david-fincher/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/david-fincher/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/david-lynch/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/david-lynch/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/denis-villeneuve/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/denis-villeneuve/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/francis-ford-coppola/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/francis-ford-coppola/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/gary-marshall/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/gary-marshall/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/george-a-romero/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/george-a-romero/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/george-lucas/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/george-lucas/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/guillermo-del-toro/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/guillermo-del-toro/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/gus-van-sant/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/gus-van-sant/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/james-ivory-ismail-merchant/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/james-ivory-ismail-merchant/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/jim-jarmusch/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/jim-jarmusch/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-carpenter/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-carpenter/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-ford/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-ford/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-huston/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-huston/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-landis/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/john-landis/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/jonathan-demme/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/jonathan-demme/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/joseph-l-mankiewicz/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/joseph-l-mankiewicz/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kathryn-bigelow/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kathryn-bigelow/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kelly-reichardt/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kelly-reichardt/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kevin-smith/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/kevin-smith/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/linda-shayne/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/linda-shayne/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/martin-scorsese/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/martin-scorsese/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/mel-brooks/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/mel-brooks/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/metadata.json +25 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/michael-curtiz/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/michael-curtiz/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/michael-mann/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/michael-mann/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/mike-nichols/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/mike-nichols/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/orson-welles/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/orson-welles/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/park-chan-wook/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/park-chan-wook/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/paul-thomas-anderson/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/paul-thomas-anderson/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/penny-marshall/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/penny-marshall/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/peter-bogdanovich/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/peter-bogdanovich/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/quentin-tarantino/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/quentin-tarantino/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/richard-linklater/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/richard-linklater/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/rob-reiner/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/rob-reiner/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-altman/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-altman/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-eggers/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-eggers/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-zemeckis/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/robert-zemeckis/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sam-peckinpah/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sam-peckinpah/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sidney-lumet/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sidney-lumet/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/spike-lee/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/spike-lee/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/stanley-donen-gene-kelly/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/stanley-donen-gene-kelly/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/stanley-kubrick/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/stanley-kubrick/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/steve-martin/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/steve-martin/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/steven-spielberg/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/steven-spielberg/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sydney-pollack/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/sydney-pollack/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/terry-gilliam/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/terry-gilliam/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/tim-burton/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/tim-burton/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/tobe-hooper/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/tobe-hooper/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/wes-anderson/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/wes-anderson/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/william-friedkin/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/directors/william-friedkin/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/films/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/films/blue-ruin/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/films/blue-ruin/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/films/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/fast-and-furious/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/fast-and-furious/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/harry-potter/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/harry-potter/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/james-bond/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/james-bond/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/john-wick/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/john-wick/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/lord-of-the-rings/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/lord-of-the-rings/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/mcu/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/mcu/metadata.json +25 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/metadata.json +25 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/star-trek/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/star-trek/metadata.json +33 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/star-wars/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/franchises/star-wars/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/metadata.json +50 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/narrative-theory/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/narrative-theory/joseph-campbell/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/narrative-theory/joseph-campbell/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/narrative-theory/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/producers/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/producers/bruckheimer-and-simpson/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/producers/bruckheimer-and-simpson/metadata.json +24 -0
- package/augment-extensions/writing-standards/screenplay/cinematic-styles/producers/metadata.json +23 -0
- package/augment-extensions/writing-standards/screenplay/genres/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/genres/metadata.json +43 -0
- package/augment-extensions/writing-standards/screenplay/metadata.json +65 -0
- package/augment-extensions/writing-standards/screenplay/styles/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/styles/metadata.json +38 -0
- package/augment-extensions/writing-standards/screenplay/themes/CHANGELOG.md +51 -0
- package/augment-extensions/writing-standards/screenplay/themes/metadata.json +47 -0
- package/cli/dist/__test_health-checker.d.ts +2 -0
- package/cli/dist/__test_health-checker.d.ts.map +1 -0
- package/cli/dist/__test_health-checker.js +4 -0
- package/cli/dist/__test_health-checker.js.map +1 -0
- package/cli/dist/__test_template-engine.d.ts +2 -0
- package/cli/dist/__test_template-engine.d.ts.map +1 -0
- package/cli/dist/__test_template-engine.js +4 -0
- package/cli/dist/__test_template-engine.js.map +1 -0
- package/cli/dist/cli.js +25 -0
- package/cli/dist/cli.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/generator/index.d.ts +8 -2
- package/cli/dist/commands/generate-shot-list/generator/index.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/generator/index.js +28 -3
- package/cli/dist/commands/generate-shot-list/generator/index.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/generator/types.d.ts +3 -0
- package/cli/dist/commands/generate-shot-list/generator/types.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/help-text.d.ts +1 -1
- package/cli/dist/commands/generate-shot-list/help-text.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/help-text.js +48 -5
- package/cli/dist/commands/generate-shot-list/help-text.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/logger/jsonl-writer.d.ts +11 -1
- package/cli/dist/commands/generate-shot-list/logger/jsonl-writer.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/logger/jsonl-writer.js +61 -1
- package/cli/dist/commands/generate-shot-list/logger/jsonl-writer.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/parser/docx-parser.d.ts +29 -0
- package/cli/dist/commands/generate-shot-list/parser/docx-parser.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/docx-parser.js +111 -0
- package/cli/dist/commands/generate-shot-list/parser/docx-parser.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/finaldraft-parser.d.ts +18 -0
- package/cli/dist/commands/generate-shot-list/parser/finaldraft-parser.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/finaldraft-parser.js +184 -0
- package/cli/dist/commands/generate-shot-list/parser/finaldraft-parser.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/index.d.ts +4 -3
- package/cli/dist/commands/generate-shot-list/parser/index.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/parser/index.js +54 -3
- package/cli/dist/commands/generate-shot-list/parser/index.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/parser/pdf-parser.d.ts +24 -0
- package/cli/dist/commands/generate-shot-list/parser/pdf-parser.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/pdf-parser.js +84 -0
- package/cli/dist/commands/generate-shot-list/parser/pdf-parser.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/rtf-parser.d.ts +28 -0
- package/cli/dist/commands/generate-shot-list/parser/rtf-parser.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/rtf-parser.js +143 -0
- package/cli/dist/commands/generate-shot-list/parser/rtf-parser.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/parser/types.d.ts +9 -6
- package/cli/dist/commands/generate-shot-list/parser/types.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list/parser/types.js.map +1 -1
- package/cli/dist/commands/generate-shot-list/style/guideline-parser.d.ts +36 -0
- package/cli/dist/commands/generate-shot-list/style/guideline-parser.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/guideline-parser.js +108 -0
- package/cli/dist/commands/generate-shot-list/style/guideline-parser.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/index.d.ts +39 -0
- package/cli/dist/commands/generate-shot-list/style/index.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/index.js +85 -0
- package/cli/dist/commands/generate-shot-list/style/index.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/style-loader.d.ts +35 -0
- package/cli/dist/commands/generate-shot-list/style/style-loader.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/style-loader.js +178 -0
- package/cli/dist/commands/generate-shot-list/style/style-loader.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/style-merger.d.ts +36 -0
- package/cli/dist/commands/generate-shot-list/style/style-merger.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/style-merger.js +123 -0
- package/cli/dist/commands/generate-shot-list/style/style-merger.js.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/types.d.ts +105 -0
- package/cli/dist/commands/generate-shot-list/style/types.d.ts.map +1 -0
- package/cli/dist/commands/generate-shot-list/style/types.js +8 -0
- package/cli/dist/commands/generate-shot-list/style/types.js.map +1 -0
- package/cli/dist/commands/generate-shot-list.d.ts +1 -0
- package/cli/dist/commands/generate-shot-list.d.ts.map +1 -1
- package/cli/dist/commands/generate-shot-list.js +44 -1
- package/cli/dist/commands/generate-shot-list.js.map +1 -1
- package/cli/dist/commands/list.d.ts +1 -0
- package/cli/dist/commands/list.d.ts.map +1 -1
- package/cli/dist/commands/list.js +21 -5
- package/cli/dist/commands/list.js.map +1 -1
- package/cli/dist/commands/upgrade.d.ts +15 -0
- package/cli/dist/commands/upgrade.d.ts.map +1 -0
- package/cli/dist/commands/upgrade.js +229 -0
- package/cli/dist/commands/upgrade.js.map +1 -0
- package/cli/dist/commands/use.d.ts +15 -0
- package/cli/dist/commands/use.d.ts.map +1 -0
- package/cli/dist/commands/use.js +180 -0
- package/cli/dist/commands/use.js.map +1 -0
- package/cli/dist/commands/version-info.d.ts +15 -0
- package/cli/dist/commands/version-info.d.ts.map +1 -0
- package/cli/dist/commands/version-info.js +194 -0
- package/cli/dist/commands/version-info.js.map +1 -0
- package/cli/dist/core/compatibility-checker.d.ts +73 -0
- package/cli/dist/core/compatibility-checker.d.ts.map +1 -0
- package/cli/dist/core/compatibility-checker.js +188 -0
- package/cli/dist/core/compatibility-checker.js.map +1 -0
- package/cli/dist/core/index.d.ts +9 -0
- package/cli/dist/core/index.d.ts.map +1 -0
- package/cli/dist/core/index.js +16 -0
- package/cli/dist/core/index.js.map +1 -0
- package/cli/dist/core/module-loader.d.ts +68 -0
- package/cli/dist/core/module-loader.d.ts.map +1 -0
- package/cli/dist/core/module-loader.js +137 -0
- package/cli/dist/core/module-loader.js.map +1 -0
- package/cli/dist/core/version-manager.d.ts +62 -0
- package/cli/dist/core/version-manager.d.ts.map +1 -0
- package/cli/dist/core/version-manager.js +157 -0
- package/cli/dist/core/version-manager.js.map +1 -0
- package/cli/dist/core/version-resolver.d.ts +63 -0
- package/cli/dist/core/version-resolver.d.ts.map +1 -0
- package/cli/dist/core/version-resolver.js +163 -0
- package/cli/dist/core/version-resolver.js.map +1 -0
- package/cli/dist/gui/app.d.ts +17 -0
- package/cli/dist/gui/app.d.ts.map +1 -0
- package/cli/dist/gui/app.js +79 -0
- package/cli/dist/gui/app.js.map +1 -0
- package/cli/dist/gui/components/preview-pane.d.ts +40 -0
- package/cli/dist/gui/components/preview-pane.d.ts.map +1 -0
- package/cli/dist/gui/components/preview-pane.js +90 -0
- package/cli/dist/gui/components/preview-pane.js.map +1 -0
- package/cli/dist/gui/components/search-filter.d.ts +26 -0
- package/cli/dist/gui/components/search-filter.d.ts.map +1 -0
- package/cli/dist/gui/components/search-filter.js +168 -0
- package/cli/dist/gui/components/search-filter.js.map +1 -0
- package/cli/dist/gui/components/status-bar.d.ts +22 -0
- package/cli/dist/gui/components/status-bar.d.ts.map +1 -0
- package/cli/dist/gui/components/status-bar.js +58 -0
- package/cli/dist/gui/components/status-bar.js.map +1 -0
- package/cli/dist/gui/components/tree-navigator.d.ts +30 -0
- package/cli/dist/gui/components/tree-navigator.d.ts.map +1 -0
- package/cli/dist/gui/components/tree-navigator.js +133 -0
- package/cli/dist/gui/components/tree-navigator.js.map +1 -0
- package/cli/dist/gui/components/version-selector.d.ts +27 -0
- package/cli/dist/gui/components/version-selector.d.ts.map +1 -0
- package/cli/dist/gui/components/version-selector.js +110 -0
- package/cli/dist/gui/components/version-selector.js.map +1 -0
- package/cli/dist/gui/hooks/use-version-loader.d.ts +25 -0
- package/cli/dist/gui/hooks/use-version-loader.d.ts.map +1 -0
- package/cli/dist/gui/hooks/use-version-loader.js +116 -0
- package/cli/dist/gui/hooks/use-version-loader.js.map +1 -0
- package/cli/dist/gui/index.d.ts +15 -0
- package/cli/dist/gui/index.d.ts.map +1 -0
- package/cli/dist/gui/index.js +39 -0
- package/cli/dist/gui/index.js.map +1 -0
- package/cli/dist/gui/layouts/main-layout.d.ts +14 -0
- package/cli/dist/gui/layouts/main-layout.d.ts.map +1 -0
- package/cli/dist/gui/layouts/main-layout.js +205 -0
- package/cli/dist/gui/layouts/main-layout.js.map +1 -0
- package/cli/dist/gui/state/navigation-state.d.ts +39 -0
- package/cli/dist/gui/state/navigation-state.d.ts.map +1 -0
- package/cli/dist/gui/state/navigation-state.js +151 -0
- package/cli/dist/gui/state/navigation-state.js.map +1 -0
- package/cli/dist/gui/state/selection-state.d.ts +36 -0
- package/cli/dist/gui/state/selection-state.d.ts.map +1 -0
- package/cli/dist/gui/state/selection-state.js +132 -0
- package/cli/dist/gui/state/selection-state.js.map +1 -0
- package/cli/dist/gui/theme.d.ts +50 -0
- package/cli/dist/gui/theme.d.ts.map +1 -0
- package/cli/dist/gui/theme.js +73 -0
- package/cli/dist/gui/theme.js.map +1 -0
- package/cli/dist/utils/help.d.ts +13 -0
- package/cli/dist/utils/help.d.ts.map +1 -0
- package/cli/dist/utils/help.js +137 -0
- package/cli/dist/utils/help.js.map +1 -0
- package/cli/dist/utils/module-system.d.ts +8 -0
- package/cli/dist/utils/module-system.d.ts.map +1 -1
- package/cli/dist/utils/module-system.js +38 -3
- package/cli/dist/utils/module-system.js.map +1 -1
- package/cli/dist/utils/validate-versioning.d.ts +43 -0
- package/cli/dist/utils/validate-versioning.d.ts.map +1 -0
- package/cli/dist/utils/validate-versioning.js +258 -0
- package/cli/dist/utils/validate-versioning.js.map +1 -0
- package/package.json +10 -1
|
@@ -0,0 +1,1071 @@
|
|
|
1
|
+
# Modern TypeScript Tooling
|
|
2
|
+
|
|
3
|
+
Comprehensive guide to modern TypeScript tooling including ESLint flat config, Biome, tsup, and Vitest with MSW.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
- [ESLint Flat Config](#eslint-flat-config)
|
|
7
|
+
- [Biome Setup](#biome-setup)
|
|
8
|
+
- [tsup Configuration](#tsup-configuration)
|
|
9
|
+
- [Vitest + MSW Setup](#vitest--msw-setup)
|
|
10
|
+
- [Tool Comparison](#tool-comparison)
|
|
11
|
+
- [Migration Guide](#migration-guide)
|
|
12
|
+
- [Best Practices](#best-practices)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ESLint Flat Config
|
|
17
|
+
|
|
18
|
+
### Overview
|
|
19
|
+
|
|
20
|
+
ESLint 9+ introduces a new "flat config" format that replaces `.eslintrc.*` files with `eslint.config.js`.
|
|
21
|
+
|
|
22
|
+
### Benefits
|
|
23
|
+
|
|
24
|
+
- **Simpler configuration** - Single file, no cascading
|
|
25
|
+
- **Better TypeScript support** - Native ESM support
|
|
26
|
+
- **Improved performance** - Faster config resolution
|
|
27
|
+
- **Type-safe** - Can use TypeScript for config
|
|
28
|
+
|
|
29
|
+
### Basic Setup
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Install ESLint 9+
|
|
33
|
+
npm install -D eslint@^9.0.0
|
|
34
|
+
|
|
35
|
+
# Install TypeScript plugin
|
|
36
|
+
npm install -D @typescript-eslint/parser @typescript-eslint/eslint-plugin
|
|
37
|
+
|
|
38
|
+
# Install additional plugins
|
|
39
|
+
npm install -D eslint-plugin-import eslint-plugin-react eslint-plugin-react-hooks
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### eslint.config.js
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
import js from '@eslint/js';
|
|
46
|
+
import typescript from '@typescript-eslint/eslint-plugin';
|
|
47
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
48
|
+
import importPlugin from 'eslint-plugin-import';
|
|
49
|
+
import react from 'eslint-plugin-react';
|
|
50
|
+
import reactHooks from 'eslint-plugin-react-hooks';
|
|
51
|
+
|
|
52
|
+
export default [
|
|
53
|
+
// Ignore patterns
|
|
54
|
+
{
|
|
55
|
+
ignores: [
|
|
56
|
+
'**/dist/**',
|
|
57
|
+
'**/build/**',
|
|
58
|
+
'**/.next/**',
|
|
59
|
+
'**/node_modules/**',
|
|
60
|
+
'**/coverage/**'
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// Base JavaScript config
|
|
65
|
+
js.configs.recommended,
|
|
66
|
+
|
|
67
|
+
// TypeScript files
|
|
68
|
+
{
|
|
69
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
70
|
+
languageOptions: {
|
|
71
|
+
parser: typescriptParser,
|
|
72
|
+
parserOptions: {
|
|
73
|
+
ecmaVersion: 'latest',
|
|
74
|
+
sourceType: 'module',
|
|
75
|
+
project: './tsconfig.json'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
plugins: {
|
|
79
|
+
'@typescript-eslint': typescript,
|
|
80
|
+
'import': importPlugin,
|
|
81
|
+
'react': react,
|
|
82
|
+
'react-hooks': reactHooks
|
|
83
|
+
},
|
|
84
|
+
rules: {
|
|
85
|
+
// TypeScript rules
|
|
86
|
+
'@typescript-eslint/no-unused-vars': ['error', {
|
|
87
|
+
argsIgnorePattern: '^_',
|
|
88
|
+
varsIgnorePattern: '^_'
|
|
89
|
+
}],
|
|
90
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
91
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
92
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
93
|
+
'@typescript-eslint/no-non-null-assertion': 'warn',
|
|
94
|
+
'@typescript-eslint/consistent-type-imports': ['error', {
|
|
95
|
+
prefer: 'type-imports',
|
|
96
|
+
fixStyle: 'inline-type-imports'
|
|
97
|
+
}],
|
|
98
|
+
|
|
99
|
+
// Import rules
|
|
100
|
+
'import/order': ['error', {
|
|
101
|
+
'groups': [
|
|
102
|
+
'builtin',
|
|
103
|
+
'external',
|
|
104
|
+
'internal',
|
|
105
|
+
'parent',
|
|
106
|
+
'sibling',
|
|
107
|
+
'index'
|
|
108
|
+
],
|
|
109
|
+
'newlines-between': 'always',
|
|
110
|
+
'alphabetize': {
|
|
111
|
+
'order': 'asc',
|
|
112
|
+
'caseInsensitive': true
|
|
113
|
+
}
|
|
114
|
+
}],
|
|
115
|
+
|
|
116
|
+
// React rules
|
|
117
|
+
'react/react-in-jsx-scope': 'off',
|
|
118
|
+
'react/prop-types': 'off',
|
|
119
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
120
|
+
'react-hooks/exhaustive-deps': 'warn'
|
|
121
|
+
},
|
|
122
|
+
settings: {
|
|
123
|
+
react: {
|
|
124
|
+
version: 'detect'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
// Test files
|
|
130
|
+
{
|
|
131
|
+
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.spec.ts', '**/*.spec.tsx'],
|
|
132
|
+
rules: {
|
|
133
|
+
'@typescript-eslint/no-explicit-any': 'off'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### TypeScript Config (eslint.config.ts)
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
import type { Linter } from 'eslint';
|
|
143
|
+
import js from '@eslint/js';
|
|
144
|
+
import typescript from '@typescript-eslint/eslint-plugin';
|
|
145
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
146
|
+
|
|
147
|
+
const config: Linter.FlatConfig[] = [
|
|
148
|
+
{
|
|
149
|
+
ignores: ['**/dist/**', '**/build/**', '**/.next/**']
|
|
150
|
+
},
|
|
151
|
+
js.configs.recommended,
|
|
152
|
+
{
|
|
153
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
154
|
+
languageOptions: {
|
|
155
|
+
parser: typescriptParser,
|
|
156
|
+
parserOptions: {
|
|
157
|
+
project: './tsconfig.json'
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
plugins: {
|
|
161
|
+
'@typescript-eslint': typescript
|
|
162
|
+
},
|
|
163
|
+
rules: {
|
|
164
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
165
|
+
'@typescript-eslint/no-explicit-any': 'warn'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
export default config;
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Running ESLint
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Lint files
|
|
177
|
+
npx eslint .
|
|
178
|
+
|
|
179
|
+
# Lint and fix
|
|
180
|
+
npx eslint . --fix
|
|
181
|
+
|
|
182
|
+
# Lint specific files
|
|
183
|
+
npx eslint src/**/*.ts
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Biome Setup
|
|
189
|
+
|
|
190
|
+
### Overview
|
|
191
|
+
|
|
192
|
+
Biome is a fast, all-in-one toolchain that replaces ESLint + Prettier with a single tool written in Rust.
|
|
193
|
+
|
|
194
|
+
### Benefits
|
|
195
|
+
|
|
196
|
+
- **10-100x faster** than ESLint + Prettier
|
|
197
|
+
- **Single tool** - Linting + formatting in one
|
|
198
|
+
- **Zero config** - Works out of the box
|
|
199
|
+
- **Better error messages** - Clear, actionable diagnostics
|
|
200
|
+
- **Import sorting** - Built-in import organization
|
|
201
|
+
|
|
202
|
+
### Installation
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
# Install Biome
|
|
206
|
+
npm install -D @biomejs/biome
|
|
207
|
+
|
|
208
|
+
# Initialize configuration
|
|
209
|
+
npx @biomejs/biome init
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### biome.json Configuration
|
|
213
|
+
|
|
214
|
+
```json
|
|
215
|
+
{
|
|
216
|
+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
|
|
217
|
+
"organizeImports": {
|
|
218
|
+
"enabled": true
|
|
219
|
+
},
|
|
220
|
+
"linter": {
|
|
221
|
+
"enabled": true,
|
|
222
|
+
"rules": {
|
|
223
|
+
"recommended": true,
|
|
224
|
+
"suspicious": {
|
|
225
|
+
"noExplicitAny": "warn",
|
|
226
|
+
"noArrayIndexKey": "warn"
|
|
227
|
+
},
|
|
228
|
+
"style": {
|
|
229
|
+
"useConst": "error",
|
|
230
|
+
"useTemplate": "warn",
|
|
231
|
+
"noNonNullAssertion": "warn"
|
|
232
|
+
},
|
|
233
|
+
"correctness": {
|
|
234
|
+
"noUnusedVariables": "error",
|
|
235
|
+
"useExhaustiveDependencies": "warn"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"formatter": {
|
|
240
|
+
"enabled": true,
|
|
241
|
+
"formatWithErrors": false,
|
|
242
|
+
"indentStyle": "space",
|
|
243
|
+
"indentWidth": 2,
|
|
244
|
+
"lineWidth": 100,
|
|
245
|
+
"lineEnding": "lf"
|
|
246
|
+
},
|
|
247
|
+
"javascript": {
|
|
248
|
+
"formatter": {
|
|
249
|
+
"quoteStyle": "single",
|
|
250
|
+
"jsxQuoteStyle": "double",
|
|
251
|
+
"trailingCommas": "es5",
|
|
252
|
+
"semicolons": "always",
|
|
253
|
+
"arrowParentheses": "always",
|
|
254
|
+
"bracketSpacing": true,
|
|
255
|
+
"bracketSameLine": false
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"json": {
|
|
259
|
+
"formatter": {
|
|
260
|
+
"enabled": true,
|
|
261
|
+
"indentWidth": 2
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"files": {
|
|
265
|
+
"ignore": [
|
|
266
|
+
"node_modules",
|
|
267
|
+
"dist",
|
|
268
|
+
"build",
|
|
269
|
+
".next",
|
|
270
|
+
"coverage",
|
|
271
|
+
"*.config.js"
|
|
272
|
+
],
|
|
273
|
+
"include": [
|
|
274
|
+
"src/**/*.ts",
|
|
275
|
+
"src/**/*.tsx",
|
|
276
|
+
"src/**/*.js",
|
|
277
|
+
"src/**/*.jsx"
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### Running Biome
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Check (lint + format check)
|
|
287
|
+
npx @biomejs/biome check .
|
|
288
|
+
|
|
289
|
+
# Check and fix
|
|
290
|
+
npx @biomejs/biome check --apply .
|
|
291
|
+
|
|
292
|
+
# Format only
|
|
293
|
+
npx @biomejs/biome format --write .
|
|
294
|
+
|
|
295
|
+
# Lint only
|
|
296
|
+
npx @biomejs/biome lint .
|
|
297
|
+
|
|
298
|
+
# CI mode (no fixes)
|
|
299
|
+
npx @biomejs/biome ci .
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
### package.json Scripts
|
|
303
|
+
|
|
304
|
+
```json
|
|
305
|
+
{
|
|
306
|
+
"scripts": {
|
|
307
|
+
"lint": "biome check .",
|
|
308
|
+
"lint:fix": "biome check --apply .",
|
|
309
|
+
"format": "biome format --write .",
|
|
310
|
+
"format:check": "biome format .",
|
|
311
|
+
"ci": "biome ci ."
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### VS Code Integration
|
|
317
|
+
|
|
318
|
+
```json
|
|
319
|
+
// .vscode/settings.json
|
|
320
|
+
{
|
|
321
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
322
|
+
"editor.formatOnSave": true,
|
|
323
|
+
"editor.codeActionsOnSave": {
|
|
324
|
+
"quickfix.biome": "explicit",
|
|
325
|
+
"source.organizeImports.biome": "explicit"
|
|
326
|
+
},
|
|
327
|
+
"[typescript]": {
|
|
328
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
329
|
+
},
|
|
330
|
+
"[typescriptreact]": {
|
|
331
|
+
"editor.defaultFormatter": "biomejs.biome"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## tsup Configuration
|
|
339
|
+
|
|
340
|
+
### Overview
|
|
341
|
+
|
|
342
|
+
tsup is a zero-config TypeScript bundler powered by esbuild, perfect for building libraries.
|
|
343
|
+
|
|
344
|
+
### Benefits
|
|
345
|
+
|
|
346
|
+
- **Zero config** - Works out of the box
|
|
347
|
+
- **Fast** - Powered by esbuild
|
|
348
|
+
- **Multiple formats** - ESM, CJS, IIFE
|
|
349
|
+
- **Type declarations** - Automatic .d.ts generation
|
|
350
|
+
- **Tree-shaking** - Dead code elimination
|
|
351
|
+
|
|
352
|
+
### Installation
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
npm install -D tsup
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
### Basic Configuration
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
// tsup.config.ts
|
|
362
|
+
import { defineConfig } from 'tsup';
|
|
363
|
+
|
|
364
|
+
export default defineConfig({
|
|
365
|
+
entry: ['src/index.ts'],
|
|
366
|
+
format: ['cjs', 'esm'],
|
|
367
|
+
dts: true,
|
|
368
|
+
splitting: false,
|
|
369
|
+
sourcemap: true,
|
|
370
|
+
clean: true,
|
|
371
|
+
minify: false,
|
|
372
|
+
treeshake: true
|
|
373
|
+
});
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Advanced Configuration
|
|
377
|
+
|
|
378
|
+
```typescript
|
|
379
|
+
// tsup.config.ts
|
|
380
|
+
import { defineConfig } from 'tsup';
|
|
381
|
+
|
|
382
|
+
export default defineConfig({
|
|
383
|
+
// Entry points
|
|
384
|
+
entry: {
|
|
385
|
+
index: 'src/index.ts',
|
|
386
|
+
cli: 'src/cli.ts',
|
|
387
|
+
utils: 'src/utils/index.ts'
|
|
388
|
+
},
|
|
389
|
+
|
|
390
|
+
// Output formats
|
|
391
|
+
format: ['cjs', 'esm'],
|
|
392
|
+
|
|
393
|
+
// Type declarations
|
|
394
|
+
dts: {
|
|
395
|
+
resolve: true,
|
|
396
|
+
entry: './src/index.ts'
|
|
397
|
+
},
|
|
398
|
+
|
|
399
|
+
// Code splitting
|
|
400
|
+
splitting: true,
|
|
401
|
+
|
|
402
|
+
// Source maps
|
|
403
|
+
sourcemap: true,
|
|
404
|
+
|
|
405
|
+
// Clean output directory
|
|
406
|
+
clean: true,
|
|
407
|
+
|
|
408
|
+
// Minification
|
|
409
|
+
minify: process.env.NODE_ENV === 'production',
|
|
410
|
+
|
|
411
|
+
// Tree-shaking
|
|
412
|
+
treeshake: true,
|
|
413
|
+
|
|
414
|
+
// External dependencies
|
|
415
|
+
external: ['react', 'react-dom'],
|
|
416
|
+
|
|
417
|
+
// Target environment
|
|
418
|
+
target: 'es2020',
|
|
419
|
+
|
|
420
|
+
// Platform
|
|
421
|
+
platform: 'node',
|
|
422
|
+
|
|
423
|
+
// Bundle
|
|
424
|
+
bundle: true,
|
|
425
|
+
|
|
426
|
+
// Watch mode
|
|
427
|
+
watch: process.env.NODE_ENV === 'development',
|
|
428
|
+
|
|
429
|
+
// Shims
|
|
430
|
+
shims: true,
|
|
431
|
+
|
|
432
|
+
// Banner
|
|
433
|
+
banner: {
|
|
434
|
+
js: '#!/usr/bin/env node'
|
|
435
|
+
},
|
|
436
|
+
|
|
437
|
+
// Environment variables
|
|
438
|
+
env: {
|
|
439
|
+
NODE_ENV: process.env.NODE_ENV || 'production'
|
|
440
|
+
},
|
|
441
|
+
|
|
442
|
+
// esbuild options
|
|
443
|
+
esbuildOptions(options) {
|
|
444
|
+
options.footer = {
|
|
445
|
+
js: '// Built with tsup'
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Library package.json
|
|
452
|
+
|
|
453
|
+
```json
|
|
454
|
+
{
|
|
455
|
+
"name": "@mylib/core",
|
|
456
|
+
"version": "1.0.0",
|
|
457
|
+
"type": "module",
|
|
458
|
+
"main": "./dist/index.cjs",
|
|
459
|
+
"module": "./dist/index.js",
|
|
460
|
+
"types": "./dist/index.d.ts",
|
|
461
|
+
"exports": {
|
|
462
|
+
".": {
|
|
463
|
+
"import": "./dist/index.js",
|
|
464
|
+
"require": "./dist/index.cjs",
|
|
465
|
+
"types": "./dist/index.d.ts"
|
|
466
|
+
},
|
|
467
|
+
"./utils": {
|
|
468
|
+
"import": "./dist/utils.js",
|
|
469
|
+
"require": "./dist/utils.cjs",
|
|
470
|
+
"types": "./dist/utils.d.ts"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"files": [
|
|
474
|
+
"dist"
|
|
475
|
+
],
|
|
476
|
+
"scripts": {
|
|
477
|
+
"build": "tsup",
|
|
478
|
+
"dev": "tsup --watch",
|
|
479
|
+
"prepublishOnly": "npm run build"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Vitest + MSW Setup
|
|
487
|
+
|
|
488
|
+
### Overview
|
|
489
|
+
|
|
490
|
+
Vitest is a blazing-fast unit test framework powered by Vite. MSW (Mock Service Worker) provides API mocking for tests.
|
|
491
|
+
|
|
492
|
+
### Benefits
|
|
493
|
+
|
|
494
|
+
**Vitest:**
|
|
495
|
+
- **Fast** - Powered by Vite
|
|
496
|
+
- **Compatible** - Jest-compatible API
|
|
497
|
+
- **TypeScript** - First-class TypeScript support
|
|
498
|
+
- **Watch mode** - Instant feedback
|
|
499
|
+
- **Coverage** - Built-in coverage with v8
|
|
500
|
+
|
|
501
|
+
**MSW:**
|
|
502
|
+
- **Realistic** - Intercepts actual HTTP requests
|
|
503
|
+
- **Reusable** - Same mocks for tests and development
|
|
504
|
+
- **Type-safe** - Full TypeScript support
|
|
505
|
+
- **Framework-agnostic** - Works with any test framework
|
|
506
|
+
|
|
507
|
+
### Installation
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
# Install Vitest
|
|
511
|
+
npm install -D vitest @vitest/ui
|
|
512
|
+
|
|
513
|
+
# Install MSW
|
|
514
|
+
npm install -D msw
|
|
515
|
+
|
|
516
|
+
# Install testing utilities
|
|
517
|
+
npm install -D @testing-library/react @testing-library/jest-dom
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
### vitest.config.ts
|
|
521
|
+
|
|
522
|
+
```typescript
|
|
523
|
+
import { defineConfig } from 'vitest/config';
|
|
524
|
+
import react from '@vitejs/plugin-react';
|
|
525
|
+
import path from 'path';
|
|
526
|
+
|
|
527
|
+
export default defineConfig({
|
|
528
|
+
plugins: [react()],
|
|
529
|
+
test: {
|
|
530
|
+
// Environment
|
|
531
|
+
environment: 'jsdom',
|
|
532
|
+
|
|
533
|
+
// Setup files
|
|
534
|
+
setupFiles: ['./test/setup.ts'],
|
|
535
|
+
|
|
536
|
+
// Globals
|
|
537
|
+
globals: true,
|
|
538
|
+
|
|
539
|
+
// Coverage
|
|
540
|
+
coverage: {
|
|
541
|
+
provider: 'v8',
|
|
542
|
+
reporter: ['text', 'json', 'html'],
|
|
543
|
+
exclude: [
|
|
544
|
+
'node_modules/',
|
|
545
|
+
'test/',
|
|
546
|
+
'**/*.d.ts',
|
|
547
|
+
'**/*.config.*',
|
|
548
|
+
'**/dist/**'
|
|
549
|
+
],
|
|
550
|
+
thresholds: {
|
|
551
|
+
lines: 80,
|
|
552
|
+
functions: 80,
|
|
553
|
+
branches: 80,
|
|
554
|
+
statements: 80
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
|
|
558
|
+
// Include/exclude
|
|
559
|
+
include: ['**/*.{test,spec}.{ts,tsx}'],
|
|
560
|
+
exclude: ['node_modules', 'dist', 'build'],
|
|
561
|
+
|
|
562
|
+
// Reporters
|
|
563
|
+
reporters: ['verbose'],
|
|
564
|
+
|
|
565
|
+
// Watch
|
|
566
|
+
watch: false,
|
|
567
|
+
|
|
568
|
+
// Threads
|
|
569
|
+
threads: true,
|
|
570
|
+
|
|
571
|
+
// Timeout
|
|
572
|
+
testTimeout: 10000
|
|
573
|
+
},
|
|
574
|
+
resolve: {
|
|
575
|
+
alias: {
|
|
576
|
+
'@': path.resolve(__dirname, './src')
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
### Test Setup (test/setup.ts)
|
|
583
|
+
|
|
584
|
+
```typescript
|
|
585
|
+
import { afterAll, afterEach, beforeAll } from 'vitest';
|
|
586
|
+
import { cleanup } from '@testing-library/react';
|
|
587
|
+
import '@testing-library/jest-dom/vitest';
|
|
588
|
+
import { server } from './mocks/server';
|
|
589
|
+
|
|
590
|
+
// Start MSW server before all tests
|
|
591
|
+
beforeAll(() => {
|
|
592
|
+
server.listen({ onUnhandledRequest: 'error' });
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
// Reset handlers after each test
|
|
596
|
+
afterEach(() => {
|
|
597
|
+
server.resetHandlers();
|
|
598
|
+
cleanup();
|
|
599
|
+
});
|
|
600
|
+
|
|
601
|
+
// Clean up after all tests
|
|
602
|
+
afterAll(() => {
|
|
603
|
+
server.close();
|
|
604
|
+
});
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
### MSW Handlers (test/mocks/handlers.ts)
|
|
608
|
+
|
|
609
|
+
```typescript
|
|
610
|
+
import { http, HttpResponse } from 'msw';
|
|
611
|
+
|
|
612
|
+
export const handlers = [
|
|
613
|
+
// GET request
|
|
614
|
+
http.get('/api/users', () => {
|
|
615
|
+
return HttpResponse.json([
|
|
616
|
+
{ id: 1, name: 'John Doe' },
|
|
617
|
+
{ id: 2, name: 'Jane Smith' }
|
|
618
|
+
]);
|
|
619
|
+
}),
|
|
620
|
+
|
|
621
|
+
// POST request
|
|
622
|
+
http.post('/api/users', async ({ request }) => {
|
|
623
|
+
const newUser = await request.json();
|
|
624
|
+
return HttpResponse.json(
|
|
625
|
+
{ id: 3, ...newUser },
|
|
626
|
+
{ status: 201 }
|
|
627
|
+
);
|
|
628
|
+
}),
|
|
629
|
+
|
|
630
|
+
// Error response
|
|
631
|
+
http.get('/api/error', () => {
|
|
632
|
+
return HttpResponse.json(
|
|
633
|
+
{ message: 'Internal Server Error' },
|
|
634
|
+
{ status: 500 }
|
|
635
|
+
);
|
|
636
|
+
}),
|
|
637
|
+
|
|
638
|
+
// Delayed response
|
|
639
|
+
http.get('/api/slow', async () => {
|
|
640
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
641
|
+
return HttpResponse.json({ data: 'slow response' });
|
|
642
|
+
})
|
|
643
|
+
];
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
### MSW Server (test/mocks/server.ts)
|
|
647
|
+
|
|
648
|
+
```typescript
|
|
649
|
+
import { setupServer } from 'msw/node';
|
|
650
|
+
import { handlers } from './handlers';
|
|
651
|
+
|
|
652
|
+
export const server = setupServer(...handlers);
|
|
653
|
+
```
|
|
654
|
+
|
|
655
|
+
### Example Test
|
|
656
|
+
|
|
657
|
+
```typescript
|
|
658
|
+
// src/api/users.test.ts
|
|
659
|
+
import { describe, it, expect } from 'vitest';
|
|
660
|
+
import { render, screen, waitFor } from '@testing-library/react';
|
|
661
|
+
import { server } from '../test/mocks/server';
|
|
662
|
+
import { http, HttpResponse } from 'msw';
|
|
663
|
+
import { UserList } from './UserList';
|
|
664
|
+
|
|
665
|
+
describe('UserList', () => {
|
|
666
|
+
it('renders users from API', async () => {
|
|
667
|
+
render(<UserList />);
|
|
668
|
+
|
|
669
|
+
await waitFor(() => {
|
|
670
|
+
expect(screen.getByText('John Doe')).toBeInTheDocument();
|
|
671
|
+
expect(screen.getByText('Jane Smith')).toBeInTheDocument();
|
|
672
|
+
});
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
it('handles API errors', async () => {
|
|
676
|
+
// Override handler for this test
|
|
677
|
+
server.use(
|
|
678
|
+
http.get('/api/users', () => {
|
|
679
|
+
return HttpResponse.json(
|
|
680
|
+
{ message: 'Failed to fetch' },
|
|
681
|
+
{ status: 500 }
|
|
682
|
+
);
|
|
683
|
+
})
|
|
684
|
+
);
|
|
685
|
+
|
|
686
|
+
render(<UserList />);
|
|
687
|
+
|
|
688
|
+
await waitFor(() => {
|
|
689
|
+
expect(screen.getByText('Error loading users')).toBeInTheDocument();
|
|
690
|
+
});
|
|
691
|
+
});
|
|
692
|
+
|
|
693
|
+
it('handles empty response', async () => {
|
|
694
|
+
server.use(
|
|
695
|
+
http.get('/api/users', () => {
|
|
696
|
+
return HttpResponse.json([]);
|
|
697
|
+
})
|
|
698
|
+
);
|
|
699
|
+
|
|
700
|
+
render(<UserList />);
|
|
701
|
+
|
|
702
|
+
await waitFor(() => {
|
|
703
|
+
expect(screen.getByText('No users found')).toBeInTheDocument();
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
});
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
### Running Tests
|
|
710
|
+
|
|
711
|
+
```bash
|
|
712
|
+
# Run tests
|
|
713
|
+
npm test
|
|
714
|
+
|
|
715
|
+
# Run tests in watch mode
|
|
716
|
+
npm test -- --watch
|
|
717
|
+
|
|
718
|
+
# Run tests with coverage
|
|
719
|
+
npm test -- --coverage
|
|
720
|
+
|
|
721
|
+
# Run tests with UI
|
|
722
|
+
npm test -- --ui
|
|
723
|
+
|
|
724
|
+
# Run specific test file
|
|
725
|
+
npm test -- src/api/users.test.ts
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
### package.json Scripts
|
|
729
|
+
|
|
730
|
+
```json
|
|
731
|
+
{
|
|
732
|
+
"scripts": {
|
|
733
|
+
"test": "vitest run",
|
|
734
|
+
"test:watch": "vitest",
|
|
735
|
+
"test:ui": "vitest --ui",
|
|
736
|
+
"test:coverage": "vitest run --coverage",
|
|
737
|
+
"test:ci": "vitest run --coverage --reporter=junit --reporter=default"
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
```
|
|
741
|
+
|
|
742
|
+
---
|
|
743
|
+
|
|
744
|
+
## Tool Comparison
|
|
745
|
+
|
|
746
|
+
### ESLint vs Biome
|
|
747
|
+
|
|
748
|
+
| Feature | ESLint | Biome |
|
|
749
|
+
|---------|--------|-------|
|
|
750
|
+
| **Speed** | Moderate | 10-100x faster |
|
|
751
|
+
| **Configuration** | Complex | Simple |
|
|
752
|
+
| **Formatting** | Requires Prettier | Built-in |
|
|
753
|
+
| **Import sorting** | Plugin required | Built-in |
|
|
754
|
+
| **Ecosystem** | Mature, many plugins | Growing |
|
|
755
|
+
| **TypeScript** | Good support | Excellent support |
|
|
756
|
+
| **Migration** | N/A | Easy from ESLint |
|
|
757
|
+
|
|
758
|
+
**When to use ESLint:**
|
|
759
|
+
- Need specific plugins not available in Biome
|
|
760
|
+
- Large existing codebase with custom rules
|
|
761
|
+
- Team familiar with ESLint ecosystem
|
|
762
|
+
|
|
763
|
+
**When to use Biome:**
|
|
764
|
+
- New projects
|
|
765
|
+
- Performance is critical
|
|
766
|
+
- Want simpler tooling
|
|
767
|
+
- Prefer all-in-one solution
|
|
768
|
+
|
|
769
|
+
### Jest vs Vitest
|
|
770
|
+
|
|
771
|
+
| Feature | Jest | Vitest |
|
|
772
|
+
|---------|------|--------|
|
|
773
|
+
| **Speed** | Moderate | Very fast |
|
|
774
|
+
| **Configuration** | Moderate | Minimal |
|
|
775
|
+
| **TypeScript** | Requires ts-jest | Native support |
|
|
776
|
+
| **ESM** | Limited | Full support |
|
|
777
|
+
| **Watch mode** | Good | Excellent |
|
|
778
|
+
| **Coverage** | Built-in | Built-in (v8) |
|
|
779
|
+
| **API** | Mature | Jest-compatible |
|
|
780
|
+
|
|
781
|
+
**When to use Jest:**
|
|
782
|
+
- Existing Jest tests
|
|
783
|
+
- Need specific Jest plugins
|
|
784
|
+
- Team familiar with Jest
|
|
785
|
+
|
|
786
|
+
**When to use Vitest:**
|
|
787
|
+
- New projects
|
|
788
|
+
- Using Vite
|
|
789
|
+
- Want faster tests
|
|
790
|
+
- Need better ESM support
|
|
791
|
+
|
|
792
|
+
### Webpack vs tsup
|
|
793
|
+
|
|
794
|
+
| Feature | Webpack | tsup |
|
|
795
|
+
|---------|---------|------|
|
|
796
|
+
| **Speed** | Moderate | Very fast |
|
|
797
|
+
| **Configuration** | Complex | Minimal |
|
|
798
|
+
| **Use case** | Applications | Libraries |
|
|
799
|
+
| **Bundle size** | Larger | Smaller |
|
|
800
|
+
| **Tree-shaking** | Good | Excellent |
|
|
801
|
+
| **Learning curve** | Steep | Gentle |
|
|
802
|
+
|
|
803
|
+
**When to use Webpack:**
|
|
804
|
+
- Building applications
|
|
805
|
+
- Need advanced features (code splitting, lazy loading)
|
|
806
|
+
- Complex build requirements
|
|
807
|
+
|
|
808
|
+
**When to use tsup:**
|
|
809
|
+
- Building libraries
|
|
810
|
+
- Want simple configuration
|
|
811
|
+
- Need fast builds
|
|
812
|
+
- Publishing to npm
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
## Migration Guide
|
|
817
|
+
|
|
818
|
+
### From ESLint Legacy to Flat Config
|
|
819
|
+
|
|
820
|
+
1. **Remove old config files**
|
|
821
|
+
```bash
|
|
822
|
+
rm .eslintrc.js .eslintrc.json .eslintignore
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
2. **Create eslint.config.js**
|
|
826
|
+
```javascript
|
|
827
|
+
import js from '@eslint/js';
|
|
828
|
+
|
|
829
|
+
export default [
|
|
830
|
+
js.configs.recommended,
|
|
831
|
+
{
|
|
832
|
+
files: ['**/*.ts'],
|
|
833
|
+
// ... your rules
|
|
834
|
+
}
|
|
835
|
+
];
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
3. **Update package.json**
|
|
839
|
+
```json
|
|
840
|
+
{
|
|
841
|
+
"scripts": {
|
|
842
|
+
"lint": "eslint ."
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
```
|
|
846
|
+
|
|
847
|
+
### From ESLint + Prettier to Biome
|
|
848
|
+
|
|
849
|
+
1. **Install Biome**
|
|
850
|
+
```bash
|
|
851
|
+
npm install -D @biomejs/biome
|
|
852
|
+
npm uninstall eslint prettier
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
2. **Initialize Biome**
|
|
856
|
+
```bash
|
|
857
|
+
npx @biomejs/biome init
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
3. **Migrate configuration**
|
|
861
|
+
```bash
|
|
862
|
+
npx @biomejs/biome migrate eslint --write
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
4. **Update scripts**
|
|
866
|
+
```json
|
|
867
|
+
{
|
|
868
|
+
"scripts": {
|
|
869
|
+
"lint": "biome check .",
|
|
870
|
+
"format": "biome format --write ."
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
### From Jest to Vitest
|
|
876
|
+
|
|
877
|
+
1. **Install Vitest**
|
|
878
|
+
```bash
|
|
879
|
+
npm install -D vitest @vitest/ui
|
|
880
|
+
npm uninstall jest @types/jest ts-jest
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
2. **Create vitest.config.ts**
|
|
884
|
+
```typescript
|
|
885
|
+
import { defineConfig } from 'vitest/config';
|
|
886
|
+
|
|
887
|
+
export default defineConfig({
|
|
888
|
+
test: {
|
|
889
|
+
globals: true,
|
|
890
|
+
environment: 'jsdom'
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
```
|
|
894
|
+
|
|
895
|
+
3. **Update test files**
|
|
896
|
+
```typescript
|
|
897
|
+
// Before (Jest)
|
|
898
|
+
import { describe, it, expect } from '@jest/globals';
|
|
899
|
+
|
|
900
|
+
// After (Vitest)
|
|
901
|
+
import { describe, it, expect } from 'vitest';
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
4. **Update package.json**
|
|
905
|
+
```json
|
|
906
|
+
{
|
|
907
|
+
"scripts": {
|
|
908
|
+
"test": "vitest run",
|
|
909
|
+
"test:watch": "vitest"
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
```
|
|
913
|
+
|
|
914
|
+
---
|
|
915
|
+
|
|
916
|
+
## Best Practices
|
|
917
|
+
|
|
918
|
+
### 1. Use Flat Config for ESLint
|
|
919
|
+
|
|
920
|
+
```javascript
|
|
921
|
+
// ✅ Good: Flat config
|
|
922
|
+
export default [
|
|
923
|
+
{
|
|
924
|
+
files: ['**/*.ts'],
|
|
925
|
+
rules: {
|
|
926
|
+
'@typescript-eslint/no-unused-vars': 'error'
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
];
|
|
930
|
+
|
|
931
|
+
// ❌ Bad: Legacy config
|
|
932
|
+
module.exports = {
|
|
933
|
+
extends: ['eslint:recommended'],
|
|
934
|
+
rules: {
|
|
935
|
+
'@typescript-eslint/no-unused-vars': 'error'
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
```
|
|
939
|
+
|
|
940
|
+
### 2. Enable Biome in VS Code
|
|
941
|
+
|
|
942
|
+
```json
|
|
943
|
+
// .vscode/settings.json
|
|
944
|
+
{
|
|
945
|
+
"editor.defaultFormatter": "biomejs.biome",
|
|
946
|
+
"editor.formatOnSave": true,
|
|
947
|
+
"editor.codeActionsOnSave": {
|
|
948
|
+
"source.organizeImports.biome": "explicit"
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
### 3. Configure tsup for Libraries
|
|
954
|
+
|
|
955
|
+
```typescript
|
|
956
|
+
// ✅ Good: Multiple formats
|
|
957
|
+
export default defineConfig({
|
|
958
|
+
entry: ['src/index.ts'],
|
|
959
|
+
format: ['cjs', 'esm'],
|
|
960
|
+
dts: true,
|
|
961
|
+
clean: true
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
// ❌ Bad: Single format
|
|
965
|
+
export default defineConfig({
|
|
966
|
+
entry: ['src/index.ts'],
|
|
967
|
+
format: ['esm']
|
|
968
|
+
});
|
|
969
|
+
```
|
|
970
|
+
|
|
971
|
+
### 4. Use MSW for API Mocking
|
|
972
|
+
|
|
973
|
+
```typescript
|
|
974
|
+
// ✅ Good: MSW handlers
|
|
975
|
+
export const handlers = [
|
|
976
|
+
http.get('/api/users', () => {
|
|
977
|
+
return HttpResponse.json([{ id: 1, name: 'John' }]);
|
|
978
|
+
})
|
|
979
|
+
];
|
|
980
|
+
|
|
981
|
+
// ❌ Bad: Manual mocking
|
|
982
|
+
global.fetch = vi.fn(() =>
|
|
983
|
+
Promise.resolve({
|
|
984
|
+
json: () => Promise.resolve([{ id: 1, name: 'John' }])
|
|
985
|
+
})
|
|
986
|
+
);
|
|
987
|
+
```
|
|
988
|
+
|
|
989
|
+
### 5. Enable Coverage Thresholds
|
|
990
|
+
|
|
991
|
+
```typescript
|
|
992
|
+
// vitest.config.ts
|
|
993
|
+
export default defineConfig({
|
|
994
|
+
test: {
|
|
995
|
+
coverage: {
|
|
996
|
+
thresholds: {
|
|
997
|
+
lines: 80,
|
|
998
|
+
functions: 80,
|
|
999
|
+
branches: 80,
|
|
1000
|
+
statements: 80
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
```
|
|
1006
|
+
|
|
1007
|
+
### 6. Use Type-Safe Configs
|
|
1008
|
+
|
|
1009
|
+
```typescript
|
|
1010
|
+
// ✅ Good: Type-safe config
|
|
1011
|
+
import type { Linter } from 'eslint';
|
|
1012
|
+
|
|
1013
|
+
const config: Linter.FlatConfig[] = [
|
|
1014
|
+
// ... config
|
|
1015
|
+
];
|
|
1016
|
+
|
|
1017
|
+
export default config;
|
|
1018
|
+
|
|
1019
|
+
// ❌ Bad: Untyped config
|
|
1020
|
+
export default [
|
|
1021
|
+
// ... config
|
|
1022
|
+
];
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
---
|
|
1026
|
+
|
|
1027
|
+
## Common Pitfalls
|
|
1028
|
+
|
|
1029
|
+
### ❌ Mixing ESLint Formats
|
|
1030
|
+
|
|
1031
|
+
```javascript
|
|
1032
|
+
// Don't mix flat config with legacy config
|
|
1033
|
+
export default [
|
|
1034
|
+
{
|
|
1035
|
+
extends: ['eslint:recommended'] // ❌ extends doesn't work in flat config
|
|
1036
|
+
}
|
|
1037
|
+
];
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
### ❌ Forgetting to Clean Build Output
|
|
1041
|
+
|
|
1042
|
+
```typescript
|
|
1043
|
+
// Always clean before building
|
|
1044
|
+
export default defineConfig({
|
|
1045
|
+
clean: true // ✅ Clean dist/ before build
|
|
1046
|
+
});
|
|
1047
|
+
```
|
|
1048
|
+
|
|
1049
|
+
### ❌ Not Resetting MSW Handlers
|
|
1050
|
+
|
|
1051
|
+
```typescript
|
|
1052
|
+
// Always reset handlers after each test
|
|
1053
|
+
afterEach(() => {
|
|
1054
|
+
server.resetHandlers(); // ✅ Reset to default handlers
|
|
1055
|
+
});
|
|
1056
|
+
```
|
|
1057
|
+
|
|
1058
|
+
---
|
|
1059
|
+
|
|
1060
|
+
## References
|
|
1061
|
+
|
|
1062
|
+
- [ESLint Flat Config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
|
|
1063
|
+
- [Biome Documentation](https://biomejs.dev)
|
|
1064
|
+
- [tsup Documentation](https://tsup.egoist.dev)
|
|
1065
|
+
- [Vitest Documentation](https://vitest.dev)
|
|
1066
|
+
- [MSW Documentation](https://mswjs.io)
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
|