SvelteKit Utils is a collection of utilities and configurations to improve the development experience with SvelteKit. There are actually 2 packages in this repository:
- @chialab/sveltekit-utils: A set of utility types and functions
- @chialab/sveltekit-dev-utils: A set of configurations (eslint, stylelint, prettier)
sveltekit-dev-utils package is meant to be used as a dev dependency, while sveltekit-utils is meant to be used as a dependency.
Packages are distribuited as NPM packages through the official NPM registry.
You can use the npm cli or the pnpm package manager to install the package as a dependency:
npm install @chialab/sveltekit-utilspnpm add @chialab/sveltekit-utilsnpm install @chialab/sveltekit-dev-utilspnpm add @chialab/sveltekit-dev-utilssvelte-dev-utils exports 3 config that you can use as follows:
For example for the eslint config create the eslint.config.js file in the root of your project and add the following:
import cfg from '@chialab/sveltekit-dev-utils/eslint-config';
export default cfg;You can extend the config as follows:
import cfg from '@chialab/sveltekit-dev-utils/eslint-config';
export default [
...cfg,
{
rules: {
'no-console': 'off'
}
}
];SvelteKit Utils are released under the MIT license.