Additional Spor-packages
Spor offers a couple of additional packages for supporting good code practices, and to make migration to new major versions easier. This is a guide on what the spor-codemods and spor-eslint package is, and how to use them.
spor-codemods
spor-codemods is a package available through Spor that contains code modification scripts that can help automate the process of migrating Spor code to newer versions.
The package uses jscodeshift (https://github.com/facebook/jscodeshift) to transform your codebase.
To install the package in your project, run
pnpm add -D @vygruppen/spor-codemods
Usage
The easiest way to use the codemods is through the CLI. By running the command pnpm spor-codemod --help you will be provided with information on how to run the code modification scripts, in addition to what scripts that are available for use.
Docs
See github package readmeEkstern lenke for documentation about rules, setup etc.
spor-eslint
Spor exports its ESLint rules as a standalone package, @vygruppen/eslint-config, designed to ensure consistent code quality and style across projects, primarily for React and Remix applications.
The rules are intended as helpful guidelines and should be adapted to the specific needs of each project. It’s not wrong to disable rules—whether globally in a project or on a per-line basis—but avoid doing so out of laziness. The rules exist for a reason, and developers should engage with them thoughtfully.
Docs
See github package readmeEkstern lenke for documentation about rules, setup etc.