Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Wednesday, 21 January 2026

React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration

When we  build the PCF project and  receive below warning  

Error:

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .

[4:47:40 PM] [start]  Compiling and bundling control...



Solution : Open the ".eslintrc.json" and add below configuration 


"settings": {

      "react": {

        "version": "detect"

      }

    }



Wednesday, 13 July 2016

Querystring value in JQuery/Javascript

function getQueryStringParameter(paramToRetrieve) {
        var params =
            document.URL.split("?")[1].split("&");
        var strParams = "";
        for (var i = 0; i < params.length; i = i + 1) {
            var singleParam = params[i].split("=");
            if (singleParam[0] == paramToRetrieve)
                return singleParam[1];
        }
    }

formated date in jquery/javascript

function getFormattedDate(formatedDate) {
  var year = formatedDate.getFullYear();
  var month = (1 + formatedDate.getMonth()).toString();
  month = month.length > 1 ? month : '0' + month;
  var day = formatedDate.getDate().toString();
  day = day.length > 1 ? day : '0' + day;
  return month + '/' + day + '/' + year;
}