diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..747b20b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,92 @@ +{ + "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": { + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/explicit-member-accessibility": [ + "off", + { + "accessibility": "explicit" + } + ], + "@typescript-eslint/member-ordering": [ + "error", + { + "default": [ + "static-field", + "instance-field", + "static-method", + "instance-method" + ] + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": ["app", "openlp"], + "style": "kebab-case" + } + ], + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": ["app", "openlp"], + "style": "camelCase" + } + ], + "@typescript-eslint/naming-convention": [ + "error", + { + "selector": ["variable"], + "modifiers": ["readonly"], + "format": ["UPPER_CASE"] + } + ], + "jsdoc/no-types": [ + "off" + ], + "prefer-arrow/prefer-arrow-functions": [ + "off" + ], + "brace-style": "off", + "@typescript-eslint/brace-style": [ + "off" + ], + "id-blacklist": "off", + "id-match": "off", + "no-underscore-dangle": "off" + } + }, + { + "files": [ + "*.html" + ], + "extends": [ + "plugin:@angular-eslint/template/recommended" + ], + "rules": {} + } + ] +} diff --git a/.gitignore b/.gitignore index f223915..d35a5f1 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ npm-debug.log yarn-error.log testem.log /typings +/.angular/cache # System Files .DS_Store diff --git a/angular.json b/angular.json index c477d6c..bf9160f 100644 --- a/angular.json +++ b/angular.json @@ -9,9 +9,9 @@ "sourceRoot": "src", "projectType": "application", "schematics": { - "@schematics/angular:component": { - "styleext": "scss" - } + "@schematics/angular:component": { + "style": "scss" + } }, "architect": { "build": { @@ -86,14 +86,11 @@ } }, "lint": { - "builder": "@angular-devkit/build-angular:tslint", + "builder": "@angular-eslint/builder:lint", "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" ] } } @@ -111,16 +108,15 @@ } }, "lint": { - "builder": "@angular-devkit/build-angular:tslint", + "builder": "@angular-eslint/builder:lint", "options": { - "tsConfig": "e2e/tsconfig.e2e.json", - "exclude": [ - "**/node_modules/**" + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" ] } } } } - }, - "defaultProject": "@openlp/web-remote" + } } diff --git a/package.json b/package.json index 9fc1906..c080b6a 100644 --- a/package.json +++ b/package.json @@ -24,44 +24,52 @@ "e2e": "ng e2e" }, "dependencies": { - "@angular/animations": "^11.0.5", - "@angular/cdk": "^11.0.3", - "@angular/common": "^11.0.5", - "@angular/compiler": "^11.0.5", - "@angular/core": "^11.0.5", - "@angular/flex-layout": "^11.0.0-beta.33", - "@angular/forms": "^11.0.5", - "@angular/material": "^11.0.3", - "@angular/platform-browser": "^11.0.5", - "@angular/platform-browser-dynamic": "^11.0.5", - "@angular/router": "^11.0.5", - "@fontsource/roboto": "^4.4.5", - "core-js": "^3.8.1", + "@angular/animations": "^15.0.2", + "@angular/cdk": "^15.0.2", + "@angular/common": "^15.0.2", + "@angular/compiler": "^15.0.2", + "@angular/core": "^15.0.2", + "@angular/forms": "^15.0.2", + "@angular/material": "^15.0.2", + "@angular/platform-browser": "^15.0.2", + "@angular/platform-browser-dynamic": "^15.0.2", + "@angular/router": "^15.0.2", + "@fontsource/roboto": "^4.5.8", + "core-js": "^3.26.1", "hammerjs": "^2.0.8", - "material-icons": "^1.12.1", - "rxjs": "^6.6.3", - "zone.js": "^0.10.3" + "material-icons": "^1.13.1", + "rxjs": "^7.6.0", + "zone.js": "^0.12.0" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1100.5", - "@angular/cli": "~11.0.5", - "@angular/compiler-cli": "^11.0.5", - "@angular/language-service": "^11.0.5", - "@types/jasmine": "~3.6.2", - "@types/jasminewd2": "~2.0.8", - "@types/node": "~14.14.16", - "codelyzer": "~6.0.1", - "jasmine-core": "~3.6.0", - "jasmine-spec-reporter": "~6.0.0", - "karma": "~5.2.3", - "karma-chrome-launcher": "~3.1.0", + "@angular-devkit/build-angular": "^15.0.3", + "@angular-eslint/builder": "^15.0.3", + "@angular-eslint/eslint-plugin": "^15.1.0", + "@angular-eslint/eslint-plugin-template": "^15.1.0", + "@angular-eslint/schematics": "^15.1.0", + "@angular-eslint/template-parser": "^15.1.0", + "@angular/cli": "~15.0.2", + "@angular/compiler-cli": "^15.0.2", + "@angular/language-service": "^15.0.2", + "@types/jasmine": "~4.3.1", + "@types/jasminewd2": "~2.0.10", + "@types/node": "~18.11.13", + "@typescript-eslint/eslint-plugin": "5.44.0", + "@typescript-eslint/parser": "5.44.0", + "eslint": "^8.28.0", + "eslint-plugin-import": "~2.26.0", + "eslint-plugin-jsdoc": "~39.6.4", + "eslint-plugin-prefer-arrow": "~1.2.3", + "jasmine-core": "~4.5.0", + "jasmine-spec-reporter": "~7.0.0", + "karma": "~6.4.1", + "karma-chrome-launcher": "~3.1.1", "karma-coverage-istanbul-reporter": "~3.0.3", - "karma-jasmine": "~4.0.1", - "karma-jasmine-html-reporter": "^1.5.4", + "karma-jasmine": "~5.1.0", + "karma-jasmine-html-reporter": "^2.0.0", "protractor": "~7.0.0", - "ts-node": "~9.1.1", - "tslint": "~6.1.3", - "typescript": "~4.0.5" + "ts-node": "~10.9.1", + "typescript": "~4.8.2" }, "private": true } diff --git a/src/app/app.component.html b/src/app/app.component.html index 36184e6..648b30a 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -40,28 +40,34 @@