js file not working in the spfx webpart it showed one time in the local host but when i refresh these file it can't working and not showed the file ?

aniket sannake 1 Reputation point
2021-12-02T13:54:52.59+00:00

i am created the SharePoint framework tasks calendar web part from the reference of migrating jQuery fullcalendar tasks calendar script editor we part i have created the we part in that web part i have added the the calender.js imported in the .typescript file but that file shows in the local host but when I refresh that file that .JavaScript file are not visible i have tried tsconfig.json to allow JavaScript file but that allowed once but when i refresh that again not visible I tried so much please guide me and help for these error...154455-error.png
I am uploaded the files of the error

154456-calendar-11.png154465-error11.png

Microsoft 365 and Office | SharePoint Server | For business
Microsoft 365 and Office | SharePoint | Development
Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-12-03T07:04:29.367+00:00

    Hi @aniket sannake ,
    Please try to manual extending the tslint.json file. Using native TSLint rules (or its extension packages from) just go ahead with this configuration:

     /// .eslintrc.js  
    ....  
       "plugins": [  
            "@typescript-eslint",  
            "@typescript-eslint/tslint",  
            ...  
       },  
       "rules": {  
           ...  
            "@typescript-eslint/tslint/config": [   
              "error",  
              {  
                "lintFile": "./tslint.json",  
                "rulesDirectory": [  
                  'node_modules/tslint-react/rules'  
                ],  
                "rules": {  
                  "jsx-no-multiline-js": true // here we enable some rule from the tslint-react package for TS checking  
                }  
              }  
           ]  
       }  
    ...  
      
     /// tslint.json  
    {  
      "defaultSeverity": "error",  
      "extends": ["tslint-react"],  
      "jsRules": {  
        "jsx-no-multiline-js": true // here we enable some rule from the tslint-react package for JS checking  
      },  
      "rulesDirectory": [],  
      "rules": {}  
    }  
    

    Please refer to following link
    https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin-tslint#usage


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.