more eslint fixes
This commit is contained in:
parent
754aa740d4
commit
9ee4161ef4
|
@ -88,7 +88,7 @@ module.exports = {
|
||||||
// or else return the object to a caller (who assumes this responsibility). Unterminated
|
// or else return the object to a caller (who assumes this responsibility). Unterminated
|
||||||
// promise chains are a serious issue. Besides causing errors to be silently ignored,
|
// promise chains are a serious issue. Besides causing errors to be silently ignored,
|
||||||
// they can also cause a NodeJS process to terminate unexpectedly.
|
// they can also cause a NodeJS process to terminate unexpectedly.
|
||||||
"@typescript-eslint/no-floating-promises": 0,
|
"@typescript-eslint/no-floating-promises": 2,
|
||||||
// RATIONALE: Catches a common coding mistake.
|
// RATIONALE: Catches a common coding mistake.
|
||||||
"@typescript-eslint/no-for-in-array": 2,
|
"@typescript-eslint/no-for-in-array": 2,
|
||||||
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
|
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
|
||||||
|
@ -295,7 +295,7 @@ module.exports = {
|
||||||
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
|
// STANDARDIZED BY: @typescript-eslint\eslint-plugin\dist\configs\recommended.json
|
||||||
"no-var": 2,
|
"no-var": 2,
|
||||||
// RATIONALE: Generally not needed in modern code.
|
// RATIONALE: Generally not needed in modern code.
|
||||||
"no-void": 1,
|
"no-void": 0,
|
||||||
// RATIONALE: Obsolete language feature that is deprecated.
|
// RATIONALE: Obsolete language feature that is deprecated.
|
||||||
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
|
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
|
||||||
"no-with": 2,
|
"no-with": 2,
|
||||||
|
|
|
@ -3,7 +3,6 @@ import * as ReactDom from 'react-dom';
|
||||||
import { Version } from '@microsoft/sp-core-library';
|
import { Version } from '@microsoft/sp-core-library';
|
||||||
import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base";
|
import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base";
|
||||||
import { IPropertyPaneConfiguration } from "@microsoft/sp-property-pane";
|
import { IPropertyPaneConfiguration } from "@microsoft/sp-property-pane";
|
||||||
import * as strings from 'AddJsCssReferenceWebPartStrings';
|
|
||||||
import AddJsCssReference, { IAddJsCssReferenceProps } from './components/AddJsCssReference';
|
import AddJsCssReference, { IAddJsCssReferenceProps } from './components/AddJsCssReference';
|
||||||
import { getSP } from './pnpjsConfig';
|
import { getSP } from './pnpjsConfig';
|
||||||
|
|
||||||
|
|
|
@ -290,20 +290,20 @@ export default class AddJsCssReference extends React.Component<IAddJsCssReferenc
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentDidMount(): void {
|
public componentDidMount() {
|
||||||
this.checkPermisson();
|
void this.checkPermisson();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async checkPermisson() {
|
private async checkPermisson() {
|
||||||
const perms2 = await this._sp.web.currentUserHasPermissions(PermissionKind.ManageWeb);
|
const perms2 = await this._sp.web.currentUserHasPermissions(PermissionKind.ManageWeb);
|
||||||
this.setState({ userHasPermission: perms2 });
|
|
||||||
console.log(perms2);
|
console.log(perms2);
|
||||||
this.setState({ showspinner: false });
|
this.setState({
|
||||||
|
userHasPermission: perms2,
|
||||||
|
showspinner: false
|
||||||
|
});
|
||||||
if (perms2) {
|
if (perms2) {
|
||||||
await this.getCustomAction();
|
void this.getCustomAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue