Skip to content

Ct/project init #1

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

Merged
merged 10 commits into from
Jul 29, 2022
Merged
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
16 changes: 16 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/polyfills.ts
194 changes: 194 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"src/**/*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:rxjs/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/recommended--extra",
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates",
"prettier"
],
"plugins": [ "jsdoc", "rxjs-angular", "unicorn" ],
"rules": {
// Excluded rules
"@typescript-eslint/no-empty-interface": "off",
"import/no-deprecated": "off",
"import/no-unresolved": "off",
"rxjs/no-async-subscribe": "off",
"rxjs/no-sharereplay": "off",
// Included rules
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "ngx",
"style": "kebab-case"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "ngx",
"style": "camelCase"
}
],
"@angular-eslint/no-host-metadata-property": [
"error",
{ "allowStatic": true }
],
"@angular-eslint/prefer-output-readonly": [ "error" ],
"@angular-eslint/use-component-selector": [ "error" ],
"@angular-eslint/use-component-view-encapsulation": [ "error" ],
"@angular-eslint/use-lifecycle-interface": [ "error" ],
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "never"
}
],
"@typescript-eslint/consistent-type-definitions": [ "error" ],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
// Only functions which are part of a declaration will be checked.
"allowExpressions": true
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "explicit" }
],
"@typescript-eslint/explicit-module-boundary-types": [ "error" ],
"@typescript-eslint/member-ordering": [
"error",
{
"default": [
"constructor",
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "classProperty",
"format": [ "PascalCase", "camelCase" ],
"modifiers": [ "public" ]
},
{
"selector": "function",
"format": [ "camelCase" ]
},
{
"selector": "interface",
"format": [ "PascalCase" ],
"custom": {
"regex": "^I[A-Z]",
"match": false
}
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-namespace": [
"error",
{ "allowDeclarations": true }
],
"@typescript-eslint/no-unused-expressions": [ "error" ],
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true,
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/prefer-for-of": [ "warn" ],
"@typescript-eslint/prefer-function-type": [ "warn" ],
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/unified-signatures": [ "warn" ],
"eqeqeq": [ "error" ],
"guard-for-in": [ "error" ],
"import/no-default-export": [ "error" ],
"jsdoc/check-alignment": [ "error" ],
"jsdoc/check-indentation": [ "error" ],
"no-bitwise": [ "error" ],
"no-caller": [ "error" ],
"no-console": [ "error" ],
"no-duplicate-imports": [ "error" ],
"no-empty": "error",
"no-eval": [ "error" ],
"no-new-wrappers": [ "error" ],
"no-throw-literal": [ "error" ],
"no-var": [ "error" ],
"object-shorthand": [ "error" ],
"one-var": [ "error", "never" ],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": [ "error" ],
"radix": [ "error" ],
"rxjs-angular/prefer-takeuntil": [
"error",
{ "alias": [ "untilDestroyed" ] }
],
"rxjs/no-exposed-subjects": [ "error" ],
"rxjs/no-finnish": [ "error" ],
"rxjs/no-ignored-replay-buffer": [ "error" ],
"rxjs/no-tap": [ "error" ],
"rxjs/no-unsafe-takeuntil": [
"error",
{ "alias": [ "untilDestroyed" ] }
],
"spaced-comment": [
"error",
"always",
{ "block": { "balanced": true } }
],
"unicorn/filename-case": [
"error",
{ "case": "kebabCase" }
]
}
},
{
"files": [
"src/**/*.html"
],
"parser": "@angular-eslint/template-parser",
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
32 changes: 32 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Displaying a sponsor button in your repository
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository

# LFX Mentorship (formerly CommunityBridge)
# https://lfx.linuxfoundation.org/tools/mentorship
community_bridge:
# GitHub Sponsors
# https://github.com/sponsors
github: [ProAngular, CodyTolene]
# IssueHunt
# https://issuehunt.io/
issuehunt:
# Ko-fi
# https://ko-fi.com/
ko_fi:
# Liberapay
# https://en.liberapay.com/
liberapay:
# Open Collective
# https://opencollective.com/
open_collective:
# Otechie
# https://otechie.com/
otechie:
# Patreon
# https://www.patreon.com/
patreon:
# Tidelift
# https://tidelift.com/
tidelift:
# Custom URL
custom: ["https://www.paypal.me/CodyTolene"]
26 changes: 26 additions & 0 deletions .github/workflows/on-merge-main-deploy-gpr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Github Package Deployment
# https://docs.github.com/en/packages
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Verify and Deploy to GitHub Packages
on:
push:
branches:
- main
jobs:
deploy_gpr_package:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://npm.pkg.github.com"
- run: npm ci
- run: npm run npm-build-package
- run: cd dist/npm && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/on-merge-main-deploy-npmjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# npmjs Package Deployment
# https://docs.npmjs.com/about-packages-and-modules

name: Verify and Deploy to npmjs
on:
push:
branches:
- main
jobs:
deploy_npmjs_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run npm-build-package
- run: cd dist/npm && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/verify-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Verify Pull Request"
on: pull_request
jobs:
verify_pull_request:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout 🛎️
run: npm ci

- name: Verify Code 👌
run: |
npm run lint
npm run prettier:check

- name: Build 🔧
run: |
npm run build:prod
npm run npm-build-package
Loading