eslinter and tsconfig now correct

This commit is contained in:
Peter Paul Kirschner 2024-06-02 01:16:12 +02:00
parent 8bd087c1ed
commit c009fb55cf
5 changed files with 10 additions and 214 deletions

View File

@ -1,5 +1,6 @@
require('@rushstack/eslint-config/patch/modern-module-resolution');
export default {
module.exports = {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
parserOptions: { tsconfigRootDir: __dirname }
parserOptions: { tsconfigRootDir: __dirname },
};

View File

@ -74,7 +74,7 @@ Version|Date|Comments
1.0.1.0|April 21, 2020|Added support for Teams hosts
2.0.0.0|July 10, 2020| jqwidgets replaced with a custom Kanban Board based on Office UI Component and IE11 Support
3.0.0.0|October 29, 2021| SPFx 1.13, PnPJS v2, PnP Controls v3
4.0.0.0|Jun 1, 2024| SPFx 1.19, Node 18
4.0.0.0|Jun 1, 2024| SPFx 1.19, PnPJS v4, Node 18
[Read More about the implementation of this Board](./src/kanban/README.md)

View File

@ -14,8 +14,7 @@ import {KanbanComponent,IKanbanBucket,IKanbanTask} from '../../../kanban';
import { mergeBucketsWithChoices } from './helper';
import { ISPKanbanService } from '../services/ISPKanbanService';
import SPKanbanService from '../services/SPKanbanService';
import MockKanbanService from '../services/MockKanbanService';
import { Spinner } from '@fluentui/react';
export interface IKanbanBoardV2Props {

View File

@ -1,7 +1,6 @@
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json",
"compilerOptions": {
"noImplicitAny": true,
"target": "es5",
"forceConsistentCasingInFileNames": true,
"module": "esnext",
@ -13,8 +12,8 @@
"skipLibCheck": true,
"outDir": "lib",
"inlineSources": false,
"strictNullChecks": false,
"noUnusedLocals": false,
"noImplicitAny": true,
"typeRoots": [
"./node_modules/@types",
"./node_modules/@microsoft"
@ -32,6 +31,5 @@
"include": [
"src/**/*.ts",
"src/**/*.tsx"
],
"exclude": []
]
}

View File

@ -1,202 +0,0 @@
Execute in bash
-----------------------
npm un -S office-ui-fabric-react
npm un -D @microsoft/sp-tslint-rules
npm i -SE @microsoft/sp-core-library@1.19.0 @microsoft/sp-lodash-subset@1.19.0 @microsoft/sp-office-ui-fabric-core@1.19.0 @microsoft/sp-webpart-base@1.19.0 @microsoft/sp-property-pane@1.19.0 @microsoft/sp-adaptive-card-extension-base@1.19.0 @fluentui/react@8.106.4 react@17.0.1 react-dom@17.0.1 tslib@2.3.1
npm i -DE @microsoft/sp-build-web@1.20.1 @microsoft/sp-module-interfaces@1.20.1 @microsoft/eslint-plugin-spfx@1.20.1 @microsoft/eslint-config-spfx@1.20.1 typescript@4.7.4 @microsoft/rush-stack-compiler-4.7@0.1.0 eslint@8.7.0 @types/react@17.0.45 @types/react-dom@17.0.17 ajv@6.12.5 @types/webpack-env@1.15.2 @rushstack/eslint-config@2.5.1 eslint-plugin-react-hooks@4.3.0
npm dedupe
cat > "config/sass.json" << EOF
{
"$schema": "https://developer.microsoft.com/json-schemas/core-build/sass.schema.json"
}
EOF
rm "tslint.json"
cat > ".eslintrc.js" << EOF
require('@rushstack/eslint-config/patch/modern-module-resolution');
export default {
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
parserOptions: { tsconfigRootDir: __dirname }
};
EOF
./.yo-rc.json
-------------
Update version in .yo-rc.json:
{
"@microsoft/generator-sharepoint": {
"version": "1.19.0"
}
}
Update @microsoft/teams-js SDK version in .yo-rc.json:
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/teams-js": "2.12.0"
}
}
}
Update nodeVersion in .yo-rc.json:
{
"@microsoft/generator-sharepoint": {
"nodeVersion": "18.17.1"
}
}
Update @microsoft/microsoft-graph-client SDK version in .yo-rc.json:
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/microsoft-graph-client": "3.0.2"
}
}
}
.vscode/settings.json
---------------------
Add excluding Jest output files in .vscode/settings.json:
{
"files.exclude": {
"**/jest-output": true
}
}
./tsconfig.json
---------------
Update tsconfig.json extends property:
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json"
}
Add noImplicitAny in tsconfig.json:
{
"compilerOptions": {
"noImplicitAny": true
}
}
./package.json
--------------
Update package.json engines.node property:
{
"engines": {
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
}
}
.vscode/launch.json
-------------------
In the .vscode/launch.json file, update the type property for the hosted workbench launch configuration:
{
"configurations": [
{
"type": "msedge"
}
]
}
In the .vscode/launch.json file, update the url property for the hosted workbench launch configuration:
{
"configurations": [
{
"url": "https://{tenantDomain}/_layouts/workbench.aspx"
}
]
}
./config/serve.json
-------------------
Update serve.json initialPage URL:
{
"initialPage": "https://{tenantDomain}/_layouts/workbench.aspx"
}
Update serve.json schema URL:
{
"$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json"
}
src/kanban/KanbanBucket.module.scss
-----------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
src/kanban/KanbanBucketConfigurator.module.scss
-----------------------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
src/kanban/KanbanComponent.module.scss
--------------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
src/kanban/KanbanTask.module.scss
---------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
src/kanban/KanbanTaskManagedProp.module.scss
--------------------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
src/webparts/kanbanBoard/components/KanbanBoardV2.module.scss
-------------------------------------------------------------
Add scss file import:
@import '~@fluentui/react/dist/sass/References.scss'
./.gitignore
------------
To .gitignore add the '.heft' folder:
.heft
./config/package-solution.json
------------------------------
In package-solution.json add metadata section:
{
"solution": {
"metadata": {
"shortDescription": {
"default": "react-kanban-board description"
},
"longDescription": {
"default": "react-kanban-board description"
},
"screenshotPaths": [],
"videoUrl": "",
"categories": []
}
}
}
In package-solution.json add features for components:
{
"solution": {
"features": [
{
"title": "react-kanban-board KanbanBoardWebPart Feature",
"description": "The feature that activates KanbanBoardWebPart from the react-kanban-board solution.",
"id": "67cd5938-806b-4c79-b589-501f7f26998e",
"version": "3.0.0.0",
"componentIds": [
"67cd5938-806b-4c79-b589-501f7f26998e"
]
}
]
}
}