diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 871bd07640..a9920c19b9 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -14,6 +14,7 @@ jobs:
ci:
name: Unit Tests
runs-on: ubuntu-latest
+ timeout-minutes: 20
steps:
- name: Checkout
@@ -30,7 +31,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
- run: yarn install
+ run: yarn
working-directory: Composer
- name: yarn build:dev
run: yarn build:dev
@@ -57,6 +58,7 @@ jobs:
e2e:
name: E2E Tests
runs-on: ubuntu-latest
+ timeout-minutes: 20
steps:
- name: Checkout
@@ -73,7 +75,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: yarn install
- run: yarn install
+ run: yarn
working-directory: Composer
- name: yarn build:prod
run: yarn build:prod
@@ -95,13 +97,15 @@ jobs:
botproject:
name: BotProject
runs-on: windows-latest
+ timeout-minutes: 20
+
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Set Dotnet Version
uses: actions/setup-dotnet@v1
with:
- dotnet-version: "2.1.802" # SDK Version to use.
+ dotnet-version: "3.0.100" # SDK Version to use.
- name: dotnet build
run: dotnet build
working-directory: BotProject/CSharp
diff --git a/.vscode/launch.json b/.vscode/launch.json
index ca988a664a..2506014c71 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -30,7 +30,7 @@
"type": "node",
"request": "attach",
"name": "Server: Attach",
- "port": 9229,
+ "port": 9228,
"sourceMaps": true
}
]
diff --git a/Composer/.eslintrc.js b/Composer/.eslintrc.js
index 1f2073e10f..678fddde71 100644
--- a/Composer/.eslintrc.js
+++ b/Composer/.eslintrc.js
@@ -6,8 +6,9 @@ module.exports = {
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/eslint-recommended',
'prettier/@typescript-eslint',
+ 'plugin:@bfc/bfcomposer/recommended',
],
- plugins: ['import', 'notice', 'security'],
+ plugins: ['import', 'notice', 'security', 'lodash'],
env: {
browser: true,
es6: true,
@@ -21,6 +22,8 @@ module.exports = {
templateFile: require.resolve('./license.js'),
},
],
+
+ // typescript
'@typescript-eslint/ban-ts-ignore': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
@@ -54,6 +57,27 @@ module.exports = {
'security/detect-possible-timing-attacks': 'error',
'security/detect-pseudoRandomBytes': 'error',
'security/detect-unsafe-regex': 'error',
+
+ // lodash
+ 'lodash/callback-binding': 'error',
+ 'lodash/collection-method-value': 'error',
+ 'lodash/collection-return': 'error',
+ 'lodash/no-double-unwrap': 'error',
+ 'lodash/no-extra-args': 'error',
+ 'lodash/no-unbound-this': 'error',
+ 'lodash/unwrap': 'error',
+ 'lodash/identity-shorthand': 'error',
+ 'lodash/import-scope': ['error', 'method'],
+ 'lodash/matches-prop-shorthand': 'error',
+ 'lodash/matches-shorthand': 'error',
+ 'lodash/path-style': 'error',
+ 'lodash/prefer-compact': 'error',
+ 'lodash/prefer-flat-map': 'error',
+ 'lodash/prefer-immutable-method': 'error',
+ 'lodash/prefer-map': 'error',
+ 'lodash/prefer-reject': 'error',
+ 'lodash/preferred-alias': 'error',
+ 'lodash/prop-shorthand': 'error',
},
overrides: [
{
diff --git a/Composer/.eslintrc.react.js b/Composer/.eslintrc.react.js
index e6b9ee820e..5463727b2f 100644
--- a/Composer/.eslintrc.react.js
+++ b/Composer/.eslintrc.react.js
@@ -1,6 +1,6 @@
module.exports = {
extends: ['./.eslintrc.js', 'plugin:react/recommended'],
- plugins: ['react-hooks', 'format-message'],
+ plugins: ['react-hooks', 'format-message', 'emotion'],
settings: {
react: {
version: '16.9.0',
@@ -14,17 +14,23 @@ module.exports = {
},
},
rules: {
+ // format message
'format-message/literal-pattern': 'error',
'format-message/no-invalid-pattern': 'error',
'format-message/no-missing-params': ['error', { allowNonLiteral: false }],
+ // react hooks
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'error',
+ // react
'react/display-name': 'off',
'react/no-danger': 'error',
'react/no-deprecated': 'warn',
'react/prop-types': 'warn',
+
+ // emotion
+ 'emotion/jsx-import': 'error',
},
overrides: [
{
diff --git a/Composer/package.json b/Composer/package.json
index 37096dafe5..e398eab00a 100644
--- a/Composer/package.json
+++ b/Composer/package.json
@@ -61,6 +61,7 @@
"@babel/preset-env": "7.3.0",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.3.3",
+ "@bfc/eslint-plugin-bfcomposer": "*",
"@emotion/babel-preset-css-prop": "^10.0.17",
"@typescript-eslint/eslint-plugin": "2.6.0",
"@typescript-eslint/parser": "2.6.0",
@@ -72,9 +73,11 @@
"cypress-testing-library": "^3.0.1",
"eslint": "^5.15.1",
"eslint-config-prettier": "^4.1.0",
+ "eslint-plugin-emotion": "^10.0.14",
"eslint-plugin-format-message": "^6.2.3",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "6.1.2",
+ "eslint-plugin-lodash": "^6.0.0",
"eslint-plugin-notice": "^0.7.8",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "7.12.4",
diff --git a/Composer/packages/client/__tests__/components/errorBoundary.test.js b/Composer/packages/client/__tests__/components/errorBoundary.test.js
index cb1431475b..b5ade17ce8 100644
--- a/Composer/packages/client/__tests__/components/errorBoundary.test.js
+++ b/Composer/packages/client/__tests__/components/errorBoundary.test.js
@@ -24,20 +24,31 @@ const ProblemChild = () => {
};
describe('