SPFx – resolving error – TSLint is not supported for rush-stack-compiler-4.x package

SPFx - gulp build error - TSLint is not supported for rush-stack-compiler-4.x package
SPFx - gulp build error - TSLint is not supported for rush-stack-compiler-4.x package

Hi All,

Today new issue and resolution !!!

Details / Background :

In one of our SPFx last article – SPFx – Using PnPjs version 3 : Resolving error – Error – [tsc] node_modules/@pnp/queryable/queryable.d.ts(10,115): error TS1005: ‘,’ expected we discussed about Microsoft rush stack compiler and updated the latest version of it

Next we have updated tsconfig.js file to refer latest version of Microsoft rush stack compiler as

SPFx component – Updated tsconfig.json file for referring latest “Microsoft rush stack compiler”
fig : SPFx component – Updated tsconfig.json file for referring latest “Microsoft rush stack compiler”

As we updated and did gulp build got an error

Error / Issue :

TSLint is not supported for rush-stack-compiler-4.x package

gulp build error - TSLint is not supported for rush-stack-compiler-4.x package
fig – SPFx – gulp build error – TSLint is not supported for rush-stack-compiler-4.x package

Solution / Cause of an issue :

  • We are using pnpjs library version 3
  • We are using rush stack compiler version 4.2
  • We are having type script version – 4.2.4
  • TypeScript version 4+ not supports the tslint. TSLint is deprecated
  • Since TSLint is deprecated we need to disable the TSLint task in gulpfile js

build.tslintCmd.enabled = false;

SPFx - disabling tslint in gulp file - gulpfile.js
fig : SPFx – disabling tslint in gulp file – gulpfile.js

After disabling TSLint in gulp file – gulpfile.js we did again gulp build and it succeeded.

Thanks for reading !!! Feel free for suggestion / question / thoughts

HAVE A GREAT TIME AHEAD !!!

Prasham Sabadra

LIFE IS VERY BEAUTIFUL :) ENJOY THE WHOLE JOURNEY :) Founder of Knowledge Junction and live-beautiful-life.com, Author, Learner, Passionate Techie, avid reader. Certified Professional Workshop Facilitator / Public Speaker. Scrum Foundation Professional certificated. Motivational, Behavioral , Technical speaker. Speaks in various events including SharePoint Saturdays, Boot camps, Collages / Schools, local chapter. Can reach me for Microsoft 365, Azure, DevOps, SharePoint, Teams, Power Platform, JavaScript.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: