Created
June 23, 2020 12:15
-
-
Save yagoernandes/37d9577b039fbb2fe11b1fb84234cf6e to your computer and use it in GitHub Desktop.
Eslint configuration for Node+Typescript projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "env": { | |
| "es6": true, | |
| "node": true, | |
| "jest": true | |
| }, | |
| "extends": [ | |
| "airbnb-base", | |
| "plugin:@typescript-eslint/recommended", | |
| "prettier/@typescript-eslint", | |
| "plugin:prettier/recommended" | |
| ], | |
| "globals": { | |
| "Atomics": "readonly", | |
| "SharedArrayBuffer": "readonly" | |
| }, | |
| "parser": "@typescript-eslint/parser", | |
| "parserOptions": { | |
| "ecmaVersion": 11, | |
| "sourceType": "module" | |
| }, | |
| "plugins": [ | |
| "@typescript-eslint", | |
| "prettier", | |
| "eslint-plugin-import-helpers" | |
| ], | |
| "rules": { | |
| "no-new": "off", | |
| "no-prototype-builtins": "off", | |
| "no-restricted-syntax": "off", | |
| "max-classes-per-file": "off", | |
| "@typescript-eslint/no-explicit-any": "off", | |
| "no-console": "off", | |
| "import/prefer-default-export": "off", | |
| "@typescript-eslint/explicit-function-return-type": ["off"], | |
| "@typescript-eslint/no-unused-vars": [ | |
| "error", | |
| { | |
| "argsIgnorePattern": "_" | |
| } | |
| ], | |
| "no-useless-constructor": "off", | |
| "@typescript-eslint/naming-convention": [ | |
| "error", | |
| { | |
| "selector": "interface", | |
| "format": ["PascalCase"], | |
| "custom": { | |
| "regex": "^I[A-Z]", | |
| "match": true | |
| } | |
| } | |
| ], | |
| "@typescript-eslint/explicit-module-boundary-types": ["warn", { | |
| "allowArgumentsExplicitlyTypedAsAny": true | |
| }], | |
| "no-underscore-dangle": "off", | |
| "@typescript-eslint/camelcase": "off", | |
| "prettier/prettier": "error", | |
| "class-methods-use-this": "off", | |
| "import/extensions": [ | |
| "error", | |
| "ignorePackages", | |
| { | |
| "ts": "never" | |
| } | |
| ], | |
| "import-helpers/order-imports": [ | |
| "warn", | |
| { | |
| "newlinesBetween": "always", // new line between groups | |
| "groups": [ | |
| "module", | |
| "/^@server\/shared/", | |
| "/^@/", | |
| ["parent", "sibling", "index"] | |
| ], | |
| "alphabetize": { "order": "asc", "ignoreCase": true } | |
| } | |
| ] | |
| }, | |
| "settings": { | |
| "import/resolver": { | |
| "typescript": { | |
| "directory": "packages/server/*/tsconfig.json" | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment