ESLint: Set no-unused-vars rule to error

This rule should output error instead of just a warning.
This commit is contained in:
regexowl 2025-07-25 13:51:11 +02:00 committed by Gianluca Zuccarelli
parent 4d051eecde
commit 67a0f86dde
3 changed files with 9 additions and 3 deletions

View file

@ -111,7 +111,13 @@ module.exports = defineConfig([
'@typescript-eslint/no-require-imports': 'error',
'disable-autofix/@typescript-eslint/no-unnecessary-condition': 'warn',
'no-unused-vars': 'off', // disable js rule in favor of @typescript-eslint's rule
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'jsx-a11y/no-autofocus': 'off',
},
settings: {

View file

@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react';
import React from 'react';
import {
Button,

View file

@ -31,7 +31,7 @@ export const getLastBlueprintReq = () => {
return lastRequest.blueprints[lastRequest.blueprints.length - 1];
};
export const cockpitFile = (filepath: string, options?: object) => {
export const cockpitFile = (filepath: string, _options?: object) => {
return {
read: (): Promise<string> => {
const file = path.parse(filepath);