Skip to content

Commit

Permalink
ref/ eslint conf
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegris committed Jun 19, 2021
1 parent 1fb08a7 commit af0a677
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 54 deletions.
66 changes: 17 additions & 49 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,81 +1,49 @@
{
"env": {
"browser": true,
"node": true,
"es6": true,
"es2017": true
},
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 10,
"project": [
"./tsconfig.serve.json",
"./src/tsconfig.app.json",
"./src/tsconfig.spec.json",
"./e2e/tsconfig.e2e.json"
],
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
"createDefaultProgram": true
},
"plugins": [
"@typescript-eslint",
"@angular-eslint/eslint-plugin"
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@typescript-eslint/indent": [
"@angular-eslint/directive-selector": 0,
"@angular-eslint/component-selector": [
"error",
2,
{
"SwitchCase": 1,
"CallExpression": {
"arguments": "first"
},
"FunctionExpression": {
"parameters": "first"
},
"FunctionDeclaration": {
"parameters": "first"
}
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-unsafe-call": 0,
"@typescript-eslint/no-unsafe-member-access": 0,
"@typescript-eslint/no-unsafe-assignment": 0,
"@typescript-eslint/no-unsafe-return": 0,
"@typescript-eslint/no-floating-promises": 0,
"@typescript-eslint/semi": "error",
"@angular-eslint/use-injectable-provided-in": "error",
"@angular-eslint/no-attribute-decorator": "error"
]
}
},
{
"files": [
"*.component.html"
],
"parser": "@angular-eslint/template-parser",
"plugins": [
"@angular-eslint/template"
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/banana-in-box": "error",
"@angular-eslint/template/no-negated-async": "error"
}
}
]
}
}
16 changes: 11 additions & 5 deletions src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
"baseUrl": "",
"types": []
},
"include": [
"files": [
"main.ts",
"polyfills.ts",
"app/**/*.ts",
"environments/**/*.ts"
"polyfills.ts"
],
"include": [
"**/*.d.ts"
],
"exclude": [
"**/*.spec.ts"
],
"angularCompilerOptions": {
"strictTemplates": true,
"fullTemplateTypeCheck": true,
"annotateForClosureCompiler": true,
"strictInjectionParameters": true,
"preserveWhitespaces": true
"skipTemplateCodegen": false,
"preserveWhitespaces": true,
"skipMetadataEmit": false,
"disableTypeScriptVersionCheck": true
}
}

0 comments on commit af0a677

Please sign in to comment.