[MM-23332] fix eslint (#1238)

* fix eslint packages

* fix eslint rules

* more eslint fixes
This commit is contained in:
Guillermo Vayá 2020-03-17 13:34:38 -07:00 committed by GitHub
parent 9f6147e120
commit 176fd19aa2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 1090 additions and 246 deletions

View file

@ -1,11 +1,11 @@
{
"extends": [
"./node_modules/eslint-config-mattermost/.eslintrc.json",
"./node_modules/eslint-config-mattermost/.eslintrc-react.json",
"plugin:mattermost/react",
"plugin:cypress/recommended"
],
"plugins": [
"import",
"mattermost",
"cypress"
],
"env": {
@ -21,6 +21,7 @@
},
"rules": {
"import/no-unresolved": 2,
"comma-dangle": 0,
"import/order": [
"error",
{

1308
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -49,7 +49,7 @@
"@babel/register": "^7.0.0",
"@storybook/addon-actions": "^4.0.11",
"@storybook/react": "^4.0.11",
"babel-eslint": "^10.0.1",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.4",
"chai": "^4.2.0",
"cross-env": "^5.2.0",
@ -59,13 +59,13 @@
"electron-builder": "^22.2.0",
"electron-connect": "^0.6.3",
"electron-notarize": "^0.1.1",
"eslint": "^5.9.0",
"eslint-config-mattermost": "github:mattermost/eslint-config-mattermost",
"eslint-plugin-cypress": "^2.1.2",
"eslint": "^6.6.0",
"eslint-plugin-mattermost": "github:mattermost/eslint-plugin-mattermost#070ce792d105482ffb2b27cfc0b7e78b3d20acee",
"eslint-plugin-cypress": "^2.7.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-header": "^2.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-react": "^7.11.1",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-react": "^7.16.0",
"file-loader": "^2.0.0",
"image-webpack-loader": "5.0.0",
"mdi-react": "^6.2.0",

View file

@ -14,7 +14,7 @@ exports.default = async function afterPack(context) {
const result = await spawn('chmod', [SETUID_PERMISSIONS, path.join(context.appOutDir, 'chrome-sandbox')]);
if (result.code !== 0) {
throw new Error(
`Failed to set proper permissions for linux arch on ${target.name}`
`Failed to set proper permissions for linux arch on ${target.name}`,
);
}
}

View file

@ -1,6 +1,9 @@
// Copyright (c) 2015-2016 Yuya Ochiai
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable react/no-set-state */
import React from 'react';
import PropTypes from 'prop-types';

View file

@ -304,10 +304,10 @@ export default class MattermostView extends React.Component {
handleDeepLink = (relativeUrl) => {
const webview = this.webviewRef.current;
webview.executeJavaScript(
'history.pushState(null, null, "' + relativeUrl + '");'
'history.pushState(null, null, "' + relativeUrl + '");',
);
webview.executeJavaScript(
'dispatchEvent(new PopStateEvent("popstate", null));'
'dispatchEvent(new PopStateEvent("popstate", null));',
);
}