Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/utils/deepEqual.ts
index.html
67 changes: 59 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,86 @@
{
"root": true,
"ignorePatterns": [
"src/utils"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig.app.json"]
},
"plugins": [
"import"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:prettier/recommended"
],
"rules": {
"@angular-eslint/prefer-standalone": "off",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "norcus",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "norcus",
"prefix": "app",
"style": "kebab-case"
}
],
"@typescript-eslint/explicit-function-return-type": "error",

"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"comma-spacing": ["error", { "before": false, "after": true }],
"eqeqeq": ["error", "always"],
"curly": ["error", "all"],
"no-fallthrough": "error",
"no-implicit-coercion": "error",
"no-return-await": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/array-type": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
}
],
"import/order": [
"error",
{
"alphabetize": { "order": "asc", "caseInsensitive": true },
"newlines-between": "always",
"groups": [
"builtin",
"external",
"internal",
["parent", "sibling", "index"]
],
"pathGroups": [
{
"pattern": "@angular/**",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
]
}
},
Expand All @@ -38,9 +89,9 @@
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
]
}
]
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
32 changes: 32 additions & 0 deletions .github/workflows/jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint and publish docker image
on: [push]
jobs:
lint:
name: Frontend lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 24
- name: Install packages
run: npm ci
- name: Check linting rules
run: npm run lint

build:
name: Build and Publish Docker Image
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: lint
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: ${{ github.repository }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
15 changes: 0 additions & 15 deletions .github/workflows/publish-docker.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .prettierrc.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Config } from "prettier";

const config: Config = {
arrowParens: "avoid",
bracketSpacing: true,
bracketSameLine: false,
endOfLine: "lf",
htmlWhitespaceSensitivity: "css",
objectWrap: "preserve",
quoteProps: "consistent",
semi: true,
singleAttributePerLine: true,
singleQuote: false,
tabWidth: 2,
trailingComma: "es5",
useTabs: false,
};

export default config;
12 changes: 12 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "stylelint-config-standard",
"plugins": ["stylelint-scss"],
"customSyntax": "postcss-scss",
"rules": {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"selector-pseudo-element-no-unknown": [true, {
"ignorePseudoElements": ["ng-deep"]
}]
}
}
18 changes: 15 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumWarning": "1mb",
"maximumError": "10mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb"
"maximumWarning": "10kb"
}
],
"outputHashing": "all",
Expand Down Expand Up @@ -107,12 +107,24 @@
],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"cli": {
"analytics": false
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@schematics/angular:component": {
Expand Down
Loading
Loading