Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Prettier with TypeScript
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
plugins: [
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/prefer-interface": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
settings: {
react: {
version: 'detect',
module.exports = {
"semi": false,
"useTabs": true,
"tabWidth": 2,
"printWidth": 120,
"singleQuote": true,
"trailingComma": "es5"
"scripts": {
"eslint:lint": "eslint \"src/**/*.{ts,tsx}\" ",
"eslint:fix": "eslint --fix \"src/**/*.{ts,tsx}\" "
npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier --save-dev

This comment has been minimized.

Copy link

@sw-yx sw-yx commented Jan 17, 2020

you had me until useTabs :trollface:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment