Skip to content

Commit 66f4197

Browse files
authored
feat: convert project to typescript (#1374)
* chore: test * chore: add * chore: more progress * chore: progress in migration, fix prettier parser * chore: reduce tsc errors * chore: refactor storage utils types * chore: refactor utils types * chore: refactor local storage types * chore: refactor config utils types * chore: refactor tsc types * refactor: apply eslint fix, tabs etc * chore: fix lint errors * test: update unit test conf to typescript setup few test refactored to typescript * chore: enable more unit test migrate to typescript * chore: migrate storage test to tsc * chore: migrate up storage test to tsc * refactor: enable plugin and auth test * chore: migrate plugin loader test * chore: update dependencies * chore: migrate functional test to typescript * chore: add codecove * chore: update express * chore: downgrade puppeteer The latest version does not seems to work properly fine. * chore: update dependencies
1 parent b453681 commit 66f4197

File tree

208 files changed

+3569
-56373
lines changed

Some content is hidden

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

208 files changed

+3569
-56373
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"presets": [["@verdaccio", {"flow": true}]]
2+
"presets": [["@verdaccio", {"typescript": true}]]
33
}

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ Dockerfile
1616
*.jpg
1717
*.sh
1818
test/unit/partials/
19+
types/custom.d.ts

.eslintrc

Lines changed: 7 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,13 @@
11
{
2-
"plugins": [
3-
"babel",
4-
"flowtype",
5-
"jest",
6-
"verdaccio",
7-
"jsx-a11y"
8-
],
92
"extends": [
10-
"eslint:recommended",
11-
"google",
12-
"plugin:flowtype/recommended",
13-
"plugin:jest/recommended",
14-
"plugin:prettier/recommended",
15-
"plugin:verdaccio/recommended",
16-
"plugin:jsx-a11y/recommended"
3+
"@verdaccio"
174
],
18-
"parser": "babel-eslint",
19-
"parserOptions": {
20-
"sourceType": "module",
21-
"ecmaVersion": 7,
22-
"ecmaFeatures": {
23-
"impliedStrict": true,
24-
"jsx": true
25-
}
26-
},
27-
"env": {
28-
"browser": true,
29-
"node": true,
30-
"es6": true,
31-
"jest": true
32-
},
33-
"globals": {
34-
"__APP_VERSION__": true
35-
},
365
"rules": {
37-
"babel/no-invalid-this": 1,
38-
"prettier/prettier": ["error", null, "@prettier"],
39-
"semi": ["error"],
40-
"comma-dangle": ["error"],
41-
"camelcase": 0,
42-
"no-useless-escape": ["error"],
43-
"no-invalid-this": 0,
44-
"handle-callback-err": ["error"],
45-
"no-fallthrough": ["error"],
46-
"no-new-require": ["error"],
47-
"max-len": ["error", 160],
48-
"require-jsdoc": 0,
49-
"valid-jsdoc": 0,
50-
"prefer-spread": 1,
51-
"prefer-rest-params": 1,
52-
"linebreak-style": 0,
53-
"quote-props":["error", "as-needed"],
54-
"verdaccio/jsx-no-style": ["warn"],
55-
"verdaccio/jsx-spread": ["warn"],
56-
"jest/expect-expect": 0
6+
"@typescript-eslint/no-var-requires": ["warn"],
7+
"@typescript-eslint/no-use-before-define": 0,
8+
"@typescript-eslint/array-type": ["warn"],
9+
"@typescript-eslint/no-explicit-any": 0,
10+
"@typescript-eslint/indent": 0,
11+
"@typescript-eslint/interface-name-prefix": 0
5712
}
5813
}

.flowconfig

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

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"jsxBracketSameLine": true,
99
"trailingComma": "es5",
1010
"semi": true,
11-
"parser": "flow"
11+
"parser": "typescript"
1212
}

debug/bootstrap.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
// this file aims to help local debugging with hot transpilation
22
// it requires BABEL_ENV=registry set as env variable
3-
require('@babel/register')();
3+
require('@babel/register')({
4+
extensions: [".ts", ".js"]
5+
});
46
require('../src/lib/cli');

flow-typed/npm/@material-ui/core/Avatar_vx.x.x.js

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

flow-typed/npm/@material-ui/core/InputAdornment_vx.x.x.js

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

flow-typed/npm/@material-ui/core/MenuItem_vx.x.x.js

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

flow-typed/npm/@material-ui/core/Paper_vx.x.x.js

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

0 commit comments

Comments
 (0)