Skip to content

Commit

Permalink
Switch to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-bcl committed Jun 17, 2024
1 parent f0c7ccc commit 626f43c
Show file tree
Hide file tree
Showing 15 changed files with 20,061 additions and 178 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ User accounts are stored across an LDAP cluster (for authentication, user prefer
## Build
### Dependencies
The following dependencies are required to build this application:
* [JDK 17](https://jdk.java.net/)
* [JDK 21](https://jdk.java.net/)
* [Angular CLI](https://cli.angular.io/) (`npm install -g @angular/cli`)

### Gradle
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ test.dependsOn(npm_test)
sourceSets { main.resources.srcDirs 'ui/dist' }
clean { delete 'ui/dist' }

//Tests
// Tests
test {
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
}


// Jacoco test coverage
jacoco.toolVersion '0.8.12'
jacocoTestReport.reports.html.destination file("${buildDir}/reports/coverage/test")
Expand Down
6 changes: 6 additions & 0 deletions ui/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
public
assets
cypress.json
reporter-config.json
dist/
47 changes: 47 additions & 0 deletions ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
}
]
}
22 changes: 9 additions & 13 deletions ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,21 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "ui:build"
"buildTarget": "ui:build"
},
"configurations": {
"dev": {
"browserTarget": "ui:build:dev"
"buildTarget": "ui:build:dev"
},
"production": {
"browserTarget": "ui:build:production"
"buildTarget": "ui:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "ui:build"
"buildTarget": "ui:build"
}
},
"test": {
Expand All @@ -116,19 +116,15 @@
}
},
"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"
]
}
}
}
}
},
"defaultProject": "ui"
}
}
Loading

0 comments on commit 626f43c

Please sign in to comment.