Skip to content
Vy logo
Guides

Using spor eslint-package

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.

📦 Installation

Install @vygruppen/eslint-config and eslint as dev dependencies in your project.

pnpm install --save-dev @vygruppen/eslint-config eslint@9

Create eslint.config.mjs and add the following

import config from "@vygruppen/eslint-config";
export default [...config];

Now run pnpm lint . in your project

You can add custom scripts in package.json

{
"scripts": {
"lint": "eslint src/**/*.{ts,tsx} --fix",
"lint:ci": "eslint src/**/*.{ts,tsx} --max-warnings=0"
}
}

🔧 Customize

The rules are created to be a good foundation for your project, but you usually want to customize them.


Disable rules

import config from "@vygruppen/eslint-config";
export default [
...config,
{
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
];

Add more rules

import config from "@vygruppen/eslint-config";
import other from "eslint-plugin-other";
export default [...config, ...other.configs.recommended];