Skip to content

Instantly share code, notes, and snippets.

@tatethurston
Created September 12, 2020 17:22
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 tatethurston/69fbc0de519ece0fe7dfbdc7dc95f244 to your computer and use it in GitHub Desktop.
Save tatethurston/69fbc0de519ece0fe7dfbdc7dc95f244 to your computer and use it in GitHub Desktop.
TypeScript backend eslint config
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
},
plugins: ["@typescript-eslint"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
rules: {
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/prefer-optional-chain": "error",
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment