Skip to content

Instantly share code, notes, and snippets.

@benduran
Created January 27, 2020 16:03
Show Gist options
  • Save benduran/3411328d4d52b006504b0ff06454a4d2 to your computer and use it in GitHub Desktop.
Save benduran/3411328d4d52b006504b0ff06454a4d2 to your computer and use it in GitHub Desktop.
TypeScript & React-friendly ESlint configuration
{
"parser": "@typescript-eslint/parser",
"extends": [
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2020,
"sourceType": "module"
},
"settings": {
"react": {
"version": "detect"
}
},
"rules": {
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/explicit-function-return-type": ["off"],
"comma-dangle": ["error", "always-multiline"],
"react/jsx-filename-extension": ["off"],
"arrow-parens": ["error", "as-needed"],
"react/jsx-props-no-spreading": ["off"],
"import/extensions": ["off"],
"import/no-unresolved": ["off"],
"object-curly-newline": ["error", { "minProperties": 6, "consistent": true }]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment