Skip to content

Commit

Permalink
angular lint + tests + fix bucket filters
Browse files Browse the repository at this point in the history
Signed-off-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
  • Loading branch information
jma committed Oct 10, 2022
1 parent b51b1fc commit 6e399d3
Show file tree
Hide file tree
Showing 21 changed files with 2,175 additions and 809 deletions.
58 changes: 58 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "ng-core",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "ng-core",
"style": "camelCase",
"type": "attribute"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/eqeqeq": [
"error",
{
"allowNullOrUndefined": true
}
]
}
}
]
}
9 changes: 4 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,21 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: install package
run: |
npm install -g @angular/cli@8
npm install -g @angular/cli@14
npm ci
- name: run tests
run: |
./run-tests.sh
npm pack
env:
CI: true
17 changes: 16 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prefix": "ng-core",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/rero/ng-core/tsconfig.lib.json",
"project": "projects/rero/ng-core/ng-package.json"
Expand All @@ -28,6 +28,12 @@
"tsConfig": "projects/rero/ng-core/tsconfig.spec.json",
"karmaConfig": "projects/rero/ng-core/karma.conf.js"
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": ["projects/rero/ng-core/src/**/*.ts", "projects/rero/ng-core/src/**/*.html"]
}
}
}
},
Expand Down Expand Up @@ -146,6 +152,15 @@
"devServerTarget": "ng-core-tester:serve:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/ng-core-tester/src/**/*.ts",
"projects/ng-core-tester/src/**/*.html"
]
}
}
}
}
Expand Down
Loading

0 comments on commit 6e399d3

Please sign in to comment.