forked from project-chip/certification-tool-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request project-chip#1 from sammachin/open-source
- Loading branch information
Showing
180 changed files
with
37,907 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: | ||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/typescript-node | ||
{ | ||
"name": "Frontend: CHIP Test Harness", | ||
"build": { | ||
"dockerfile": "../Dockerfile", | ||
}, | ||
"settings": { | ||
"terminal.integrated.shell.linux": "/bin/bash" | ||
}, | ||
|
||
// The optional 'workspaceFolder' property is the path VS Code should open by default when | ||
// connected. This is typically a file mount in .devcontainer/docker-compose.yml | ||
"workspaceFolder": "/app", | ||
|
||
// Add the IDs of extensions you want installed when the container is created. | ||
"extensions": [ | ||
"dbaeumer.vscode-eslint", | ||
"ms-vscode.vscode-typescript-tslint-plugin", | ||
"msjsdiag.debugger-for-chrome", | ||
"Angular.ng-template", | ||
"ms-vscode.vscode-typescript-tslint-plugin", | ||
"esbenp.prettier-vscode", | ||
"mikael.angular-beastcode", | ||
"cyrilletuzi.angular-schematics", | ||
"angular.ng-template" | ||
], | ||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
"forwardPorts": [4200], | ||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "npm install" | ||
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. | ||
// "remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es6": true, | ||
"node": true | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"*.ts" | ||
], | ||
"parserOptions": { | ||
"project": [ | ||
"./tsconfig.json" | ||
] | ||
} | ||
} | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@angular-eslint/eslint-plugin", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"@angular-eslint/component-class-suffix": "error", | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "app", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"@angular-eslint/directive-class-suffix": "error", | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "app", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/no-host-metadata-property": "error", | ||
"@angular-eslint/no-input-rename": "error", | ||
"@angular-eslint/no-inputs-metadata-property": "error", | ||
"@angular-eslint/no-output-rename": "error", | ||
"@angular-eslint/no-outputs-metadata-property": "error", | ||
"@angular-eslint/use-lifecycle-interface": "error", | ||
"@angular-eslint/use-pipe-transform-interface": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/dot-notation": "off", | ||
"@typescript-eslint/explicit-member-accessibility": [ | ||
"off", | ||
{ | ||
"accessibility": "explicit" | ||
} | ||
], | ||
"@typescript-eslint/indent": [ | ||
"error", | ||
2 | ||
], | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/member-ordering": "error", | ||
"@typescript-eslint/naming-convention": "error", | ||
"@typescript-eslint/no-empty-function": "off", | ||
"@typescript-eslint/no-empty-interface": "error", | ||
"@typescript-eslint/no-inferrable-types": [ | ||
"error", | ||
{ | ||
"ignoreParameters": true | ||
} | ||
], | ||
"@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-non-null-assertion": "error", | ||
"@typescript-eslint/no-shadow": [ | ||
"error", | ||
{ | ||
"hoist": "all" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-expressions": "error", | ||
"@typescript-eslint/no-use-before-define": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/semi": [ | ||
"error", | ||
"always" | ||
], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/unified-signatures": "error", | ||
"arrow-body-style": "error", | ||
"brace-style": [ | ||
"error", | ||
"1tbs" | ||
], | ||
"constructor-super": "error", | ||
"curly": "error", | ||
"dot-notation": "off", | ||
"eol-last": "error", | ||
"eqeqeq": [ | ||
"error", | ||
"smart" | ||
], | ||
"guard-for-in": "error", | ||
"id-blacklist": "off", | ||
"id-match": "off", | ||
"indent": [ | ||
"error", | ||
2 | ||
], | ||
"max-len": [ | ||
"error", | ||
{ | ||
"code": 140 | ||
} | ||
], | ||
"no-bitwise": "error", | ||
"no-caller": "error", | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"log", | ||
"warn", | ||
"dir", | ||
"timeLog", | ||
"assert", | ||
"clear", | ||
"count", | ||
"countReset", | ||
"group", | ||
"groupEnd", | ||
"table", | ||
"dirxml", | ||
"error", | ||
"groupCollapsed", | ||
"Console", | ||
"profile", | ||
"profileEnd", | ||
"timeStamp", | ||
"context" | ||
] | ||
} | ||
], | ||
"no-debugger": "error", | ||
"no-empty": "off", | ||
"no-empty-function": "off", | ||
"no-eval": "error", | ||
"no-fallthrough": "error", | ||
"no-new": "error", | ||
"no-new-wrappers": "error", | ||
"no-restricted-imports": "error", | ||
"no-labels": "error", | ||
"no-shadow": "error", | ||
"no-throw-literal": "error", | ||
"no-trailing-spaces": "error", | ||
"no-undef-init": "error", | ||
"no-underscore-dangle": "off", | ||
"no-unused-expressions": "error", | ||
"no-unused-labels": "error", | ||
"no-use-before-define": "error", | ||
"no-var": "error", | ||
"no-irregular-whitespace": "error", | ||
"prefer-const": "error", | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"radix": "error", | ||
"semi": "error", | ||
"spaced-comment": [ | ||
"error", | ||
"always", | ||
{ | ||
"markers": [ | ||
"/" | ||
] | ||
} | ||
], | ||
"valid-typeof": "error" | ||
} | ||
} | ||
// the following rules from tslint can't be find on eslint rules | ||
// member-ordering | ||
// no-inputs-metadata-property | ||
// no-outputs-metadata-property | ||
// no-host-metadata-property | ||
// no-input-rename | ||
// no-output-rename | ||
// use-lifecycle-interface | ||
// use-pipe-transform-interface | ||
// component-class-suffix | ||
// directive-class-suffix | ||
// no-access-missing-member | ||
// templates-use-public | ||
// invoke-injectable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Node.js CI | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [14.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: npm run build --if-present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: npm linting | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: setup-node | ||
uses: actions/setup-python@v1 | ||
with: | ||
node-version: 14.x | ||
- name: Install Dependencies | ||
run: | | ||
npm install | ||
- name: Code Linting | ||
run: | | ||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
version: 3 | ||
|
||
# https://developer.github.com/v3/previews/#draft-pull-requests | ||
github_api_version: "shadow-cat-preview" | ||
|
||
pullapprove_conditions: | ||
- "base.ref == 'develop'" | ||
|
||
############################################################ | ||
# Notifications | ||
############################################################ | ||
|
||
notifications: | ||
############################################################ | ||
# New contributors | ||
############################################################ | ||
- when: pull_request.opened | ||
if: "author_association == 'FIRST_TIME_CONTRIBUTOR'" | ||
comment: | | ||
Hey @{{ author }}, thanks for the PR! The review will start once | ||
the tests and CI checks have passed. If they don't, please review | ||
the logs and try to fix the issues (ask for help if you can't | ||
figure it out). A reviewer will be assigned once the tests are | ||
passing and they'll walk you through getting the PR finished | ||
and merged. | ||
groups: | ||
############################################################ | ||
# Shared Reviewer Groups | ||
############################################################ | ||
dev-team-reviewers: | ||
conditions: | ||
- files.include('*') | ||
reviewers: | ||
teams: [test-harness-devs] | ||
reviews: | ||
request: 2 | ||
required: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"angular.ng-template", | ||
], | ||
// List of extensions recommended by VS Code that should not be recommended for users of this workspace. | ||
"unwantedRecommendations": [ | ||
|
||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "npm start", | ||
"name": "Run npm start", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
}, | ||
{ | ||
"type": "pwa-chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:8080", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
] | ||
} |
Oops, something went wrong.