Skip to content

Commit 986b127

Browse files
authored
build(devs-infra): refactor structure to be like master (#852)
1 parent 04c0d32 commit 986b127

File tree

183 files changed

+9102
-8576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+9102
-8576
lines changed

.circleci/config.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.eslintignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
src/build/
2-
src/setup-jest.ts
1+
build/
32
node_modules/
4-
e2e/
3+
src/setup-jest.ts
54
coverage/
65
docs/
76
.eslintrc.js

.eslintrc.js

Lines changed: 81 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,100 @@ module.exports = {
44
es6: true,
55
'jest/globals': true,
66
},
7-
extends: [
8-
'eslint:recommended',
9-
'plugin:jest/recommended',
10-
'plugin:prettier/recommended'
11-
],
7+
parserOptions: {
8+
ecmaVersion: 2020,
9+
sourceType: 'module',
10+
ecmaFeatures: {
11+
jsx: true,
12+
},
13+
},
1214
overrides: [
1315
{
14-
"files": ["**/*.ts", "**/*.tsx"],
15-
"extends": [
16-
"eslint:recommended",
17-
'plugin:@typescript-eslint/recommended',
18-
'plugin:@typescript-eslint/recommended-requiring-type-checking',
19-
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
20-
'plugin:jest/recommended',
21-
'plugin:prettier/recommended'
22-
],
16+
files: ['*.ts'],
2317
parser: '@typescript-eslint/parser',
2418
parserOptions: {
2519
project: 'tsconfig.json',
26-
ecmaVersion: 2018,
27-
sourceType: 'module',
2820
impliedStrict: true,
29-
ecmaFeatures: {
30-
jsx: true,
31-
},
21+
createDefaultProgram: true,
3222
},
23+
plugins: ['eslint-plugin-prefer-arrow', 'import', 'jsdoc'],
24+
extends: [
25+
'plugin:@angular-eslint/recommended',
26+
'plugin:@typescript-eslint/recommended',
27+
'plugin:jest/recommended',
28+
'plugin:import/typescript',
29+
'plugin:prettier/recommended',
30+
],
3331
rules: {
32+
'@typescript-eslint/array-type': [
33+
'error',
34+
{
35+
'default': 'array-simple',
36+
}
37+
],
38+
'@angular-eslint/component-class-suffix': [
39+
'error',
40+
{
41+
'suffixes': [
42+
'Component',
43+
'Container',
44+
]
45+
}
46+
],
47+
'@angular-eslint/component-selector': [
48+
'error',
49+
{
50+
'type': 'element',
51+
'prefix': 'kebab-case',
52+
}
53+
],
54+
'@angular-eslint/directive-selector': [
55+
'error',
56+
{
57+
'type': 'attribute',
58+
'prefix': 'camelCase',
59+
}
60+
],
61+
'@typescript-eslint/comma-spacing': 'error',
62+
'@typescript-eslint/no-redeclare': 'off',
3463
'@typescript-eslint/no-unused-vars': ["error", { "argsIgnorePattern": "^_" }],
3564
'@typescript-eslint/no-unsafe-call': 'off',
3665
'@typescript-eslint/no-unsafe-member-access': 'off',
66+
'@typescript-eslint/no-var-requires': 'off',
67+
'@typescript-eslint/restrict-template-expressions': 'off',
68+
'@typescript-eslint/prefer-ts-expect-error': 'error',
69+
'import/order': [
70+
'error',
71+
{
72+
'alphabetize': {
73+
'order': 'asc',
74+
'caseInsensitive': true,
75+
},
76+
// this is the default order except for added `internal` in the middle
77+
'groups': [
78+
'builtin',
79+
'external',
80+
'internal',
81+
'parent',
82+
'sibling',
83+
'index',
84+
],
85+
'newlines-between': 'always',
86+
}
87+
],
88+
'object-shorthand': 'error',
89+
'padding-line-between-statements': [
90+
'error',
91+
{ 'blankLine': 'always', 'prev': '*', 'next': 'return' },
92+
],
93+
'prefer-object-spread': 'error',
3794
},
38-
plugins: ['@typescript-eslint', 'jest', 'jsdoc'],
39-
}
95+
},
4096
],
41-
plugins: ['jest', 'jsdoc'],
4297
rules: {
43-
'padding-line-between-statements': [
44-
"error",
45-
{ blankLine: "always", prev: "*", next: "return" }
46-
],
98+
'comma-spacing': 'off',
99+
'no-redeclare': 'off',
100+
'no-shadow': 'off',
101+
'quotes': 'off',
47102
},
48-
settings: {},
49103
}

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
# the repo. Unless a later match takes precedence,
33
# @global-owner1 and @global-owner2 will be requested for
44
# review when someone opens a pull request.
5-
* @thymikee

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'npm' # See documentation for possible values
9+
directory: '/' # Location of package manifests
10+
schedule:
11+
interval: 'daily'
12+
reviewers:
13+
- 'ahnpnl'
14+
- 'wtho'
15+
commit-message:
16+
prefix: 'build(deps-dev)'

.github/workflows/node.js.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
pull_request:
11+
branches:
12+
- '**'
13+
14+
jobs:
15+
cleanup-runs:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: rokroskar/workflow-run-cleanup-action@master
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
22+
23+
lint-and-typecheck:
24+
name: Running ESLint
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v2
28+
- name: Get yarn cache
29+
id: yarn-cache
30+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
31+
- uses: actions/cache@v2
32+
with:
33+
path: ${{ steps.yarn-cache.outputs.dir }}
34+
key: ubuntu-latest-node-12.x-yarn-${{ hashFiles('**/yarn.lock') }}
35+
restore-keys: |
36+
ubuntu-latest-node-12.x-yarn-
37+
- uses: actions/[email protected]
38+
with:
39+
node-version: 12.x
40+
- name: install
41+
run: yarn
42+
- name: build
43+
run: yarn build
44+
- name: run eslint
45+
run: yarn lint
46+
47+
test:
48+
name: Node v${{ matrix.node-version }} on ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
node-version: [12.x, 14.x]
53+
os: [ubuntu-latest, windows-latest]
54+
runs-on: ${{ matrix.os }}
55+
56+
steps:
57+
- name: Set git config
58+
shell: bash
59+
run: |
60+
git config --global core.autocrlf false
61+
git config --global core.symlinks true
62+
if: runner.os == 'Windows'
63+
- uses: actions/checkout@v2
64+
- name: Get yarn cache
65+
id: yarn-cache
66+
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
67+
- uses: actions/cache@v2
68+
with:
69+
path: ${{ steps.yarn-cache.outputs.dir }}
70+
key: ${{ runner.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
71+
restore-keys: |
72+
${{ runner.os }}-node-${{ matrix.node-version }}-yarn-
73+
- name: Use Node.js ${{ matrix.node-version }}
74+
uses: actions/[email protected]
75+
with:
76+
node-version: ${{ matrix.node-version }}
77+
- name: install
78+
run: yarn
79+
- name: build
80+
run: yarn build
81+
- name: run unit tests with CommomJS
82+
run: yarn test:ci
83+
- name: run e2e tests
84+
run: yarn test:e2e
85+
env:
86+
CI: true

0 commit comments

Comments
 (0)