Skip to content

Instantly share code, notes, and snippets.

@WesleySmits
Created October 10, 2021 09: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 WesleySmits/753a9a64a796026876504a5fa5800340 to your computer and use it in GitHub Desktop.
Save WesleySmits/753a9a64a796026876504a5fa5800340 to your computer and use it in GitHub Desktop.
TS Starter: .eslintrc.json
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"airbnb-base",
"plugin:import/errors",
"plugin:import/warnings",
"prettier"
],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".ts"]
}
}
},
"env": {
"browser": true,
"es6": true,
"node": true,
"jest": true
},
"ignorePatterns": ["**/*.test.ts"],
"rules": {
"camelcase": "off",
"import/extensions": "off",
"max-len": ["error", { "code": 120 }],
"no-restricted-syntax": "off",
"no-console": 2,
"no-alert": 2,
"comma-dangle": ["error", "never"],
"no-use-before-define": [
"error",
{ "functions": false, "classes": true, "variables": true }
],
"no-cond-assign": ["error", "except-parens"],
"quote-props": [2, "consistent-as-needed"],
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
"import/no-unresolved": [2],
"no-param-reassign": [
2,
{
"props": false
}
],
"@typescript-eslint/explicit-function-return-type": ["error"],
"prettier/prettier": "error"
},
"overrides": [
{
"files": ["*.js"],
"rules": {
"@typescript-eslint/explicit-function-return-type": 0
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment