Skip to content

Commit

Permalink
add linting
Browse files Browse the repository at this point in the history
  • Loading branch information
antonborisoff committed Feb 15, 2024
1 parent cfa4655 commit 2f69b48
Show file tree
Hide file tree
Showing 6 changed files with 2,494 additions and 194 deletions.
47 changes: 47 additions & 0 deletions .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": {}
}
]
}
27 changes: 27 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Pull Request Checks

on: [pull_request]

jobs:
execute-pr-checks:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4

- name: setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: install Angular CLI
run: npm install -g @angular/[email protected]

- name: install dependencies
run: npm ci

- name: run linting
run: npm run lint



14 changes: 14 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,22 @@
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
Loading

0 comments on commit 2f69b48

Please sign in to comment.