Skip to content

Instantly share code, notes, and snippets.

@Rem0ld
Created May 11, 2021 19:07
Show Gist options
  • Save Rem0ld/001207959eee7958d5a0d215d36985f4 to your computer and use it in GitHub Desktop.
Save Rem0ld/001207959eee7958d5a0d215d36985f4 to your computer and use it in GitHub Desktop.
example eslint config for typescript react and prettier
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
},
env: {
browser: true,
amd: true,
node: true,
},
plugins: ['simple-import-sort'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
],
rules: {
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'@typescript-eslint/ban-ts-comment': 'off',
'react/prop-types': 'off',
'simple-import-sort/imports': 'warn',
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment