From d78706d4a746c323b0090748853dbb764c4be95e Mon Sep 17 00:00:00 2001 From: Vladislav Kibenko Date: Tue, 24 Oct 2023 00:57:14 +0300 Subject: [PATCH] chore(eslint): fix linter settings --- apps/react-sdk-example/.eslintrc.cjs | 24 ++++++++++++++++++++- apps/react-sdk-example/tsconfig.eslint.json | 4 +--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/apps/react-sdk-example/.eslintrc.cjs b/apps/react-sdk-example/.eslintrc.cjs index 54398594a..b8da50db9 100644 --- a/apps/react-sdk-example/.eslintrc.cjs +++ b/apps/react-sdk-example/.eslintrc.cjs @@ -1,6 +1,28 @@ module.exports = { - extends: ['custom/react'], + extends: ['airbnb', 'airbnb-typescript', 'airbnb/hooks'], + parserOptions: { + project: './tsconfig.eslint.json', + }, rules: { 'react/react-in-jsx-scope': 'off', + 'react/jsx-props-no-spreading': 0, + 'react/prop-types': 0, + // Works incorrectly in some IDEs. Should be equal to 2. + '@typescript-eslint/indent': 0, + '@typescript-eslint/consistent-type-imports': 'error', + // We don't use default exports anywhere. + 'import/prefer-default-export': 0, + // We have no problem related to extraneous dependencies. + 'import/no-extraneous-dependencies': 0, + // Usage of "continue" is normal and prevents code from nesting. + 'no-continue': 0, + // Enable default behavior of this rule. + 'object-curly-newline': ['error', { consistent: true }], + 'consistent-return': 0, + // We select line endings depending on current OS. + // See: https://stackoverflow.com/q/39114446/2771889 + 'linebreak-style': ['error', (process.platform === 'win32' ? 'windows' : 'unix')], + // Sometimes we need to write "void promise". + 'no-void': 0, }, }; diff --git a/apps/react-sdk-example/tsconfig.eslint.json b/apps/react-sdk-example/tsconfig.eslint.json index fd7f4ed46..1eb252f66 100644 --- a/apps/react-sdk-example/tsconfig.eslint.json +++ b/apps/react-sdk-example/tsconfig.eslint.json @@ -1,8 +1,6 @@ { "extends": "./tsconfig.json", "include": [ - "src", - "*.ts", - "*.js" + "src" ] } \ No newline at end of file