Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TypeScript] Phase 1 & 2 #3370

Merged
merged 106 commits into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
bee661e
setup
dimitropoulos Apr 22, 2021
eee310b
insomnia-prettify
dimitropoulos Mar 24, 2021
c07ebde
insomnia-xpath
dimitropoulos Apr 26, 2021
1b2c31b
insomnia-url
dimitropoulos Mar 24, 2021
f5562c6
insomnia-cookies
dimitropoulos Apr 13, 2021
190f94a
insomnia-testing
dimitropoulos Mar 24, 2021
06ef66d
insomnia-importers
dimitropoulos Mar 24, 2021
d757e0e
insomnia-inso
dimitropoulos Mar 24, 2021
5637601
conversion script
dimitropoulos Apr 22, 2021
f6eacd8
[o2k] prep
dimitropoulos Apr 28, 2021
dcb0151
[o2k] runs script and makes it build
dimitropoulos Apr 28, 2021
a607628
[o2k] makes test and lint pass
dimitropoulos Apr 28, 2021
49d2b40
[app] prep
dimitropoulos Apr 28, 2021
a085e3d
[app] remove flow and disable send-request build
develohpanda Apr 29, 2021
a534f20
[app] give conversion script execution permission
develohpanda Apr 29, 2021
db5f78c
[app] run script
develohpanda Apr 29, 2021
77cebe6
[app] start using tsloader
develohpanda Apr 29, 2021
d55c33b
[app] expect errors
develohpanda Apr 29, 2021
0ef4968
[app] expect errors
develohpanda Apr 29, 2021
43379f6
insomnia-components
dimitropoulos Apr 29, 2021
e6a6479
[components] update package lock after bootstrap
develohpanda Apr 29, 2021
166c42e
[app] mainly app.tsx
develohpanda Apr 30, 2021
5fb0de7
[app] enable experimental decorators
develohpanda Apr 30, 2021
7327a62
[app] code editor
develohpanda Apr 30, 2021
3f5ec57
[app] dropdown and some response viewers
develohpanda Apr 30, 2021
ef19ded
[app] build scripts
dimitropoulos Apr 30, 2021
dae2dcb
[components] exports component Props
dimitropoulos Apr 30, 2021
147e768
[app] removes prop-types, types State and class members for many comp…
dimitropoulos Apr 30, 2021
be41765
[app] use ts-node for package and release scripts
develohpanda May 3, 2021
2dd34dd
[app] wip ts conversions
develohpanda May 3, 2021
dfd8d24
[app] wip ts conversions
develohpanda May 3, 2021
990591a
[app] most of the sidebar components in ts
develohpanda May 3, 2021
e4746d6
[app] preference components and some grpc in ts
develohpanda May 3, 2021
4551bda
[app] fix extension for package and release scripts
dimitropoulos May 3, 2021
30229ae
[app] a day's work
dimitropoulos May 3, 2021
8858777
[app] use generic Array temporarily
dimitropoulos May 3, 2021
5419831
[app] temporarily disable no explicit any rule
develohpanda May 4, 2021
55ae5d2
[app] mainly git types
develohpanda May 4, 2021
4fb72e0
[app] plugin api ts
develohpanda May 4, 2021
e297164
[app] fix dropdown types
develohpanda May 4, 2021
64acede
[app] wowsers, lots
develohpanda May 4, 2021
5b8850f
[app] temporarily flips array syntax
dimitropoulos May 5, 2021
2b434ad
database
dimitropoulos May 5, 2021
14c43cf
[app] wip
dimitropoulos May 5, 2021
b0316a0
[app] updates the `let [a-zA-Z]* = null;` type widening scenarios
dimitropoulos May 4, 2021
6b9e50f
[app] not sure why this was changed, but fixed tabIndex usages
dimitropoulos May 4, 2021
3175b80
[app] file-by-file hunt and pecking
dimitropoulos May 5, 2021
b00b24f
add lint:fix scripts to each package
develohpanda May 5, 2021
b5786fe
add eslint overrides for all packages that need it
develohpanda May 5, 2021
f58693a
runs lint:fix
dimitropoulos May 5, 2021
7f82268
tsconfig was extending the wrong file?
develohpanda May 5, 2021
694b41e
[app] update the return type of find to match the original implementa…
develohpanda May 5, 2021
c2fb8d9
convert to ES2019, is this an issue? Needed for array.flatmap
develohpanda May 5, 2021
15dda22
[app] mostly network/grpc
dimitropoulos May 5, 2021
63bf20f
[app] more grpc and modal items
dimitropoulos May 5, 2021
c4c45a8
reverts prior change: this needs to stay this way to avoid errors
dimitropoulos May 5, 2021
66b105a
ignores (or fixes) all remaining code errors
dimitropoulos May 5, 2021
4f7e354
updates tsconfigs and building and config files throughout
dimitropoulos May 5, 2021
346b884
last scragglers
dimitropoulos May 5, 2021
4230682
[app] database file only, review with developp and misc updates
develohpanda May 6, 2021
f64295d
[app] database cast to NeDB<T>
develohpanda May 6, 2021
8abd4f5
[app] a couple more fixes
develohpanda May 6, 2021
2f92c8d
[app] changes for running the app
develohpanda May 6, 2021
0964e78
[sr] build send request
develohpanda May 6, 2021
da95dfc
[sr] send request types
develohpanda May 6, 2021
7cdf33f
[o2k] clears all type errors in tests
dimitropoulos May 6, 2021
883c87f
[app] initial work on jest and testing
dimitropoulos May 6, 2021
ecc8f90
[app] react-dom types
dimitropoulos May 6, 2021
bf4ff32
[app] cannot have react-dom
dimitropoulos May 6, 2021
7a5a7f3
fixes errors from conversion
dimitropoulos May 6, 2021
cbac46c
[app] update package lock
develohpanda May 7, 2021
fc224c3
add back webpack to insomnia-components
develohpanda May 7, 2021
8087761
tsx tests for styled-components debugging
develohpanda May 7, 2021
f3e6d3b
updates webpack-merge and adds types
dimitropoulos May 7, 2021
e7f1dfc
leaves insomnia-components/src/jest in the tsconfig (it's still exclu…
dimitropoulos May 7, 2021
d3a8da5
reverts remaining mocks to commonjs out of an abundance of caution
dimitropoulos May 7, 2021
5ac2485
failing test to isolate styled-components issue
develohpanda May 10, 2021
4ded2ec
works by downgrading back to 4.4.1
develohpanda May 10, 2021
226b00a
downgrade styled-components back to pre-TS
develohpanda May 10, 2021
e2b76da
revert change to html-element-wrapper because it breaks UI plugins
develohpanda May 10, 2021
071f06d
remove styled-components debugging files
develohpanda May 10, 2021
389b417
fix a few grpc tests
develohpanda May 10, 2021
3868526
fix a few more grpc tests
develohpanda May 10, 2021
a6a8bb2
removes unused babel-loader dependency
dimitropoulos May 10, 2021
beefa13
adds back empty lines after last import using `import .* from .*;\nex…
dimitropoulos May 10, 2021
34cf67c
fixes tsconfig exclude path
dimitropoulos May 10, 2021
49dfca3
revives circular dependency to temporarily fix test failues
dimitropoulos May 10, 2021
0bc1126
removes (unused) babel-jest dep, updates ts-jest and @types/jest
dimitropoulos May 10, 2021
e9b3b97
adds parallel build script to root package.json
dimitropoulos May 10, 2021
50dce47
runs lint:fix
dimitropoulos May 10, 2021
a8f32b2
fixes remaining lint errors (project-wide)
dimitropoulos May 10, 2021
d8dcd47
removes (now unused) flow-related step from CI build and scripts
dimitropoulos May 10, 2021
33b1f62
[setup] leave mention of tsconversion for later
dimitropoulos May 10, 2021
e147158
fix app packaging
develohpanda May 11, 2021
be6125f
fix test name with invalid filename characters
develohpanda May 11, 2021
ed4f413
add sc ts transformer
develohpanda May 11, 2021
3404b79
disable insomnia-components minification and fix smoke tests
develohpanda May 11, 2021
dac017f
wait for basic auth fields to exist
develohpanda May 11, 2021
30f9fd1
Update app.test.js
develohpanda May 11, 2021
6648547
removes debugging statement from pairing
dimitropoulos May 11, 2021
6e0bb0b
removes commented code from ts conversion
dimitropoulos May 11, 2021
acb82df
adds `-- TSCONVERSION` per phase 2 so we know what to target for phase 3
dimitropoulos May 11, 2021
a9aceea
removes (now unused) .babelrc.js in app
dimitropoulos May 11, 2021
6166605
removes bin from importers paths
dimitropoulos May 11, 2021
01dd700
fix grpc-js import
develohpanda May 12, 2021
0d77a8f
fix prettify usage
develohpanda May 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
quote_type = single
5 changes: 2 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ screenshots/
**/.cache/
**/coverage/
**/node_modules/
**/webpack/
**/bin/
**/__fixtures__/
**/fixtures
**/__snapshots__/
**/flow-typed/
**/dist/
**/.cache/
**/svgr/
**/storybook-static/
*.md
*.md
101 changes: 101 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/** @type { import('eslint').Linter.Config } */
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: [
'./tsconfig.eslint.json',
'./packages/*/tsconfig.json',
'./plugins/*/tsconfig.json',
],
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
},
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'semistandard',
'plugin:react-hooks/recommended',
],
plugins: [
'@typescript-eslint',
'react',
'jest',
'html',
'json',
'filenames',
'react-hooks',
],
globals: {
__DEV__: true,
fail: true,
NodeJS: true,
HTMLDivElement: true,
HTMLElement: true,
HTMLInputElement: true,
HTMLSelectElement: true,
JSX: true,
},
env: {
browser: true,
commonjs: true,
es6: true,
'jest/globals': true,
node: true,
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
rules: {
'comma-dangle': ['error', 'always-multiline'],
indent: 'off',
'no-var': 'error',
'no-async-promise-executor': 'off',
'no-case-declarations': 'off',
'no-prototype-builtins': 'off',
'no-duplicate-imports': 'off',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'space-in-parens': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
camelcase: ['error', { allow: ['__export_format', '__export_date', '__export_source'] }],
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always',
},
],
'filenames/match-exported': [
'error',
'kebab',
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'spaced-comment': ['error', 'always', {
exceptions: ['/', '*', '-', '* '], // for ASCII art :)
markers: [
'/', // for TypeScript directives, doxygen, vsdoc, etc. (which use `///`)
'?', // for Quokka
],
}],
'@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
quotes: 'off',
'@typescript-eslint/quotes': ['error', 'single', { avoidEscape: true }],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'error',
},
};
52 changes: 0 additions & 52 deletions .eslintrc.json

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- name: Bootstrap packages
run: npm run bootstrap
- name: Lint
run: npm run lint
- name: Run tests
run: npm test
- name: Build for smoke tests
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ graphql.config.json
.graphqlconfig
schema.graphql
packages/insomnia-smoke-test/screenshots
*.tsbuildinfo
dist
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

20 changes: 20 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/** @type { import('@jest/types').Config.InitialOptions } */
module.exports = {
globals: {
'ts-jest': {
isolatedModules: true,
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
testMatch: [
'**/*.test.ts',
],
verbose: false,
resetMocks: true,
resetModules: true,
collectCoverage: false,
};