mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
📏 chore: Update ESLint Rules for Unused Variables (#7719)
This commit is contained in:
parent
32bab33499
commit
830be18b90
1 changed files with 16 additions and 7 deletions
|
@ -121,9 +121,14 @@ export default [
|
|||
// common rules
|
||||
'no-nested-ternary': 'warn',
|
||||
'no-constant-binary-expression': 'warn',
|
||||
// Also disable the core no-unused-vars rule globally.
|
||||
'no-unused-vars': 'warn',
|
||||
|
||||
'no-unused-vars': [
|
||||
'warn',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'no-console': 'off',
|
||||
'import/no-cycle': 'error',
|
||||
'import/no-self-import': 'error',
|
||||
|
@ -181,9 +186,6 @@ export default [
|
|||
files: ['api/**/*.js', 'config/**/*.js'],
|
||||
rules: {
|
||||
// API
|
||||
// TODO: maybe later to error.
|
||||
'no-unused-const': 'off',
|
||||
'no-unused-vars': 'off',
|
||||
'no-async-promise-executor': 'off',
|
||||
},
|
||||
},
|
||||
|
@ -278,7 +280,14 @@ export default [
|
|||
],
|
||||
//
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'warn',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
caughtErrorsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unnecessary-condition': 'off',
|
||||
'@typescript-eslint/strict-boolean-expressions': 'off',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue