Forum Discussion
gerald4
Mar 26, 2022Copper Contributor
TSLint is not supported for rush-stack-compiler-4.X packages.
Please I need help. I started using pnpjs library v3, but every time i try to gulp build or gulp serve my project. I had also upgraded my rush stack compiler from version 3 to 4. I get this error: E...
Dec 13, 2022
You need to delete the TSlint file 🙂
TSconfig should look like this:
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.5/includes/tsconfig-web.json",
"compilerOptions": {
"target": "es5",
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"jsx": "react",
"declaration": true,
"sourceMap": true,
"experimentalDecorators": true,
"skipLibCheck": true,
"outDir": "lib",
"inlineSources": false,
"strictNullChecks": false,
"noUnusedLocals": false,
"typeRoots": [
"./node_modules/@types",
"./node_modules/@microsoft"
],
"types": [
"webpack-env"
],
"lib": [
"es5",
"dom",
"es2015.collection",
"es2015.promise"
]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx"
]
}
And gulpfile.js should look like this:
'use strict';
const gulp = require('gulp');
const build = require('@microsoft/sp-build-web');
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
build.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.externals.splice(generatedConfiguration.externals.indexOf('react'), 1);
generatedConfiguration.externals.splice(generatedConfiguration.externals.indexOf('react-dom'), 1);
return generatedConfiguration;
}
});
var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
var result = getTasks.call(build.rig);
result.set('serve', result.get('serve-deprecated'));
return result;
};
build.initialize(require('gulp'));
Did a blogpost on this for myself so I can keep track on the steps I need to go through as I need to do this here and there:
Link if anyone's interested 🙂
https://yourmodernworkplace.com/blog/How-To-Upgrade-A-Old-SPFX-Project-To-Latest-One