fix(lint): Set no-unused-vars to warn (#4228)

* 👕 Set `no-unused-vars` to `warn`

* 👕 Fix lint issue in `master`

* ✏️ Fix plugin name
This commit is contained in:
Iván Ovejero 2022-09-29 12:47:07 +02:00 committed by GitHub
parent 6e8e4f5937
commit 64fffa0579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -1,7 +1,7 @@
/**
* @type {import('@types/eslint').ESLint.ConfigData}
*/
const config = module.exports = {
const config = (module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
@ -361,6 +361,13 @@ const config = module.exports = {
*/
'prefer-spread': 'error',
/**
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unused-vars.md
*
* Disabled because eslint-plugin-diff fails to catch it. TODO: Revisit.
*/
'@typescript-eslint/no-unused-vars': 'warn',
// ----------------------------------
// import
// ----------------------------------
@ -370,7 +377,7 @@ const config = module.exports = {
*/
'import/prefer-default-export': 'off',
},
};
});
if ('ESLINT_PLUGIN_DIFF_COMMIT' in process.env) {
/**

View file

@ -2,7 +2,6 @@
/* eslint-disable import/no-dynamic-require */
/* eslint-disable no-restricted-syntax */
// eslint-disable-next-line import/no-cycle
import { LoggerProxy } from 'n8n-workflow';
import { Db, IExternalHooksClass, IExternalHooksFileData, IExternalHooksFunctions } from '.';
import config from '../config';