Created
June 2, 2023 10:47
-
-
Save Adarshg315/825dbe72fe0d34d869c5163e0d243287 to your computer and use it in GitHub Desktop.
eslintrc
This file contains 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
{ | |
"env": { "browser": true, "es2021": true }, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended", | |
"prettier" | |
], | |
"overrides": [ | |
{ | |
"files": ["*.ts"], | |
"extends": ["plugin:@angular-eslint/recommended"], | |
"rules": { | |
/** * Any TypeScript source code (NOT TEMPLATE) related rules you wish to use/reconfigure over and above the * recommended set provided by the @angular-eslint project would go here. */ "@angular-eslint/directive-selector": [ | |
"error", | |
{ "type": "attribute", "prefix": "app", "style": "camelCase" } | |
], | |
"@angular-eslint/component-selector": [ | |
"error", | |
{ "type": "element", "prefix": "app", "style": "kebab-case" } | |
] | |
}, | |
"plugins": ["@typescript-eslint", "@angular-eslint"] | |
}, | |
{ | |
"files": ["*.html"], | |
"extends": [ | |
"plugin:@angular-eslint/template/recommended", | |
"plugin:@angular-eslint/template/accessibility" | |
], | |
"rules": { | |
/** * Any template/HTML related rules you wish to use/reconfigure over and above the * recommended set provided by the @angular-eslint project would go here. */ "@angular-eslint/template/accessibility-valid-aria": [ | |
"warn" | |
], | |
"@angular-eslint/template/accessibility-role-has-required-aria": [ | |
"warn" | |
] | |
} | |
} | |
], | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { "ecmaVersion": "latest", "sourceType": "module" }, | |
"plugins": ["@typescript-eslint", "@angular-eslint"], | |
"rules": { | |
"indent": ["error", 2], | |
"quotes": ["error", "double"], | |
"semi": ["error", "always"], | |
"@typescript-eslint/no-namespace": "off", | |
"no-console": 2, | |
"no-debugger": 2, | |
"camelcase": 2, | |
"prefer-destructuring": [ | |
"warn", | |
{ "array": true, "object": true }, | |
{ "enforceForRenamedProperties": false } | |
], | |
"no-unused-private-class-members": 2, | |
"lines-between-class-members": 2, | |
"no-lonely-if": 2, | |
"prefer-const": 2, | |
"no-implicit-globals": 2, | |
"array-bracket-spacing": 2, | |
"spaced-comment": [ | |
"error", | |
"always", | |
{ | |
"line": { "markers": ["/"], "exceptions": ["-", "+"] }, | |
"block": { "markers": ["!"], "exceptions": ["*"], "balanced": true } | |
} | |
], | |
"eqeqeq": ["error", "smart"], | |
"no-else-return": ["error"], | |
"no-extra-boolean-cast": ["error"], | |
"no-unneeded-ternary": ["error"], | |
"no-var": "error", | |
"no-empty-function": ["error", { "allow": ["constructors"] }] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment