Skip to content

Instantly share code, notes, and snippets.

@davidmwhynot
Created April 16, 2021 20:47
Show Gist options
  • Save davidmwhynot/ac0ce7b1942d5cd3cfc9a06fe08c3342 to your computer and use it in GitHub Desktop.
Save davidmwhynot/ac0ce7b1942d5cd3cfc9a06fe08c3342 to your computer and use it in GitHub Desktop.
react eslint
module.exports = {
extends: [
'react-app',
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
plugins: ['prettier'],
rules: {
'no-unused-vars': 'error',
'import/no-anonymous-default-export': 'error',
'no-mixed-spaces-and-tabs': 'off',
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': [
'error',
{
additionalHooks: 'useRecoilCallback'
}
]
},
overrides: [
{
files: ['**/*.ts?(x)'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-unused-vars': 'error'
}
}
]
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment