[MM-23332] fix eslint (#1238)
* fix eslint packages * fix eslint rules * more eslint fixes
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extends": [
|
"extends": [
|
||||||
"./node_modules/eslint-config-mattermost/.eslintrc.json",
|
"plugin:mattermost/react",
|
||||||
"./node_modules/eslint-config-mattermost/.eslintrc-react.json",
|
|
||||||
"plugin:cypress/recommended"
|
"plugin:cypress/recommended"
|
||||||
],
|
],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"import",
|
"import",
|
||||||
|
"mattermost",
|
||||||
"cypress"
|
"cypress"
|
||||||
],
|
],
|
||||||
"env": {
|
"env": {
|
||||||
@@ -21,6 +21,7 @@
|
|||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/no-unresolved": 2,
|
"import/no-unresolved": 2,
|
||||||
|
"comma-dangle": 0,
|
||||||
"import/order": [
|
"import/order": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
1308
package-lock.json
generated
1308
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -49,7 +49,7 @@
|
|||||||
"@babel/register": "^7.0.0",
|
"@babel/register": "^7.0.0",
|
||||||
"@storybook/addon-actions": "^4.0.11",
|
"@storybook/addon-actions": "^4.0.11",
|
||||||
"@storybook/react": "^4.0.11",
|
"@storybook/react": "^4.0.11",
|
||||||
"babel-eslint": "^10.0.1",
|
"babel-eslint": "^10.0.3",
|
||||||
"babel-loader": "^8.0.4",
|
"babel-loader": "^8.0.4",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.2.0",
|
||||||
"cross-env": "^5.2.0",
|
"cross-env": "^5.2.0",
|
||||||
@@ -59,13 +59,13 @@
|
|||||||
"electron-builder": "^22.2.0",
|
"electron-builder": "^22.2.0",
|
||||||
"electron-connect": "^0.6.3",
|
"electron-connect": "^0.6.3",
|
||||||
"electron-notarize": "^0.1.1",
|
"electron-notarize": "^0.1.1",
|
||||||
"eslint": "^5.9.0",
|
"eslint": "^6.6.0",
|
||||||
"eslint-config-mattermost": "github:mattermost/eslint-config-mattermost",
|
"eslint-plugin-mattermost": "github:mattermost/eslint-plugin-mattermost#070ce792d105482ffb2b27cfc0b7e78b3d20acee",
|
||||||
"eslint-plugin-cypress": "^2.1.2",
|
"eslint-plugin-cypress": "^2.7.0",
|
||||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||||
"eslint-plugin-header": "^2.0.0",
|
"eslint-plugin-header": "^3.0.0",
|
||||||
"eslint-plugin-import": "^2.14.0",
|
"eslint-plugin-import": "^2.18.2",
|
||||||
"eslint-plugin-react": "^7.11.1",
|
"eslint-plugin-react": "^7.16.0",
|
||||||
"file-loader": "^2.0.0",
|
"file-loader": "^2.0.0",
|
||||||
"image-webpack-loader": "5.0.0",
|
"image-webpack-loader": "5.0.0",
|
||||||
"mdi-react": "^6.2.0",
|
"mdi-react": "^6.2.0",
|
||||||
|
@@ -14,7 +14,7 @@ exports.default = async function afterPack(context) {
|
|||||||
const result = await spawn('chmod', [SETUID_PERMISSIONS, path.join(context.appOutDir, 'chrome-sandbox')]);
|
const result = await spawn('chmod', [SETUID_PERMISSIONS, path.join(context.appOutDir, 'chrome-sandbox')]);
|
||||||
if (result.code !== 0) {
|
if (result.code !== 0) {
|
||||||
throw new Error(
|
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}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,9 @@
|
|||||||
// Copyright (c) 2015-2016 Yuya Ochiai
|
// Copyright (c) 2015-2016 Yuya Ochiai
|
||||||
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
|
||||||
// See LICENSE.txt for license information.
|
// 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 React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
|
|
||||||
|
@@ -304,10 +304,10 @@ export default class MattermostView extends React.Component {
|
|||||||
handleDeepLink = (relativeUrl) => {
|
handleDeepLink = (relativeUrl) => {
|
||||||
const webview = this.webviewRef.current;
|
const webview = this.webviewRef.current;
|
||||||
webview.executeJavaScript(
|
webview.executeJavaScript(
|
||||||
'history.pushState(null, null, "' + relativeUrl + '");'
|
'history.pushState(null, null, "' + relativeUrl + '");',
|
||||||
);
|
);
|
||||||
webview.executeJavaScript(
|
webview.executeJavaScript(
|
||||||
'dispatchEvent(new PopStateEvent("popstate", null));'
|
'dispatchEvent(new PopStateEvent("popstate", null));',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user