Skip to content

Commit

Permalink
chore(eslint): fix linter settings
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Oct 23, 2023
1 parent 9120abb commit d78706d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
24 changes: 23 additions & 1 deletion apps/react-sdk-example/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -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,
},
};
4 changes: 1 addition & 3 deletions apps/react-sdk-example/tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "./tsconfig.json",
"include": [
"src",
"*.ts",
"*.js"
"src"
]
}

0 comments on commit d78706d

Please sign in to comment.