Skip to content

Instantly share code, notes, and snippets.

@tapih
Last active February 2, 2020 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tapih/51f02c0eab409b549491abce8b77668b to your computer and use it in GitHub Desktop.
Save tapih/51f02c0eab409b549491abce8b77668b to your computer and use it in GitHub Desktop.
My ESLint configuration for TypeScript
{
"env": {
"browser": true
},
"extends": [
"plugin:react/recommended",
"prettier",
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"prettier",
"react",
"@typescript-eslint"
],
"rules": {
"prettier/prettier": [
"error",
{
"semi": false,
"singleQuote": true,
"trailingComma": "none"
}
],
"semi": ["error", false],
"curly": "error",
"no-use-before-define": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never",
"js": "never",
"jsx": "never"
}
],
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".jsx",
".tsx"
]
}
]
},
"settings": {
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx",
".ts",
".tsx"
]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment