Created
December 28, 2022 18:56
-
-
Save MichaelMurithi/2f8ac2efaed29bccfc640b2da6ba85be to your computer and use it in GitHub Desktop.
pro-angular-eslint setup
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
| { | |
| "root": true, | |
| "overrides": [ | |
| { | |
| "files": [ | |
| "*.ts" | |
| ], | |
| "parser": "@typescript-eslint/parser", | |
| "parserOptions": { | |
| "project": [ | |
| "**/tsconfig.json" | |
| ], | |
| "ecmaVersion": 2017, | |
| "sourceType": "module", | |
| "createDefaultProgram": true | |
| }, | |
| "env": { | |
| "es6": true | |
| }, | |
| "extends": [ | |
| "plugin:@angular-eslint/ng-cli-compat", | |
| "plugin:@angular-eslint/ng-cli-compat--formatting-add-on", | |
| "plugin:@angular-eslint/template/process-inline-templates" | |
| ], | |
| "plugins": [ | |
| "@angular-eslint", | |
| "@typescript-eslint", | |
| "eslint-plugin-no-null", | |
| "unused-imports", | |
| "import" | |
| ], | |
| "rules": { | |
| "import/no-unresolved": "error", | |
| "@typescript-eslint/array-type": [ | |
| "error", | |
| { | |
| "default": "array" | |
| } | |
| ], | |
| "@typescript-eslint/explicit-member-accessibility": [ | |
| "error", | |
| { | |
| "accessibility": "no-public" | |
| } | |
| ], | |
| "@typescript-eslint/no-explicit-any": "error", | |
| "arrow-parens": [ | |
| "off", | |
| "always" | |
| ], | |
| "curly": "off", | |
| "max-len": [ | |
| "error", | |
| { | |
| "ignorePattern": "^import\\s.+\\sfrom\\s.+;$", | |
| "code": 140 | |
| } | |
| ], | |
| "no-null/no-null": "error", | |
| "prefer-object-spread": "error", | |
| "no-shadow": "off", | |
| "@typescript-eslint/no-shadow": [ | |
| "error" | |
| ], | |
| "@typescript-eslint/naming-convention": [ | |
| "error", | |
| { | |
| "selector": "enumMember", | |
| "format": [ | |
| "PascalCase" | |
| ] | |
| } | |
| ], | |
| "ngrx/avoid-dispatching-multiple-actions-sequentially": "off", | |
| "@angular-eslint/directive-selector": [ | |
| "error", | |
| { | |
| "type": "attribute", | |
| "prefix": "app", | |
| "style": "camelCase" | |
| } | |
| ], | |
| "@angular-eslint/component-selector": [ | |
| "error", | |
| { | |
| "type": "element", | |
| "prefix": "app", | |
| "style": "kebab-case" | |
| } | |
| ], | |
| "object-curly-spacing": [ | |
| "error", | |
| "always", | |
| { | |
| "arraysInObjects": true, | |
| "objectsInObjects": true | |
| } | |
| ], | |
| "import/newline-after-import": [ | |
| "error", | |
| { | |
| "count": 1 | |
| } | |
| ], | |
| "no-multiple-empty-lines": [ | |
| 1, | |
| { | |
| "max": 1, | |
| "maxEOF": 1, | |
| "maxBOF": 0 | |
| } | |
| ], | |
| "padding-line-between-statements": [ | |
| "error", | |
| { | |
| "blankLine": "always", | |
| "prev": "*", | |
| "next": "block-like" | |
| }, | |
| { | |
| "blankLine": "always", | |
| "prev": "block-like", | |
| "next": "*" | |
| }, | |
| { | |
| "blankLine": "always", | |
| "prev": "*", | |
| "next": "return" | |
| }, | |
| { | |
| "blankLine": "never", | |
| "prev": "function", | |
| "next": "*" | |
| } | |
| ], | |
| "no-unused-vars": "off", | |
| "unused-imports/no-unused-imports": "error", | |
| "unused-imports/no-unused-vars": [ | |
| "error", | |
| { | |
| "vars": "all", | |
| "varsIgnorePattern": "^_", | |
| "args": "after-used", | |
| "argsIgnorePattern": "^_" | |
| } | |
| ], | |
| "no-console": "error", | |
| "no-debugger": "error", | |
| "no-undef-init": "error", | |
| "jsdoc/no-types": 0, | |
| "valid-jsdoc": "error", | |
| "comma-dangle": "error" | |
| }, | |
| "settings": { | |
| "import/parsers": { | |
| "@typescript-eslint/parser": [ | |
| ".ts", | |
| ".tsx" | |
| ] | |
| }, | |
| "import/resolver": { | |
| "typescript": { | |
| "alwaysTryTypes": true, | |
| "project": [ | |
| "**/tsconfig.json" | |
| ] | |
| } | |
| } | |
| } | |
| }, | |
| { | |
| "files": [ | |
| "*.html" | |
| ], | |
| "extends": [ | |
| "plugin:@angular-eslint/template/recommended" | |
| ], | |
| "rules": {} | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment