-
Notifications
You must be signed in to change notification settings - Fork 1
add: lint #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
add: lint #148
Changes from all commits
bf6210a
8de83ec
2b60bc9
434ddb1
3f04237
a6db927
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| src/app/utils/deepEqual.ts | ||
| src/index.html |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,85 @@ | ||
| { | ||
| "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/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"], | ||
|
Comment on lines
+40
to
+44
|
||
| "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"] | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
|
|
@@ -38,9 +88,9 @@ | |
| "*.html" | ||
| ], | ||
| "extends": [ | ||
| "plugin:@angular-eslint/template/recommended" | ||
| ], | ||
| "rules": {} | ||
| "plugin:@angular-eslint/template/recommended", | ||
| "plugin:@angular-eslint/template/accessibility" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * text=auto eol=lf |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: ['**'] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| cache: npm | ||
|
|
||
| - name: Install packages | ||
| run: npm ci | ||
|
|
||
| - name: Check linting rules | ||
| run: npm run lint | ||
|
|
||
| publish-docker: | ||
| name: Publish Docker | ||
| runs-on: ubuntu-latest | ||
| needs: lint | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Publish to Registry | ||
| uses: elgohr/Publish-Docker-Github-Action@v5 | ||
| with: | ||
| name: ${{ github.repository }} | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| registry: ghcr.io |
This file was deleted.
| 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
[*.ts]section was removed, soquote_type/max_line_lengthnow apply to all files under[*]. If the intent was to scope these settings to TypeScript only, reintroduce the[*.ts]header (or split settings per file type) to avoid unintended editor behavior.