forked from Kong/insomnia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeScript] Phase 1 & 2 (Kong#3370)
Co-authored-by: Opender Singh <[email protected]>
- Loading branch information
1 parent
bdb4b4e
commit 5f4c19d
Showing
1,862 changed files
with
136,063 additions
and
120,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ indent_size = 2 | |
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
end_of_line = lf | ||
quote_type = single |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,3 +29,5 @@ graphql.config.json | |
.graphqlconfig | ||
schema.graphql | ||
packages/insomnia-smoke-test/screenshots | ||
*.tsbuildinfo | ||
dist |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}; |
Oops, something went wrong.