Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplify routing and translation loading, extend linting/prettier, added default test casesFeat/migration #1

Merged
merged 7 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line.
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
9 changes: 9 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-case": [2, "always", ["lowerCase"]],
"type-enum": [2, "always", ["build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "ticket"]],
"subject-min-length": [2, "always", [5]],
"subject-max-length": [2, "always", [200]]
}
}
42 changes: 42 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
.vscode/
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/.gitlab*
/connect.lock
/coverage
/libpeerconnection.log
/typings
*.log

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
76 changes: 76 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"root": true,
"ignorePatterns": [
".angular/**",
".husky/**",
".github/**",
"coverage/**",
"dist/**",
"helm/**",
"node_modules/**",
"src/app/generated/**",
"src/app/api/*",
"src/app/model/*"
],
"overrides": [
{
"files": ["*.ts", "*.js"],
"env": { "es6": true },
"globals": {
"__dirname": true
},
"parserOptions": {
"ecmaVersion": "latest",
"project": "**/tsconfig.json",
"tsconfigRootDir": "",
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
"rules": {
"semi": ["error", "never"],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "tm",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"warn",
{
"type": "element",
"prefix": "tm",
"style": "kebab-case"
}
],
"prettier/prettier": [
"error",
{
"singleQuote": true
}
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { "vars": "all", "args": "none" }]
}
},
{
"files": ["*.html"],
"excludedFiles": ["*inline-template-*.component.html"],
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"parser": "angular"
}
]
}
}
]
}
13 changes: 13 additions & 0 deletions .github/changelog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sections:
- title: Major changes
labels:
- "release/super-feature"
- title: Complete changelog
labels:
- "bug"
- "enhancement"
- "dependencies"
template: |
{{ range $section := .Sections }}{{ if $section.Items }}### {{ $section.GetTitle }}{{ range $item := $section.Items }}
* [#{{ $item.GetID }}]({{ $item.GetURL }}) - {{ $item.GetTitle }}{{ end }}{{ end }}
{{ end }}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
labels:
- dependencies
15 changes: 15 additions & 0 deletions .github/workflows/build-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Build Feature Branch

on:
workflow_dispatch:
push:
branches:
- '**'
- '!main'
- '!fix/[0-9]+.[0-9]+.x'

jobs:
branch:
uses: onecx/ci-angular/.github/workflows/build-branch.yml@v1
secrets: inherit

9 changes: 9 additions & 0 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Build Pull Request

on:
pull_request:

jobs:
pr:
uses: onecx/ci-angular/.github/workflows/build-pr.yml@v1
secrets: inherit
9 changes: 9 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Build Release
on:
push:
tags:
- '**'
jobs:
release:
uses: onecx/ci-angular/.github/workflows/build-release.yml@v1
secrets: inherit
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build

on:
workflow_dispatch:
push:
branches:
- 'main'
- 'fix/[0-9]+.[0-9]+.x'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:
uses: onecx/ci-angular/.github/workflows/build.yml@v1
secrets: inherit
8 changes: 8 additions & 0 deletions .github/workflows/create-fix-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Create Fix Branch
on:
workflow_dispatch:
jobs:
fix:
uses: onecx/ci-common/.github/workflows/create-fix-branch.yml@v1
secrets: inherit

7 changes: 7 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Create Release Version
on:
workflow_dispatch:
jobs:
release:
uses: onecx/ci-common/.github/workflows/create-release.yml@v1
secrets: inherit
17 changes: 17 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Update documentation
on:
push:
branches: [ main ]
paths:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger website update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.CI_PAT }}
repository: onecx/docs
event-type: dispatch-build-website
12 changes: 12 additions & 0 deletions .github/workflows/sonar-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Sonar Pull Request

on:
workflow_run:
workflows: ["Build Pull Request"]
types:
- completed

jobs:
pr:
uses: onecx/ci-angular/.github/workflows/angular-pr-sonar.yml@v1
secrets: inherit
47 changes: 47 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.angular/cache
/.sass-cache
/.gitlab*
/connect.lock
/coverage
/libpeerconnection.log
/typings
*.log
*.sh

# System Files
.DS_Store
Thumbs.db
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo "[Husky] Running lint check:"
npm run lint
echo "[Husky] Running prettier check:"
npx prettier -c .
19 changes: 19 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.angular/**
.husky/**
.docusaurus/
.github/**
.prettierignore
.browserslistrc
coverage/**
dist/**
helm/**
nginx/**
node_modules
CHANGELOG.md
README.md
Dockerfile
*.log
*.sh
src/app/generated/**
src/app/api/*
src/app/model/*
Loading
Loading