Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update client monorepo to eslint 7 #3770

Merged
merged 6 commits into from Oct 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions examples/apps/collaborative-textarea/.eslintrc.js
Expand Up @@ -5,7 +5,7 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {}
}
}
21 changes: 10 additions & 11 deletions examples/apps/collaborative-textarea/package.json
Expand Up @@ -16,7 +16,7 @@
"build:full": "concurrently npm:build npm:webpack",
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand Down Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.19.2",
"@fluidframework/eslint-config-fluid": "^0.19.1",
"@fluidframework/eslint-config-fluid": "^0.20.0-0",
"@fluidframework/get-session-storage-container": "^0.28.0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/webpack-fluid-loader": "^0.28.0",
Expand All @@ -55,18 +55,17 @@
"@types/puppeteer": "1.3.0",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"cross-env": "^7.0.2",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"jest": "^26.4.2",
"jest-junit": "^10.0.0",
"jest-puppeteer": "^4.3.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/likes-and-comments/.eslintrc.js
Expand Up @@ -5,7 +5,7 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {
"@typescript-eslint/indent": "off",
Expand Down
19 changes: 9 additions & 10 deletions examples/apps/likes-and-comments/package.json
Expand Up @@ -17,7 +17,7 @@
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"dev": "npm run webpack:dev",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand Down Expand Up @@ -56,19 +56,18 @@
"@types/puppeteer": "1.3.0",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"copyfiles": "^2.1.0",
"css-loader": "^1.0.0",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"html-webpack-plugin": "^4.3.0",
"jest": "^26.4.2",
"jest-junit": "^10.0.0",
Expand Down
1 change: 1 addition & 0 deletions examples/apps/likes-and-comments/src/utils.ts
Expand Up @@ -8,5 +8,6 @@ import { SyncedDataObject } from "@fluidframework/react";
export function getAuthorName(syncedDataObject: SyncedDataObject) {
const quorum = syncedDataObject.dataProps.runtime.getQuorum();
const clientId = syncedDataObject.dataProps.runtime.clientId ?? "";
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return (quorum.getMember(clientId)?.client.user as any).name ?? "";
}
@@ -1,6 +1,11 @@
{
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off", // Doing undefined checks is nice
Expand Down
21 changes: 10 additions & 11 deletions examples/apps/spaces/package.json
Expand Up @@ -17,7 +17,7 @@
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"dev": "npm run webpack:dev",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand Down Expand Up @@ -58,26 +58,25 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.19.2",
"@fluidframework/eslint-config-fluid": "^0.19.1",
"@fluidframework/eslint-config-fluid": "^0.20.0-0",
"@fluidframework/get-session-storage-container": "^0.28.0",
"@fluidframework/test-tools": "^0.2.3074",
"@types/node": "^10.17.24",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"copyfiles": "^2.1.0",
"cross-env": "^7.0.2",
"css-loader": "^1.0.0",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^4.3.0",
"jest": "^26.4.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/spaces/src/fluid-object/spacesItemMap.ts
Expand Up @@ -22,7 +22,7 @@ interface ISingleHandleItem {
handle: IFluidHandle;
}

// eslint-disable-next-line @typescript-eslint/promise-function-async, prefer-arrow/prefer-arrow-functions
// eslint-disable-next-line prefer-arrow/prefer-arrow-functions
function createSingleHandleItem(subFactory: IFluidDataStoreFactory) {
return async (dataObjectFactory: IFluidDataObjectFactory): Promise<ISingleHandleItem> => {
const object = await dataObjectFactory.createAnonymousChildInstance<IFluidLoadable>(subFactory);
Expand Down
4 changes: 2 additions & 2 deletions examples/data-objects/badge/.eslintrc.js
Expand Up @@ -5,9 +5,9 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {

"@typescript-eslint/strict-boolean-expressions": "off", // requires strictNullChecks=true in tsconfig
}
}
21 changes: 10 additions & 11 deletions examples/data-objects/badge/package.json
Expand Up @@ -16,7 +16,7 @@
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"dev": "npm run webpack:dev",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand Down Expand Up @@ -47,22 +47,21 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.19.2",
"@fluidframework/eslint-config-fluid": "^0.19.1",
"@fluidframework/eslint-config-fluid": "^0.20.0-0",
"@fluidframework/webpack-fluid-loader": "^0.28.0",
"@types/node": "^10.17.24",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"rimraf": "^2.6.2",
"ts-loader": "^6.1.2",
"typescript": "~3.7.4",
Expand Down
1 change: 1 addition & 0 deletions examples/data-objects/badge/src/BadgeClient.tsx
Expand Up @@ -46,6 +46,7 @@ export const BadgeClient: React.FC<IBadgeClientProps> = ({ model }: IBadgeClient
// Getters
const getOptions = () => {
// Spread iterable out into an array
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return [...model.optionsMap.values()];
};

Expand Down
1 change: 0 additions & 1 deletion examples/data-objects/badge/src/BadgeView.tsx
Expand Up @@ -88,7 +88,6 @@ export const BadgeView: React.FC<IBadgeViewProps> = (props: IBadgeViewProps) =>

// Create the content for the history card
const historyCardContent = (): JSX.Element => {
// eslint-disable-next-line react/prop-types
const history = historyItems.map((x, i) => {
return (
<ActivityItem
Expand Down
8 changes: 5 additions & 3 deletions examples/data-objects/canvas/.eslintrc.js
Expand Up @@ -5,7 +5,9 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {}
}
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off", // requires strictNullChecks=true in tsconfig
}
}
21 changes: 10 additions & 11 deletions examples/data-objects/canvas/package.json
Expand Up @@ -16,7 +16,7 @@
"build:full": "concurrently npm:build npm:webpack",
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand Down Expand Up @@ -44,27 +44,26 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.19.2",
"@fluidframework/eslint-config-fluid": "^0.19.1",
"@fluidframework/eslint-config-fluid": "^0.20.0-0",
"@fluidframework/test-tools": "^0.2.3074",
"@fluidframework/webpack-fluid-loader": "^0.28.0",
"@types/expect-puppeteer": "2.2.1",
"@types/jest": "22.2.3",
"@types/jest-environment-puppeteer": "2.2.0",
"@types/node": "^10.17.24",
"@types/puppeteer": "1.3.0",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"cross-env": "^7.0.2",
"css-loader": "^1.0.0",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"jest": "^26.4.2",
"jest-junit": "^10.0.0",
"jest-puppeteer": "^4.3.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {}
}
}
21 changes: 10 additions & 11 deletions examples/data-objects/clicker-react/clicker-context/package.json
Expand Up @@ -17,7 +17,7 @@
"build:full:compile": "concurrently npm:build:compile npm:webpack",
"clean": "rimraf dist lib *.tsbuildinfo *.build.log",
"deploy": "npm publish --registry https://packages.wu2.prague.office-int.com",
"eslint": "eslint --ext=ts,tsx --format stylish src",
"eslint": "eslint --format stylish src",
"eslint:fix": "eslint --ext=ts,tsx --format stylish src --fix",
"lint": "npm run eslint",
"lint:fix": "npm run eslint:fix",
Expand All @@ -43,7 +43,7 @@
},
"devDependencies": {
"@fluidframework/build-common": "^0.19.2",
"@fluidframework/eslint-config-fluid": "^0.19.1",
"@fluidframework/eslint-config-fluid": "^0.20.0-0",
"@fluidframework/webpack-fluid-loader": "^0.28.0",
"@types/expect-puppeteer": "2.2.1",
"@types/jest": "22.2.3",
Expand All @@ -52,18 +52,17 @@
"@types/puppeteer": "1.3.0",
"@types/react": "^16.9.15",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "~2.17.0",
"@typescript-eslint/parser": "~2.17.0",
"@typescript-eslint/eslint-plugin": "~4.2.0",
"@typescript-eslint/parser": "~4.2.0",
"concurrently": "^5.2.0",
"cross-env": "^7.0.2",
"eslint": "~6.8.0",
"eslint-plugin-eslint-comments": "~3.1.2",
"eslint-plugin-import": "2.20.0",
"eslint": "~7.9.0",
"eslint-plugin-eslint-comments": "~3.2.0",
"eslint-plugin-import": "~2.22.0",
"eslint-plugin-no-null": "~1.0.2",
"eslint-plugin-optimize-regex": "~1.1.7",
"eslint-plugin-prefer-arrow": "~1.1.7",
"eslint-plugin-react": "~7.18.0",
"eslint-plugin-unicorn": "~15.0.1",
"eslint-plugin-prefer-arrow": "~1.2.2",
"eslint-plugin-react": "~7.21.2",
"eslint-plugin-unicorn": "~22.0.0",
"jest": "^26.4.2",
"jest-junit": "^10.0.0",
"jest-puppeteer": "^4.3.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@

module.exports = {
"extends": [
"@fluidframework/eslint-config-fluid"
"@fluidframework/eslint-config-fluid/eslint7"
],
"rules": {}
}
}