Skip to content

Instantly share code, notes, and snippets.

@vschoener
Created August 11, 2020 14:26
Show Gist options
  • Save vschoener/5ecd9db03b6f4097d28704d3aba8051d to your computer and use it in GitHub Desktop.
Save vschoener/5ecd9db03b6f4097d28704d3aba8051d to your computer and use it in GitHub Desktop.
eslintrc medium say-bye-to-relative-path
{
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
// This part is required to work with eslint, the rest is already setup to use import
"import/resolver": {
"typescript": {}
}
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"tsconfigRootDir": "./"
},
"plugins": ["@typescript-eslint", "import"],
"rules": {
"prettier/prettier": ["error"],
"@typescript-eslint/no-explicit-any": 2,
"@typescript-eslint/no-unused-vars": 2,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": ["error"],
"@typescript-eslint/member-ordering": ["error"],
"@typescript-eslint/interface-name": ["off"],
"@typescript-eslint/arrow-parens": ["off"],
"@typescript-eslint/object-literal-sort-keys": ["off"],
"import/no-unresolved": "error",
"import/named": 2,
"import/namespace": 2,
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [
["builtin", "external"],
["internal", "parent", "sibling", "index"]
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment