Created
February 4, 2022 14:06
-
-
Save dipeshhkc/858586d84e6353fb298d7ca0077ac2cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
env: { | |
browser: true, | |
es2021: true, | |
node: true, | |
}, | |
extends: [ | |
'eslint:recommended', | |
'plugin:react/recommended', | |
'plugin:@typescript-eslint/recommended', | |
'plugin:react-hooks/recommended', | |
'prettier', | |
], | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaFeatures: { | |
jsx: true, | |
}, | |
project: './tsconfig.json', | |
ecmaVersion: 13, | |
sourceType: 'module', | |
}, | |
plugins: ['react', '@typescript-eslint', 'simple-import-sort'], | |
rules: { | |
'react/react-in-jsx-scope': 'off', | |
'no-unused-vars': 'error', | |
'no-console': 'error', | |
"react/display-name": 0, | |
'prefer-const': 'error', | |
'arrow-parens': ['error', 'always', { requireForBlockBody: true }], | |
'arrow-body-style': ['error', 'always'], | |
'react/prop-types': 'off', | |
'react/jsx-props-no-spreading': 'off', | |
'simple-import-sort/imports': 'error', | |
'simple-import-sort/exports': 'error', | |
'newline-before-return': 'error', | |
'@typescript-eslint/no-explicit-any': 'warn', | |
'@typescript-eslint/no-unsafe-member-access': 'warn', | |
'@typescript-eslint/consistent-type-imports': [ | |
'warn', | |
{ prefer: 'type-imports' }, | |
], | |
'@typescript-eslint/no-unused-vars': [ | |
'error', | |
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, | |
], | |
'@typescript-eslint/naming-convention': [ | |
'warn', | |
{ | |
selector: ['variable'], | |
types: ['boolean'], | |
format: ['PascalCase'], | |
prefix: ['is', 'should', 'has', 'can', 'will'], | |
}, | |
], | |
}, | |
settings: { react: { version: 'detect' } }, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment