fix: updated eslint config

Signed-off-by: Adithya Krishna <adikrish@redhat.com>
This commit is contained in:
Adithya Krishna
2023-08-28 08:37:59 +05:30
committed by Mythie
parent e6790d3a19
commit 5100a61ab7
2 changed files with 20 additions and 21 deletions

View File

@ -1,28 +1,9 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
'@documenso/eslint-config',
'plugin:package-json/recommended',
'plugin:import/recommended',
],
plugins: ['package-json', 'import', 'simple-import-sort'],
extends: ['@documenso/eslint-config'],
rules: {
'@next/next/no-img-element': 'off',
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
exceptions: {
BinaryExpression: false,
VariableDeclarator: false,
ImportDeclaration: false,
Property: false,
},
},
],
'import/named': 'off',
'no-duplicate-imports': 'error',
},
settings: {
next: {

View File

@ -6,9 +6,11 @@ module.exports = {
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:package-json/recommended',
'plugin:import/recommended',
],
plugins: ['prettier'],
plugins: ['prettier', 'package-json', 'import', 'simple-import-sort'],
env: {
node: true,
@ -38,5 +40,21 @@ module.exports = {
// To handle this we want this rule to catch usages and highlight them as
// warnings so we can write appropriate interfaces and guards later.
'@typescript-eslint/consistent-type-assertions': ['warn', { assertionStyle: 'never' }],
'no-multi-spaces': [
'error',
{
ignoreEOLComments: false,
exceptions: {
BinaryExpression: false,
VariableDeclarator: false,
ImportDeclaration: false,
Property: false,
},
},
],
'import/named': 'error',
'import/no-named-as-default': 'off',
'import/namespace': 'off',
'no-duplicate-imports': 'error',
},
};