mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-21 14:25:08 -04:00
Updated eslint, flow, and fixed errors
This commit is contained in:
1 parent
053c2cb3a0
commit
b0ff54d050
10 files changed
+1621
-4250
No files matched your search
@@ -4,7 +4,14 @@
|
||||
"semistandard",
|
||||
"plugin:flowtype/recommended"
|
||||
],
|
||||
"plugins": ["react", "jest", "html", "json", "filenames", "flowtype"],
|
||||
"plugins": [
|
||||
"react",
|
||||
"jest",
|
||||
"html",
|
||||
"json",
|
||||
"filenames",
|
||||
"flowtype"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
@@ -22,11 +29,15 @@
|
||||
"jest/globals": true
|
||||
},
|
||||
"rules": {
|
||||
"indent": "off",
|
||||
"no-var": "error",
|
||||
"no-duplicate-imports": "off",
|
||||
"react/jsx-uses-react": "error",
|
||||
"react/jsx-uses-vars": "error",
|
||||
"filenames/match-exported": ["error", "kebab"]
|
||||
"filenames/match-exported": [
|
||||
"error",
|
||||
"kebab"
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"flowtype": {
|
||||
|
||||
@@ -139,4 +139,3 @@ describe('fuzzyMatchAll()', () => {
|
||||
expect(misc.fuzzyMatchAll('wrong this ou', ['testing', 'this', 'out'])).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -212,7 +212,7 @@ export async function getRenderContext (
|
||||
baseContext.getPurpose = () => purpose;
|
||||
|
||||
// Generate the context we need to render
|
||||
return await buildRenderContext(
|
||||
return buildRenderContext(
|
||||
ancestors,
|
||||
rootEnvironment,
|
||||
subEnvironment,
|
||||
|
||||
@@ -865,7 +865,7 @@ export function _getAwsAuthHeaders (
|
||||
body: string,
|
||||
url: string,
|
||||
method: string
|
||||
) {
|
||||
): Array<{name: string, value: string, disabled?: boolean}> {
|
||||
const parsedUrl = urlParse(url);
|
||||
const contentTypeHeader = getContentTypeHeader(headers);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// @flow
|
||||
import * as electron from 'electron';
|
||||
import {showAlert} from '../../ui/components/modals/index';
|
||||
import {showPrompt} from '../../ui/components/modals';
|
||||
import {showAlert, showPrompt} from '../../ui/components/modals/index';
|
||||
import {RENDER_PURPOSE_SEND} from '../../common/render';
|
||||
|
||||
export function init (renderPurpose?: string): {app: Object} {
|
||||
|
||||
@@ -88,7 +88,7 @@ class AsapAuth extends React.PureComponent<Props> {
|
||||
);
|
||||
|
||||
const asapPrivateKey = this.renderPrivateKeyInput(
|
||||
'Private Key',
|
||||
'Private Key'
|
||||
);
|
||||
|
||||
return [asapIssuer, asapSubject, asapAudience, asapAdditionalClaims, asapKeyId, asapPrivateKey];
|
||||
@@ -143,7 +143,7 @@ class AsapAuth extends React.PureComponent<Props> {
|
||||
}
|
||||
|
||||
renderPrivateKeyInput (
|
||||
label: string,
|
||||
label: string
|
||||
): React.Element<*> {
|
||||
const id = label.replace(/ /g, '-');
|
||||
const {authentication} = this.props;
|
||||
|
||||
@@ -15,24 +15,24 @@ import {trackEvent} from '../../../common/analytics';
|
||||
|
||||
@autobind
|
||||
class WorkspaceShareSettingsModal extends PureComponent {
|
||||
constructor(props) {
|
||||
constructor (props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
_handleSubmit(e) {
|
||||
_handleSubmit (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
_handleClose() {
|
||||
_handleClose () {
|
||||
this.hide();
|
||||
}
|
||||
|
||||
_setModalRef(n) {
|
||||
_setModalRef (n) {
|
||||
this.modal = n;
|
||||
}
|
||||
|
||||
async _handleUnshare() {
|
||||
async _handleUnshare () {
|
||||
if (!session.isLoggedIn()) {
|
||||
return;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class WorkspaceShareSettingsModal extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
_handleShareWithTeam(team) {
|
||||
_handleShareWithTeam (team) {
|
||||
showPrompt({
|
||||
title: 'Share Workspace',
|
||||
label: 'Confirm password to share workspace',
|
||||
@@ -71,7 +71,7 @@ class WorkspaceShareSettingsModal extends PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
async _load() {
|
||||
async _load () {
|
||||
if (!session.isLoggedIn()) {
|
||||
this._resetState({});
|
||||
return;
|
||||
@@ -92,7 +92,7 @@ class WorkspaceShareSettingsModal extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
_resetState(patch = {}) {
|
||||
_resetState (patch = {}) {
|
||||
this.setState(Object.assign({
|
||||
teams: [],
|
||||
resourceGroup: null,
|
||||
@@ -101,7 +101,7 @@ class WorkspaceShareSettingsModal extends PureComponent {
|
||||
}, patch));
|
||||
}
|
||||
|
||||
async show() {
|
||||
async show () {
|
||||
this._resetState();
|
||||
this.modal.show();
|
||||
|
||||
@@ -109,15 +109,15 @@ class WorkspaceShareSettingsModal extends PureComponent {
|
||||
await this._load();
|
||||
}
|
||||
|
||||
hide() {
|
||||
hide () {
|
||||
this.modal.hide();
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
componentWillMount () {
|
||||
this._resetState();
|
||||
}
|
||||
|
||||
render() {
|
||||
render () {
|
||||
const {teams, resourceGroup, error, loading} = this.state;
|
||||
const {workspace} = this.props;
|
||||
return (
|
||||
|
||||
@@ -75,7 +75,7 @@ class RequestPane extends React.PureComponent<Props> {
|
||||
});
|
||||
}
|
||||
|
||||
async _autocompleteUrls () {
|
||||
async _autocompleteUrls (): Promise<Array<string>> {
|
||||
const docs = await db.withDescendants(
|
||||
this.props.workspace,
|
||||
models.request.type
|
||||
|
||||
Generated
+1573
-4211
File diff suppressed because it is too large.
Load diff
@@ -151,10 +151,10 @@
|
||||
"xpath": "^0.0.23"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.23.0",
|
||||
"babel-core": "^6.23.1",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-jest": "^19.0.0",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-core": "^6.26.0",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-jest": "^22.4.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-plugin-transform-decorators-legacy": "^1.3.4",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||
@@ -170,21 +170,21 @@
|
||||
"electron-builder-squirrel-windows": "^19.47.0",
|
||||
"electron-download-tf": "^4.3.4",
|
||||
"electron-rebuild": "^1.6.0",
|
||||
"eslint": "^3.16.1",
|
||||
"eslint-config-semistandard": "^7.0.0",
|
||||
"eslint-config-standard": "^6.2.1",
|
||||
"eslint-plugin-filenames": "^1.1.0",
|
||||
"eslint-plugin-flowtype": "^2.36.0",
|
||||
"eslint-plugin-html": "^2.0.1",
|
||||
"eslint-plugin-import": "^2.8.0",
|
||||
"eslint-plugin-jest": "^19.0.1",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-config-semistandard": "^12.0.1",
|
||||
"eslint-config-standard": "^11.0.0",
|
||||
"eslint-plugin-filenames": "^1.2.0",
|
||||
"eslint-plugin-flowtype": "^2.46.2",
|
||||
"eslint-plugin-html": "^4.0.3",
|
||||
"eslint-plugin-import": "^2.11.0",
|
||||
"eslint-plugin-jest": "^21.15.1",
|
||||
"eslint-plugin-json": "^1.2.0",
|
||||
"eslint-plugin-node": "^5.2.1",
|
||||
"eslint-plugin-promise": "^3.5.0",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"eslint-plugin-standard": "^2.3.1",
|
||||
"eslint-plugin-node": "^6.0.1",
|
||||
"eslint-plugin-promise": "^3.7.0",
|
||||
"eslint-plugin-react": "^7.7.0",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"file-loader": "^1.1.11",
|
||||
"flow-bin": "^0.69.0",
|
||||
"flow-bin": "^0.70.0",
|
||||
"less": "^2.7.2",
|
||||
"less-loader": "^4.1.0",
|
||||
"ncp": "^2.0.0",
|
||||
|
||||
Reference in new issue
Block a user