Skip to content

Instantly share code, notes, and snippets.

@mnzsss
Last active July 8, 2021 22:24
Show Gist options
  • Save mnzsss/b4fcab0e58fa72bfa8e98bed11f57009 to your computer and use it in GitHub Desktop.
Save mnzsss/b4fcab0e58fa72bfa8e98bed11f57009 to your computer and use it in GitHub Desktop.
Initial Configs Eslint, Prettier and Editorconfig
{
"env": {
"es2020": true,
"node": true,
"jest": true
},
"extends": [
"standard",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"eslint-plugin-import-helpers",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"camelcase": "off",
"import/no-unresolved": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": [
"PascalCase"
],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
}
],
"class-methods-use-this": "off",
"import/prefer-default-export": "off",
"no-shadow": "off",
"no-console": "off",
"no-useless-constructor": "off",
"no-empty-function": "off",
"lines-between-class-members": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never"
}
],
"import-helpers/order-imports": [
"warn",
{
"newlinesBetween": "always",
"groups": [
"module",
"/^@shared/",
[
"parent",
"sibling",
"index"
]
],
"alphabetize": {
"order": "asc",
"ignoreCase": true
}
}
],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": [
"**/*.spec.js"
]
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
module.exports = {
semi: false,
singleQuote: true,
arrowParens: 'avoid',
trailingComma: 'none',
endOfLine: 'auto'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment