Skip to content

Commit 6630344

Browse files
WIP
1 parent ad19b9b commit 6630344

File tree

232 files changed

+985
-723
lines changed

Some content is hidden

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

232 files changed

+985
-723
lines changed

.eslintrc.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
"node": true
66
},
77
"extends": [
8-
"eslint:recommended"
8+
"eslint:recommended",
9+
"plugin:import/typescript"
910
],
1011
"parser": "babel-eslint",
1112
"plugins": [
13+
"import",
1214
"react"
1315
],
1416
"rules": {
@@ -72,6 +74,8 @@
7274
"id-blacklist": "error",
7375
"id-length": "off",
7476
"id-match": "error",
77+
"import/no-extraneous-dependencies": "error",
78+
"import/no-unresolved": [2, { "commonjs": true }],
7579
"indent": "off",
7680
"indent-legacy": "off",
7781
"init-declarations": "off",
@@ -102,7 +106,6 @@
102106
"no-bitwise": "error",
103107
"no-buffer-constructor": "error",
104108
"no-caller": "error",
105-
"no-catch-shadow": "error",
106109
"no-confusing-arrow": "error",
107110
"no-console": "off",
108111
"no-continue": "off",
@@ -280,5 +283,19 @@
280283
"error",
281284
"never"
282285
]
286+
},
287+
"settings": {
288+
"import/resolver": {
289+
"node": {
290+
"extensions": [
291+
".d.ts",
292+
".js",
293+
".json",
294+
".jsx",
295+
".ts",
296+
".tsx"
297+
]
298+
}
299+
}
283300
}
284301
}

babel.config.js

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* global module require */
2-
31
/*
42
* dependencies of this config should be specified in `./package.json` relative
53
* to this config file (which should be in the root of the monorepo);
@@ -21,20 +19,26 @@ module.exports = (api) => {
2119
],
2220
plugins: [
2321
'babel-plugin-macros',
24-
['@babel/plugin-proposal-decorators', {
25-
legacy: true
26-
}],
22+
[
23+
'@babel/plugin-proposal-decorators', {
24+
legacy: true
25+
}
26+
],
2727
'@babel/plugin-proposal-export-namespace-from',
2828
'@babel/plugin-proposal-export-default-from',
2929
'@babel/plugin-syntax-dynamic-import',
30-
['@babel/plugin-proposal-class-properties', {
31-
loose: true
32-
}],
30+
[
31+
'@babel/plugin-proposal-class-properties', {
32+
loose: true
33+
}
34+
],
3335
'@babel/plugin-proposal-nullish-coalescing-operator',
3436
'@babel/plugin-proposal-optional-chaining',
35-
['@babel/plugin-transform-runtime', {
36-
corejs: 3
37-
}]
37+
[
38+
'@babel/plugin-transform-runtime', {
39+
corejs: 3
40+
}
41+
]
3842
],
3943
presets: [
4044
'@babel/preset-env',
@@ -48,13 +52,15 @@ module.exports = (api) => {
4852

4953
const browser = cloneDeep(base);
5054
browser.plugins[browser.plugins.length - 1][1].useESModules = true;
51-
browser.presets[0] = [browser.presets[0], {
52-
corejs: 3,
53-
modules: false,
54-
shippedProposals: true,
55-
targets: {browsers: ['last 1 version', 'not dead', '> 0.2%']},
56-
useBuiltIns: 'usage'
57-
}];
55+
browser.presets[0] = [
56+
browser.presets[0], {
57+
corejs: 3,
58+
modules: false,
59+
shippedProposals: true,
60+
targets: {browsers: ['last 1 version', 'not dead', '> 0.2%']},
61+
useBuiltIns: 'usage'
62+
}
63+
];
5864

5965
if (env === 'browser' || env.startsWith('browser:')) {
6066
return browser;
@@ -66,12 +72,14 @@ module.exports = (api) => {
6672
0,
6773
'babel-plugin-dynamic-import-node'
6874
);
69-
node.presets[0] = [node.presets[0], {
70-
corejs: 3,
71-
shippedProposals: true,
72-
targets: {node: '10.17.0'},
73-
useBuiltIns: 'usage'
74-
}];
75+
node.presets[0] = [
76+
node.presets[0], {
77+
corejs: 3,
78+
shippedProposals: true,
79+
targets: {node: '10.17.0'},
80+
useBuiltIns: 'usage'
81+
}
82+
];
7583

7684
if (env === 'node' || env.startsWith('node:')) {
7785
return node;

dapps/tests/service/package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@
44
"haml": "0.4.3"
55
},
66
"devDependencies": {
7+
"eslint": "6.8.0",
78
"rimraf": "3.0.0"
89
},
910
"license": "MIT",
10-
"main": "index.js",
11+
"main": "./index.js",
1112
"name": "embark-dapp-test-service",
1213
"private": true,
1314
"scripts": {
15+
"ci": "npm run qa",
1416
"clean": "npm run reset",
17+
"lint": "eslint *.js",
18+
"qa": "npm-run-all lint",
1519
"reset": "npx rimraf embark-*.tgz package"
1620
},
21+
"eslintConfig": {
22+
"extends": "../../../.eslintrc.json"
23+
},
1724
"version": "5.0.0"
1825
}

package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
"@babel/plugin-transform-runtime": "7.7.4",
1313
"@babel/preset-env": "7.7.4",
1414
"@babel/preset-typescript": "7.7.4",
15+
"@typescript-eslint/parser": "2.20.0",
1516
"babel-eslint": "10.0.3",
1617
"babel-plugin-dynamic-import-node": "2.3.0",
1718
"babel-plugin-macros": "2.7.1",
1819
"chalk": "2.4.2",
1920
"coveralls": "3.0.9",
20-
"eslint": "6.2.2",
21+
"eslint": "6.8.0",
22+
"eslint-plugin-import": "2.18.2",
2123
"find-up": "4.1.0",
2224
"form-data": "2.5.1",
2325
"fs-extra": "8.1.0",
@@ -27,7 +29,8 @@
2729
"npm-run-all": "4.1.5",
2830
"nyc": "13.1.0",
2931
"rimraf": "3.0.0",
30-
"semver": "5.6.0"
32+
"semver": "5.6.0",
33+
"typescript": "3.7.2"
3134
},
3235
"engines": {
3336
"node": ">=10.17.0",
@@ -42,7 +45,7 @@
4245
"build:no-ui": "npm run build -- --ignore embark-ui",
4346
"ci": "node scripts/monorun --ignore embark-dapp-* --stream ci",
4447
"ci:dapps": "lerna run --concurrency=1 --scope embark-dapp-* --stream ci",
45-
"ci:full": "npm-run-all cwtree typecheck \"lint -- --concurrency={1}\" build:no-ui \"test -- --concurrency={1}\" ci:dapps cwtree -- 1",
48+
"ci:full": "npm-run-all cylock cwtree typecheck lint build:no-ui \"test -- --concurrency={1}\" ci:dapps cwtree -- 1",
4649
"clean": "node scripts/monorun --stream clean",
4750
"clean:full": "npx npm-run-all clean clean:top",
4851
"clean:top": "npm run reset:top && npx rimraf node_modules",
@@ -52,9 +55,12 @@
5255
"coverage:report": "node scripts/coverage-report",
5356
"coveralls": "npm-run-all coverage:collect coverage:coveralls",
5457
"cwtree": "node scripts/check-working-tree",
58+
"cylock": "node scripts/check-yarn-lock",
5559
"deploy:site": "node site/deploy-site",
5660
"globalize": "node scripts/globalize",
57-
"lint": "node scripts/monorun --parallel lint",
61+
"lint": "npm-run-all lint:*",
62+
"lint:packages": "node scripts/monorun --parallel lint",
63+
"lint:top": "eslint *.js scripts/",
5864
"package": "lerna exec --concurrency=1 --no-private --stream -- npm pack",
5965
"postclean": "npx lerna clean --yes",
6066
"postreboot": "yarn install",
@@ -63,7 +69,7 @@
6369
"preqa:full": "yarn install",
6470
"qa": "node scripts/monorun --ignore embark-dapp-* --stream qa",
6571
"qa:dapps": "lerna run --concurrency=1 --scope embark-dapp-* --stream qa",
66-
"qa:full": "npm-run-all cwtree reboot:full cwtree typecheck \"lint -- --concurrency={1}\" build \"test -- --concurrency={1}\" qa:dapps cwtree -- 1",
72+
"qa:full": "npm-run-all cylock cwtree reboot:full cwtree typecheck lint build \"test -- --concurrency={1}\" qa:dapps cwtree -- 1",
6773
"reboot": "npm run clean",
6874
"reboot:full": "npm run clean:full",
6975
"release": "node scripts/release",
@@ -84,6 +90,9 @@
8490
"watch:test": "node scripts/monorun --ignore embark-dapp-* --parallel watch:test",
8591
"watch:typecheck": "node scripts/monorun --parallel watch:typecheck"
8692
},
93+
"eslintConfig": {
94+
"extends": "./.eslintrc.json"
95+
},
8796
"workspaces": {
8897
"packages": [
8998
"dapps/templates/*",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist');

packages/cockpit/api-client/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
"type": "git",
2222
"url": "https://github.com/embarklabs/embark.git"
2323
},
24-
"main": "./dist/index.js",
24+
"main": "./index.js",
2525
"types": "./dist/index.d.ts",
2626
"files": [
27-
"dist"
27+
"dist",
28+
"index.js"
2829
],
2930
"embark-collective": {
3031
"build:node": true,
@@ -51,7 +52,7 @@
5152
},
5253
"devDependencies": {
5354
"embark-solo": "^5.1.1",
54-
"eslint": "5.7.0",
55+
"eslint": "6.8.0",
5556
"npm-run-all": "4.1.5",
5657
"rimraf": "3.0.0"
5758
},

packages/cockpit/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build-storybook": "build-storybook -s public",
3030
"ci": "npm-run-all lint test",
3131
"clean": "npm run reset",
32-
"lint": "eslint src/",
32+
"lint": "eslint scripts/ src/",
3333
"prebuild": "node scripts/copy-monaco-to-public",
3434
"prestart": "node scripts/copy-monaco-to-public dev",
3535
"qa": "npm-run-all lint test build",

packages/cockpit/ui/scripts/copy-monaco-to-public.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* global __dirname process require */
2-
31
const findUp = require('find-up');
42
const {copy, ensureDir} = require('fs-extra');
53
const path = require('path');

packages/core/code-runner/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('./dist');

packages/core/code-runner/package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,16 @@
1616
"solidity"
1717
],
1818
"files": [
19-
"dist"
19+
"dist",
20+
"index.js"
2021
],
2122
"license": "MIT",
2223
"repository": {
2324
"directory": "packages/core/code-runner",
2425
"type": "git",
2526
"url": "https://github.com/embarklabs/embark.git"
2627
},
27-
"main": "./dist/index.js",
28+
"main": "./index.js",
2829
"types": "./dist/index.d.ts",
2930
"embark-collective": {
3031
"build:node": true,
@@ -36,15 +37,19 @@
3637
"ci": "npm run qa",
3738
"clean": "npm run reset",
3839
"lint": "npm-run-all lint:*",
39-
"lint:js": "eslint src/",
40+
"lint:js": "eslint src/ test/",
4041
"lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
4142
"qa": "npm-run-all lint _typecheck _build test",
4243
"reset": "npx rimraf dist embark-*.tgz package",
4344
"solo": "embark-solo",
4445
"test": "jest"
4546
},
4647
"eslintConfig": {
47-
"extends": "../../../.eslintrc.json"
48+
"extends": [
49+
"../../../.eslintrc.json",
50+
"plugin:jest/recommended",
51+
"plugin:jest/style"
52+
]
4853
},
4954
"dependencies": {
5055
"@babel/runtime-corejs3": "7.7.7",
@@ -53,6 +58,7 @@
5358
"colors": "1.4.0",
5459
"core-js": "3.6.2",
5560
"embark-core": "^5.2.2",
61+
"embark-i18n": "^5.1.1",
5662
"embark-logger": "^5.2.0",
5763
"embark-utils": "^5.2.0",
5864
"embarkjs": "^5.2.3-nightly.0",
@@ -66,10 +72,12 @@
6672
"babel-jest": "24.9.0",
6773
"embark-solo": "^5.1.1",
6874
"embark-testing": "^5.2.0",
69-
"eslint": "5.7.0",
75+
"eslint": "6.8.0",
76+
"eslint-plugin-jest": "22.5.1",
7077
"jest": "24.9.0",
7178
"npm-run-all": "4.1.5",
7279
"rimraf": "3.0.0",
80+
"sinon": "7.4.2",
7381
"tslint": "5.20.1",
7482
"typescript": "3.7.2"
7583
},

0 commit comments

Comments
 (0)