Skip to content

Instantly share code, notes, and snippets.

@grhbit
Created July 29, 2019 09:46
Show Gist options
  • Save grhbit/840396bef1b555a050488df6df0fd33c to your computer and use it in GitHub Desktop.
Save grhbit/840396bef1b555a050488df6df0fd33c to your computer and use it in GitHub Desktop.
eslint configuration file
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
extends: [
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
'prettier/react',
],
plugins: ['prettier', '@typescript-eslint', 'react', 'react-hooks'],
env: {
browser: true,
es6: true,
node: true,
},
settings: {
react: {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {},
},
},
rules: {
'import/prefer-default-export': 'off',
'@typescript-eslint/array-type': ['warn', 'array-simple'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.tsx'] }],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment