From 9ee4161ef4fae85795fb3a0346e793bd4633ac80 Mon Sep 17 00:00:00 2001 From: Don Date: Mon, 24 Oct 2022 20:32:22 +0000 Subject: [PATCH] more eslint fixes --- samples/react-add-js-css-ref/.eslintrc.js | 4 ++-- .../addJsCssReference/AddJsCssReferenceWebPart.ts | 1 - .../components/AddJsCssReference.tsx | 14 +++++++------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/samples/react-add-js-css-ref/.eslintrc.js b/samples/react-add-js-css-ref/.eslintrc.js index 081deca93..9c03110ff 100644 --- a/samples/react-add-js-css-ref/.eslintrc.js +++ b/samples/react-add-js-css-ref/.eslintrc.js @@ -88,7 +88,7 @@ module.exports = { // 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, // 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. "@typescript-eslint/no-for-in-array": 2, // 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 "no-var": 2, // RATIONALE: Generally not needed in modern code. - "no-void": 1, + "no-void": 0, // RATIONALE: Obsolete language feature that is deprecated. // STANDARDIZED BY: eslint\conf\eslint-recommended.js "no-with": 2, diff --git a/samples/react-add-js-css-ref/src/webparts/addJsCssReference/AddJsCssReferenceWebPart.ts b/samples/react-add-js-css-ref/src/webparts/addJsCssReference/AddJsCssReferenceWebPart.ts index 01b712004..2010a4cab 100644 --- a/samples/react-add-js-css-ref/src/webparts/addJsCssReference/AddJsCssReferenceWebPart.ts +++ b/samples/react-add-js-css-ref/src/webparts/addJsCssReference/AddJsCssReferenceWebPart.ts @@ -3,7 +3,6 @@ import * as ReactDom from 'react-dom'; import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart } from "@microsoft/sp-webpart-base"; import { IPropertyPaneConfiguration } from "@microsoft/sp-property-pane"; -import * as strings from 'AddJsCssReferenceWebPartStrings'; import AddJsCssReference, { IAddJsCssReferenceProps } from './components/AddJsCssReference'; import { getSP } from './pnpjsConfig'; diff --git a/samples/react-add-js-css-ref/src/webparts/addJsCssReference/components/AddJsCssReference.tsx b/samples/react-add-js-css-ref/src/webparts/addJsCssReference/components/AddJsCssReference.tsx index d9603b46a..ba6a09645 100644 --- a/samples/react-add-js-css-ref/src/webparts/addJsCssReference/components/AddJsCssReference.tsx +++ b/samples/react-add-js-css-ref/src/webparts/addJsCssReference/components/AddJsCssReference.tsx @@ -290,20 +290,20 @@ export default class AddJsCssReference extends React.Component