Skip to content

Instantly share code, notes, and snippets.

@dtarnawsky
Created June 11, 2021 16:10
Show Gist options
  • Save dtarnawsky/7c42cec330443c7093976136286b5473 to your computer and use it in GitHub Desktop.
Save dtarnawsky/7c42cec330443c7093976136286b5473 to your computer and use it in GitHub Desktop.
ESLintRC file for Strict Angular Rules
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": [
"Component",
"Page"
]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": [
"app",
"ati"
],
"style": "kebab-case"
}
],
"@angular-eslint/directive-class-suffix": [
"error",
{
"suffixes": [
"Directive"
]
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": [
"app",
"ati",
"dir"
],
"style": "camelCase"
}
],
"@angular-eslint/no-forward-ref": "error",
"@angular-eslint/use-pipe-decorator": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "explicit",
"parameterProperties": "explicit"
}
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true
}
],
"@typescript-eslint/no-var-requires": "error",
"arrow-parens": [
"error",
"always"
],
"brace-style": [
"error",
"1tbs"
],
"comma-dangle": "error",
"default-case": "error",
"eqeqeq": [
"error",
"always"
],
"import/no-default-export": "off",
"import/order": "error",
"max-classes-per-file": [
"error",
1
],
"max-len": [
"error",
{
"code": 120
}
],
"max-lines": [
"error",
400
],
"no-duplicate-imports": "error",
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-multiple-empty-lines": [
"error",
{
"max": 2
}
],
"no-redeclare": "error",
"padding-line-between-statements": [
"off",
{
"blankLine": "always",
"prev": "*",
"next": "return"
}
],
"prefer-template": "error",
"yoda": "error"
}
},
{
"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