build: add eslint with angular-eslint and typescript-eslint

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QwNRDG9WaKM3Bb9WJddFzx
This commit is contained in:
kamask
2026-10-22 12:46:30 +03:00
co-authored by Claude Sonnet 5.5
parent b0bcd7ca2d
commit 5ab3d5faeb
3 changed files with 955 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
// @ts-check
import eslint from '@eslint/js';
import { defineConfig } from 'eslint/config';
import tseslint from 'typescript-eslint';
import angular from 'angular-eslint';
export default defineConfig([
{ ignores: ['dist', '.angular', 'pocketbase'] },
{
files: ['**/*.ts'],
extends: [
eslint.configs.recommended,
tseslint.configs.recommended,
tseslint.configs.stylistic,
angular.configs.tsRecommended,
],
processor: angular.processInlineTemplates,
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: [angular.configs.templateRecommended, angular.configs.templateAccessibility],
},
]);
+6
View File
@@ -7,6 +7,8 @@
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"serve:ssr:pchelpcrm": "node dist/pchelpcrm/server/server.mjs",
"pb:serve": "pocketbase serve --dir pocketbase/pb_data --migrationsDir pocketbase/pb_migrations --dev",
"pb:superuser": "node --env-file=.env scripts/pb-superuser.mjs",
@@ -31,11 +33,15 @@
"@angular/build": "^22.2.3",
"@angular/cli": "^22.2.3",
"@angular/compiler-cli": "^22.2.0",
"@eslint/js": "^10.0.1",
"@types/express": "^5.0.1",
"@types/node": "^22.12.0",
"angular-eslint": "^22.6.0",
"eslint": "^10.13.0",
"jsdom": "^30.0.0",
"prettier": "^3.8.1",
"typescript": "~6.0.2",
"typescript-eslint": "^8.72.0",
"vitest": "^5.0.0"
}
}
+916
View File
File diff suppressed because it is too large Load Diff