Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Uhlemann committed May 17, 2024
1 parent 71cbf31 commit f11e379
Show file tree
Hide file tree
Showing 6 changed files with 2,433 additions and 220 deletions.
41 changes: 41 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"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": {}
}
]
}
31 changes: 31 additions & 0 deletions .github/workflows/action_pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Pull Request"
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- uses: actions/setup-node@v2
with:
node-version: "20.13"
cache: "npm"

- name: Install modules
run: npm ci

- name: Lint frontend
run: npm run ng:lint

- name: Prettier
run: npm run format:check
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ testem.log
# System files
.DS_Store
Thumbs.db

.nx/cache
.nx/workspace-data
9 changes: 8 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@
"styles": ["src/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
}
}
}
},
"cli": {
"analytics": false
"analytics": false,
"schematicCollections": ["@angular-eslint/schematics"]
}
}
Loading

0 comments on commit f11e379

Please sign in to comment.