Skip to content

Commit

Permalink
chore: Upgrade Angular to v17.1 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
sunriselink authored Feb 4, 2024
1 parent 2fcf323 commit c1f9457
Show file tree
Hide file tree
Showing 82 changed files with 12,673 additions and 15,420 deletions.
17 changes: 0 additions & 17 deletions .browserslistrc

This file was deleted.

14 changes: 0 additions & 14 deletions .editorconfig

This file was deleted.

52 changes: 12 additions & 40 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "@angular-eslint"],
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.app.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
Expand All @@ -33,36 +20,21 @@
"style": "camelCase"
}
],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"@angular-eslint/component-selector": [
"error",
{
"allowArgumentsExplicitlyTypedAsAny": true
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": ["src/**/*.spec.ts"],
"parserOptions": {
"project": "tsconfig.spec.json"
},
"extends": ["plugin:jasmine/recommended"],
"plugins": ["jasmine"],
"env": {
"jasmine": true
},
"rules": {
"@typescript-eslint/no-unused-vars": "off"
],
"@angular-eslint/prefer-on-push-component-change-detection": ["error"]
}
},
{
"files": ["*.component.html"],
"extends": ["plugin:@angular-eslint/template/recommended"]
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended", "plugin:prettier/recommended"],
"rules": {}
}
]
}
16 changes: 2 additions & 14 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@

# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

# Force the following filetypes to have windows EOL
*.* text eol=crlf

# Force LF for shell scripts
*.sh text eol=lf
# Force the following filetypes to have Unix EOL
* text=auto eol=lf

#
## These files are binary and should be left untouched
Expand All @@ -20,12 +15,5 @@
*.jpeg binary
*.gif binary
*.ico binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
*.jar binary
*.war binary
13 changes: 8 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ on: workflow_dispatch
jobs:
deploy:
runs-on: ubuntu-20.04
env:
NODE_ENV: production
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 12
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci --only=prod
run: npm ci
- name: Build
run: npm run build:prod
- name: Set up GitHub Pages repository
Expand All @@ -25,7 +27,8 @@ jobs:
working-directory: output
run: |
git rm -rfq .
cp -rv ../dist/har-viewer/** .
cp -rv ../dist/har-viewer/browser/** .
cp -v ../dist/har-viewer/3rdpartylicenses.txt .
git add --all
git commit -m "Update $(date +'%Y-%m-%d %H:%M:%S')"
git push
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 12
node-version-file: ".nvmrc"
- name: Install dependencies
run: npm ci
- name: Run unit tests
run: npm run test:ci
run: npm test -- --browsers=ChromeHeadless --no-watch --no-progress --no-source-map
- name: Run lint tests
run: npm run lint
26 changes: 10 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

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

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
npm-debug.log
yarn-error.log

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

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

# misc
/.sass-cache
# Miscellaneous
/.angular/cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
# System files
.DS_Store
Thumbs.db

src/app-vars.prod.ts
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no lint-staged
5 changes: 0 additions & 5 deletions .huskyrc.json

This file was deleted.

2 changes: 0 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
save=true
save-exact=true
git-tag-version=false
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11.0
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.angular/
dist/
package-lock.json
20 changes: 14 additions & 6 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"endOfLine": "crlf",
"bracketSameLine": false,
"endOfLine": "lf",
"printWidth": 120,
"quoteProps": "consistent",
"semi": true,
"tabWidth": 4,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false,
"htmlWhitespaceSensitivity": "ignore",
"overrides": [
{
"files": ["*.json", "*.scss", "*.yml", "*.webmanifest"],
"files": ["*.js", "*.ts", "*.html"],
"options": {
"tabWidth": 2
"tabWidth": 4
}
},
{
"files": ["*.js", "*.ts"],
"files": ["*.scss", "*.yml"],
"options": {
"singleQuote": true
"singleQuote": false
}
},
{
"files": "*.html",
"options": {
"parser": "angular"
}
}
]
Expand Down
Loading

0 comments on commit c1f9457

Please sign in to comment.