Blog features are powered by the blog plugin. Simply add files to the blog directory. It supports tags as well!
Delete the whole directory if you don't want the blog features. As simple as that!
diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b2d6de3..0000000 --- a/.gitignore +++ /dev/null @@ -1,20 +0,0 @@ -# Dependencies -/node_modules - -# Production -/build - -# Generated files -.docusaurus -.cache-loader - -# Misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/static/.nojekyll b/.nojekyll similarity index 100% rename from static/.nojekyll rename to .nojekyll diff --git a/404.html b/404.html new file mode 100644 index 0000000..35b2756 --- /dev/null +++ b/404.html @@ -0,0 +1,23 @@ + + +
+ + + + + + + + + +We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
plugins",id:"plugins",children:[]},{value:"tasks",id:"tasks",children:[]}]}],p={toc:s};function d(e){var t=e.components,n=(0,o.Z)(e,c);return(0,i.kt)("wrapper",(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.kt)("p",null,"Checkup uses a ",(0,i.kt)("inlineCode",{parentName:"p"},".checkuprc")," file to configure the behaviour of the tool. The file is located in the root of the project."),(0,i.kt)("h2",{id:"configuration-file"},"Configuration file"),(0,i.kt)("p",null,"You can create a configuration file by running the following command:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-bash"},"checkup generate config\n")),(0,i.kt)("p",null,"This will generate a .checkuprc file in the current directory, with the following contents:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json",metastring:'title=".checkuprc"',title:'".checkuprc"'},'{\n "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json",\n "excludePaths": [],\n "plugins": [],\n "tasks": {}\n}\n')),(0,i.kt)("h3",{id:"excludepaths"},(0,i.kt)("inlineCode",{parentName:"h3"},"excludePaths")),(0,i.kt)("p",null,"You can exclude paths from the analysis by adding them to the ",(0,i.kt)("inlineCode",{parentName:"p"},"excludePaths")," array, which is a comma separated list of paths."),(0,i.kt)("h3",{id:"plugins"},(0,i.kt)("inlineCode",{parentName:"h3"},"plugins")),(0,i.kt)("p",null,"Plugins can be configured by adding them to the ",(0,i.kt)("inlineCode",{parentName:"p"},"plugins")," array. Each plugin is a string that represents the name of the plugin."),(0,i.kt)("h3",{id:"tasks"},(0,i.kt)("inlineCode",{parentName:"h3"},"tasks")),(0,i.kt)("p",null,"Tasks can be individually configured by adding them to the ",(0,i.kt)("inlineCode",{parentName:"p"},"tasks")," object. The key is the name of the task, and the value is either a string or a tuple:"),(0,i.kt)("p",null,"Example:"),(0,i.kt)("pre",null,(0,i.kt)("code",{parentName:"pre",className:"language-json"},'{\n "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json",\n "excludePaths": [],\n "plugins": [],\n "tasks": {\n "plugin-name/my-task": "off",\n "plugin-name/my-other-task": [\n "on",\n {\n "some-option": "some-value"\n }\n ]\n }\n}\n')))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/30a24c52.6fc24d1e.js b/assets/js/30a24c52.6fc24d1e.js
new file mode 100644
index 0000000..38f9210
--- /dev/null
+++ b/assets/js/30a24c52.6fc24d1e.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcheckup_website=self.webpackChunkcheckup_website||[]).push([[453],{8605:function(e){e.exports=JSON.parse('{"allTagsPath":"/blog/tags","slug":"/blog/tags/hello","name":"hello","count":2,"permalink":"/blog/tags/hello"}')}}]);
\ No newline at end of file
diff --git a/assets/js/32b6a1b1.f01708c1.js b/assets/js/32b6a1b1.f01708c1.js
new file mode 100644
index 0000000..b27fcc1
--- /dev/null
+++ b/assets/js/32b6a1b1.f01708c1.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcheckup_website=self.webpackChunkcheckup_website||[]).push([[6902],{3905:function(e,t,n){n.d(t,{Zo:function(){return c},kt:function(){return d}});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;tboolean",id:"checkuptaskrunnerhastaskfilter-\u21d2-boolean",children:[]},{value:"checkupTaskRunner.getAvailableTasks() \u21d2",id:"checkuptaskrunnergetavailabletasks-\u21d2",children:[]}]}],o={toc:c};function s(e){var t=e.components,n=(0,a.Z)(e,u);return(0,l.kt)("wrapper",(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("a",{name:"CheckupTaskRunner"}),(0,l.kt)("h2",{id:"checkuptaskrunner"},"CheckupTaskRunner"),(0,l.kt)("p",null,"Class that is able to run a list of checkup tasks."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": global class "),(0,l.kt)("ul",null,(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#CheckupTaskRunner"},"CheckupTaskRunner"),(0,l.kt)("ul",{parentName:"li"},(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#new_CheckupTaskRunner_new"},"new CheckupTaskRunner(options)")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#CheckupTaskRunner+taskErrorKind"},".taskErrorKind")," \u21d2 ",(0,l.kt)("code",null,"ErrorKind")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#CheckupTaskRunner+hasTaskFilter"},".hasTaskFilter")," \u21d2 ",(0,l.kt)("code",null,"boolean")),(0,l.kt)("li",{parentName:"ul"},(0,l.kt)("a",{parentName:"li",href:"#CheckupTaskRunner+getAvailableTasks"},".getAvailableTasks()")," \u21d2")))),(0,l.kt)("a",{name:"new_CheckupTaskRunner_new"}),(0,l.kt)("h3",{id:"new-checkuptaskrunneroptions"},"new CheckupTaskRunner(options)"),(0,l.kt)("p",null,"Create a CheckupTaskRunner."),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Param"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"RunOptions")),(0,l.kt)("td",{parentName:"tr",align:null},"run options that may specify the following items:")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.cwd"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"string")),(0,l.kt)("td",{parentName:"tr",align:null},"The path referring to the root directory that Checkup will run in")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.config?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"CheckupConfig")),(0,l.kt)("td",{parentName:"tr",align:null},"Use this configuration, overriding .checkuprc if present.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.configPath?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"string")),(0,l.kt)("td",{parentName:"tr",align:null},"Use the configuration found at this path, overriding .checkuprc if present.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.categories?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"Array.","<","string",">")),(0,l.kt)("td",{parentName:"tr",align:null},"Runs specific tasks specified by category. Can be used multiple times.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.excludePaths?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"Array.","<","string",">")),(0,l.kt)("td",{parentName:"tr",align:null},"Paths to exclude from checkup. If paths are provided via command line and via checkup config, command line paths will be used.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.groups?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"Array.","<","string",">")),(0,l.kt)("td",{parentName:"tr",align:null},"Runs specific tasks specified by group. Can be used multiple times.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.listTasks?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"boolean")),(0,l.kt)("td",{parentName:"tr",align:null},"If true, list all available tasks to run.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.tasks?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"Array.","<","string",">")),(0,l.kt)("td",{parentName:"tr",align:null},"Runs specific tasks specified by the fully qualified task name in the format pluginName/taskName. Can be used multiple times.")),(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"options.pluginBaseDir?"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"string")),(0,l.kt)("td",{parentName:"tr",align:null},"The base directory where Checkup will load the plugins from. Defaults to cwd.")))),(0,l.kt)("a",{name:"CheckupTaskRunner+taskErrorKind"}),(0,l.kt)("h3",{id:"checkuptaskrunnertaskerrorkind-\u21d2-errorkind"},"checkupTaskRunner.taskErrorKind \u21d2 ",(0,l.kt)("code",null,"ErrorKind")),(0,l.kt)("p",null,"Get the task's error kind"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": instance property of ",(0,l.kt)("a",{parentName:"p",href:"#CheckupTaskRunner"},(0,l.kt)("code",null,"CheckupTaskRunner"))," "),(0,l.kt)("a",{name:"CheckupTaskRunner+hasTaskFilter"}),(0,l.kt)("h3",{id:"checkuptaskrunnerhastaskfilter-\u21d2-boolean"},"checkupTaskRunner.hasTaskFilter \u21d2 ",(0,l.kt)("code",null,"boolean")),(0,l.kt)("p",null,"Check if user provides task filter by using task, category or group"),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": instance property of ",(0,l.kt)("a",{parentName:"p",href:"#CheckupTaskRunner"},(0,l.kt)("code",null,"CheckupTaskRunner"))," "),(0,l.kt)("a",{name:"CheckupTaskRunner+getAvailableTasks"}),(0,l.kt)("h3",{id:"checkuptaskrunnergetavailabletasks-\u21d2"},"checkupTaskRunner.getAvailableTasks() \u21d2"),(0,l.kt)("p",null,"Get a list of task names that are able to run."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": instance method of ",(0,l.kt)("a",{parentName:"p",href:"#CheckupTaskRunner"},(0,l.kt)("code",null,"CheckupTaskRunner")),(0,l.kt)("br",{parentName:"p"}),"\n",(0,l.kt)("strong",{parentName:"p"},"Returns"),": - a list of fully qualified task names."))}s.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/3516.f9be8540.js b/assets/js/3516.f9be8540.js
new file mode 100644
index 0000000..2a3dce8
--- /dev/null
+++ b/assets/js/3516.f9be8540.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcheckup_website=self.webpackChunkcheckup_website||[]).push([[3516],{830:function(e,t,n){n.d(t,{W:function(){return r}});var a=n(7294);function r(){return a.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},a.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}},8617:function(e,t,n){n.d(t,{Z:function(){return o}});var a=n(7294),r="iconExternalLink_3J9K",o=function(e){var t=e.width,n=void 0===t?13.5:t,o=e.height,l=void 0===o?13.5:o;return a.createElement("svg",{width:n,height:l,"aria-hidden":"true",viewBox:"0 0 24 24",className:r},a.createElement("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"}))}},3516:function(e,t,n){n.d(t,{Z:function(){return Se}});var a=n(7294),r=n(6010),o=n(5977),l=n(4973),c=n(941),i="skipToContent_1oUP";function s(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}var u=function(){var e=(0,a.useRef)(null),t=(0,o.k6)().action;return(0,c.SL)((function(n){var a=n.location;e.current&&!a.hash&&"PUSH"===t&&s(e.current)})),a.createElement("div",{ref:e},a.createElement("a",{href:"#",className:i,onClick:function(e){e.preventDefault();var t=document.querySelector("main:first-of-type")||document.querySelector(".main-wrapper");t&&s(t)}},a.createElement(l.Z,{id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation"},"Skip to main content")))},m=n(7462),d=n(3366),f=["width","height","className"];function v(e){var t=e.width,n=void 0===t?20:t,r=e.height,o=void 0===r?20:r,l=e.className,c=(0,d.Z)(e,f);return a.createElement("svg",(0,m.Z)({className:l,viewBox:"0 0 24 24",width:n,height:o,fill:"currentColor"},c),a.createElement("path",{d:"M24 20.188l-8.315-8.209 8.2-8.282-3.697-3.697-8.212 8.318-8.31-8.203-3.666 3.666 8.321 8.24-8.206 8.313 3.666 3.666 8.237-8.318 8.285 8.203z"}))}var h="announcementBar_3WsW",b="announcementBarPlaceholder_2m9F",g="announcementBarClose_38nx",E="announcementBarContent_3EUC";var p=function(){var e=(0,c.nT)(),t=e.isClosed,n=e.close,o=(0,c.LU)().announcementBar;if(!o)return null;var i=o.content,s=o.backgroundColor,u=o.textColor,m=o.isCloseable;return!i||m&&t?null:a.createElement("div",{className:h,style:{backgroundColor:s,color:u},role:"banner"},m&&a.createElement("div",{className:b}),a.createElement("div",{className:E,dangerouslySetInnerHTML:{__html:i}}),m?a.createElement("button",{type:"button",className:(0,r.Z)("clean-btn close",g),onClick:n,"aria-label":(0,l.I)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},a.createElement(v,{width:14,height:14})):null)},k=n(1036),Z=n(2389),w={toggle:"toggle_71bT"},_=function(e){var t=e.icon,n=e.style;return a.createElement("span",{className:(0,r.Z)(w.toggle,w.dark),style:n},t)},y=function(e){var t=e.icon,n=e.style;return a.createElement("span",{className:(0,r.Z)(w.toggle,w.light),style:n},t)},N=(0,a.memo)((function(e){var t=e.className,n=e.icons,o=e.checked,l=e.disabled,c=e.onChange,i=(0,a.useState)(o),s=i[0],u=i[1],m=(0,a.useState)(!1),d=m[0],f=m[1],v=(0,a.useRef)(null);return a.createElement("div",{className:(0,r.Z)("react-toggle",t,{"react-toggle--checked":s,"react-toggle--focus":d,"react-toggle--disabled":l})},a.createElement("div",{className:"react-toggle-track",role:"button",tabIndex:-1,onClick:function(){var e;return null==(e=v.current)?void 0:e.click()}},a.createElement("div",{className:"react-toggle-track-check"},n.checked),a.createElement("div",{className:"react-toggle-track-x"},n.unchecked),a.createElement("div",{className:"react-toggle-thumb"})),a.createElement("input",{ref:v,checked:s,type:"checkbox",className:"react-toggle-screenreader-only","aria-label":"Switch between dark and light mode",onChange:c,onClick:function(){return u(!s)},onFocus:function(){return f(!0)},onBlur:function(){return f(!1)},onKeyDown:function(e){var t;"Enter"===e.key&&(null==(t=v.current)||t.click())}}))}));function C(e){var t=(0,c.LU)().colorMode.switchConfig,n=t.darkIcon,r=t.darkIconStyle,o=t.lightIcon,l=t.lightIconStyle,i=(0,Z.Z)();return a.createElement(N,(0,m.Z)({disabled:!i,icons:{checked:a.createElement(_,{icon:n,style:r}),unchecked:a.createElement(y,{icon:o,style:l})}},e))}var S=n(5350),L=n(7898),I=function(e){var t=(0,o.TH)(),n=(0,a.useState)(e),r=n[0],l=n[1],i=(0,a.useRef)(!1),s=(0,a.useState)(0),u=s[0],m=s[1],d=(0,a.useCallback)((function(e){null!==e&&m(e.getBoundingClientRect().height)}),[]);return(0,L.Z)((function(t,n){var a=t.scrollY,r=null==n?void 0:n.scrollY;if(e)if(a=r?l(!1):a+c*",id:"getpluginnamecwd-\u21d2-",children:[]}],m={toc:p};function d(e){var t=e.components,n=(0,a.Z)(e,i);return(0,l.kt)("wrapper",(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,l.kt)("h2",{id:"functions"},"Functions"),(0,l.kt)("dl",null,(0,l.kt)("dt",null,(0,l.kt)("a",{href:"#getShorthandName"},"getShorthandName(fullName)")," \u21d2 ",(0,l.kt)("code",null,"string")),(0,l.kt)("dd",null,(0,l.kt)("p",null,"Removes the prefix from a fullName.")),(0,l.kt)("dt",null,(0,l.kt)("a",{href:"#getPluginName"},"getPluginName(cwd)")," \u21d2 ",(0,l.kt)("code",null,"*")),(0,l.kt)("dd",null,(0,l.kt)("p",null,"When inside a checkup plugin, gets the plugin's name."))),(0,l.kt)("a",{name:"getShorthandName"}),(0,l.kt)("h2",{id:"getshorthandnamefullname-\u21d2-string"},"getShorthandName(fullName) \u21d2 ",(0,l.kt)("code",null,"string")),(0,l.kt)("p",null,"Removes the prefix from a fullName."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": global function",(0,l.kt)("br",{parentName:"p"}),"\n",(0,l.kt)("strong",{parentName:"p"},"Returns"),": ",(0,l.kt)("code",null,"string")," - The term without prefix. "),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Param"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"fullName"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"string")),(0,l.kt)("td",{parentName:"tr",align:null},"The term which may have the prefix.")))),(0,l.kt)("a",{name:"getPluginName"}),(0,l.kt)("h2",{id:"getpluginnamecwd-\u21d2-"},"getPluginName(cwd) \u21d2 ",(0,l.kt)("code",null,"*")),(0,l.kt)("p",null,"When inside a checkup plugin, gets the plugin's name."),(0,l.kt)("p",null,(0,l.kt)("strong",{parentName:"p"},"Kind"),": global function",(0,l.kt)("br",{parentName:"p"}),"\n",(0,l.kt)("strong",{parentName:"p"},"Returns"),": ",(0,l.kt)("code",null,"*")," - {string} "),(0,l.kt)("table",null,(0,l.kt)("thead",{parentName:"table"},(0,l.kt)("tr",{parentName:"thead"},(0,l.kt)("th",{parentName:"tr",align:null},"Param"),(0,l.kt)("th",{parentName:"tr",align:null},"Type"),(0,l.kt)("th",{parentName:"tr",align:null},"Description"))),(0,l.kt)("tbody",{parentName:"table"},(0,l.kt)("tr",{parentName:"tbody"},(0,l.kt)("td",{parentName:"tr",align:null},"cwd"),(0,l.kt)("td",{parentName:"tr",align:null},(0,l.kt)("code",null,"string")),(0,l.kt)("td",{parentName:"tr",align:null},"The current working directory from which to find the plugin's name")))))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/814f3328.467f22da.js b/assets/js/814f3328.467f22da.js
new file mode 100644
index 0000000..35f6353
--- /dev/null
+++ b/assets/js/814f3328.467f22da.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcheckup_website=self.webpackChunkcheckup_website||[]).push([[2535],{5641:function(e){e.exports=JSON.parse('{"title":"Recent posts","items":[{"title":"Welcome","permalink":"/blog/welcome"},{"title":"Hello","permalink":"/blog/hello-world"},{"title":"Hola","permalink":"/blog/hola"}]}')}}]);
\ No newline at end of file
diff --git a/assets/js/83c1b94b.490fc7fe.js b/assets/js/83c1b94b.490fc7fe.js
new file mode 100644
index 0000000..fa03e8c
--- /dev/null
+++ b/assets/js/83c1b94b.490fc7fe.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcheckup_website=self.webpackChunkcheckup_website||[]).push([[7287],{3905:function(e,n,t){t.d(n,{Zo:function(){return l},kt:function(){return d}});var r=t(7294);function c(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;nYour Docusaurus site did not load properly.
\nA very common reason is a wrong site baseUrl configuration.
\nCurrent configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'
\nWe suggest trying baseUrl =
\n\n'}(e)).replace(/=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},H=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},V=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},W=function(e){var t=X(e,v.TITLE),n=X(e,F);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=X(e,L);return t||r||void 0},Z=function(e){return X(e,I)||function(){}},Y=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return q({},e,t)}),{})},K=function(e,t){return t.filter((function(e){return void 0!==e[v.BASE]})).map((function(e){return e[v.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},2885:function(e,t,n){const r=n(9901),a=n(9642),o=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...o,...Object.keys(Prism.languages)];a(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(6500).resolve(t)],delete Prism.languages[e],n(6500)(t),o.add(e)}))}i.silent=!1,e.exports=i},6500:function(e,t,n){var r={"./":2885};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=6500},9642:function(e){"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;nBlog features are powered by the blog plugin. Simply add files to the blog directory. It supports tags as well!
Delete the whole directory if you don't want the blog features. As simple as that!
Welcome to this blog. This blog is created with Docusaurus 2.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
Archive
Welcome to this blog. This blog is created with Docusaurus 2.
This is a test post.
A whole bunch of other information.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
Blog features are powered by the blog plugin. Simply add files to the blog directory. It supports tags as well!
Delete the whole directory if you don't want the blog features. As simple as that!
Class that is able to run a list of checkup tasks.
Kind: global class
ErrorKindbooleanCreate a CheckupTaskRunner.
| Param | Type | Description |
|---|---|---|
| options | RunOptions | run options that may specify the following items: |
| options.cwd | string | The path referring to the root directory that Checkup will run in |
| options.config? | CheckupConfig | Use this configuration, overriding .checkuprc if present. |
| options.configPath? | string | Use the configuration found at this path, overriding .checkuprc if present. |
| options.categories? | Array.<string> | Runs specific tasks specified by category. Can be used multiple times. |
| options.excludePaths? | Array.<string> | Paths to exclude from checkup. If paths are provided via command line and via checkup config, command line paths will be used. |
| options.groups? | Array.<string> | Runs specific tasks specified by group. Can be used multiple times. |
| options.listTasks? | boolean | If true, list all available tasks to run. |
| options.tasks? | Array.<string> | Runs specific tasks specified by the fully qualified task name in the format pluginName/taskName. Can be used multiple times. |
| options.pluginBaseDir? | string | The base directory where Checkup will load the plugins from. Defaults to cwd. |
ErrorKind#Get the task's error kind
Kind: instance property of CheckupTaskRunner
boolean#Check if user provides task filter by using task, category or group
Kind: instance property of CheckupTaskRunner
Get a list of task names that are able to run.
Kind: instance method of CheckupTaskRunner
+Returns: - a list of fully qualified task names.
Formatter#Get formatter from options.format (default: summary)
Kind: global function
+Returns: Formatter - - formatter with a format method that will return the result string.
| Param | Type | Description |
|---|---|---|
| options | FormatterOptions | formatter options that may specify the formatter name. |
| options.cwd | string | the directory where custom format located. |
| options.format | OutputFormat | string | specify the output format, it can be summary, json and customized format |
| options.outputFile | string | specify a output file to save the result. |
SarifLogBuilder#Kind: global class
+Extends: SarifLogBuilder
SarifLogBuilderA class that simplifies the building of a checkup SARIF log.
Annotates the log with any data that is acquired via dynamic invocations. +This supplements the data acquired statically, and populated in the constructor.
Kind: instance method of CheckupLogBuilder
An object containing a mapping of ErrorKind to ErrorDetails.
An object containing a mapping of ErrorKind to ErrorDetails.
Kind: global variable
enum#Enum containing kinds of errors used in a CheckupError instance.
Kind: global enum
stringRemoves the prefix from a fullName.
*When inside a checkup plugin, gets the plugin's name.
string#Removes the prefix from a fullName.
Kind: global function
+Returns: string - The term without prefix.
| Param | Type | Description |
|---|---|---|
| fullName | string | The term which may have the prefix. |
*#When inside a checkup plugin, gets the plugin's name.
Kind: global function
+Returns: * - {string}
| Param | Type | Description |
|---|---|---|
| cwd | string | The current working directory from which to find the plugin's name |
This section contains the API reference for the following:
Tasks gather data from analyzed files, and sometimes you want to help add emphasis to specific parts of the data. This is accomplished through the use of actions.
Actions are declarative triggers that can be attached to any task. They are ran as a post-processing step on the results of the task, and any triggered actions are +stored as part of the output.
To add actions to a plugin for a task, use the following command:
checkup generate actions <actions name>You'll be prompted to identify the task you want to add the actions to.
This will generate the following file:
- src/actions/actions-name.ts- src/actions/actions-name.jsActions are written in a declarative fashion, by evaluating specific values from the task results. The following is an example of a simple action that is triggered +when the occurances of the task results are greater than a certain threshold:
import { ActionsEvaluator, TaskConfig } from '@checkup/core';import { Result } from 'sarif';
+export function evaluateActions(taskResults: Result[], taskConfig: TaskConfig) { let actionsEvaluator = new ActionsEvaluator(); let occurances = taskResult.length;
+ actionsEvaluator.add({ taskName: 'task-name-to-run-actions-on', name: 'task-name-bad-things', summary: 'Reduce number of bad things', details: `${occurances} usages of bad things`, defaultThreshold: 2, items: [`Total occurances: ${occurances}`], input: occurances, });
+ return actionsEvaluator.evaluate(taskConfig);}const { ActionsEvaluator } = require('@checkup/core');
+module.exports = function evaluateActions(taskResults, taskConfig) { let actionsEvaluator = new ActionsEvaluator(); let occurances = taskResult.length;
+ actionsEvaluator.add({ taskName: 'task-name-to-run-actions-on', name: 'task-name-bad-things', summary: 'Reduce number of bad things', details: `${occurances} usages of bad things`, defaultThreshold: 2, items: [`Total occurances: ${occurances}`], input: occurances, });
+ return actionsEvaluator.evaluate(taskConfig);};Analyzers allow you to perform custom checks on your code. Checkup provides a number of built-in analyzers, but you can also create your own.
Some of the built-in analyzers are:
Analyzers are used in your Tasks to provide a consistent AST parsing and traversing mechanism.
Below is an example of using the JavaScript analyzer:
import { BaseTask, Task, TypeScriptAnalyzer } from '@checkup/core';import { Result } from 'sarif';
+export default class DemoTask extends BaseTask implements Task { taskName = 'demo-task'; taskDisplayName = 'Deme Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run(): Promise<Result[]> { let source = await this.readFile('some-file.ts'); let analyzer = new TypeScriptAnalyzer(source);
+ analyzer.analyze({ // Analyze the AST });
+ // Gather and populate data into results
+ return this.results; }}const { BaseTask, JavaScriptAnalyzer } = require('@checkup/core');
+module.exports = class DemoTask extends BaseTask { taskName = 'demo-task'; taskDisplayName = 'Demo Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run() { let source = await this.readFile('some-file.js'); let analyzer = new JavaScriptAnalyzer(source);
+ analyzer.analyze({ // Analyze the AST });
+ // Gather and populate data into results
+ return this.results; }};Results are generated by the Task. The Task is responsible for populating the results array with the results of the analysis.
The Task base class provides some convenience methods for generating results. The addResult method attempts to simplify the process of adding
+results such that you don't have to know the specifics of SARIF in order to successfully generate meaningful output.
For more details about SARIF, see the SARIF Specification.
import { BaseTask, Task } from '@checkup/core';import { Result } from 'sarif';
+export default class DemoTask extends BaseTask implements Task { taskName = 'demo-task'; taskDisplayName = 'Deme Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run(): Promise<Result[]> { let results = await this.getData();
+ for (let result of results) { this.addResult({ messageText: result.message, level: 'fail', kind: 'error', { location: { uri: result.uri, startLine: result.line, startColumn: result.column, endLine: result.line, endColumn: result.column } } }); }
+ return this.results; }}const { BaseTask } = require('@checkup/core');
+module.exports = class <%- taskClass %> extends BaseTask { taskName = 'demo-task'; taskDisplayName = 'Demo Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run() { let results = await this.getData();
+ for (let result of results) { this.addResult({ messageText: result.message, level: 'fail', kind: 'error', { location: { uri: result.uri, startLine: result.line, startColumn: result.column, endLine: result.line, endColumn: result.column } } }); }
+ return this.results; }}Plugins provide a way to combine Tasks together in logical groupings. They can be configured to run in @checkup/cli as a whole plugin, or individually.
Plugins can be generated using the CLI's generate command.
checkup generate plugin my-pluginThis will generate the following structure:
├── .eslintignore├── .eslintrc├── .gitignore├── .prettierrc.js├── README.md├── __tests__│ └── .gitkeep├── jest.config.js├── package.json├── src│ ├── index.ts│ ├── results│ │ └── .gitkeep│ ├── tasks│ │ └── .gitkeep│ └── types│ └── index.ts├── tsconfig.json└── yarn.lock├── .eslintignore├── .eslintrc├── .gitignore├── .prettierrc.js├── README.md├── **tests**│ └── .gitkeep├── jest.config.js├── package.json├── src│ ├── index.js│ ├── results│ │ └── .gitkeep│ └── tasks│ └── .gitkeep└── yarn.lockyarn buildOr in watch mode:
yarn build:watchyarn testyarn lintyarn docs:generateTasks can be added to plugins, which can in turn be configured to run in the CLI.
To add a task to a plugin, use the following command:
checkup generate task <task name>This will generate the following files:
- src/tasks/demo-task.ts- tests/demo-task-test.ts- src/tasks/demo-task.js- tests/demo-task-test.jsYou need to be inside a checkup plugin directory in order to run the generate task command.
Tasks are written by implementing the run method, which is the main entry point for the task. During construction, the task is passed a TaskContext object, which contains the following properties:
export interface TaskContext { readonly options: RunOptions; readonly config: CheckupConfig; readonly logBuilder: CheckupLogBuilder; readonly pkg: PackageJson; readonly pkgSource: string; readonly paths: FilePathArray;}The context can be accessed via this.context, and properties can be accessed when executing the task's run method.
Checkup tasks are just plain JavaScript classes. They can be used in any way you like, including using any valid Node APIs.
import { BaseTask, Task } from '@checkup/core';import { Result } from 'sarif';
+export default class DemoTask extends BaseTask implements Task { taskName = 'demo-task'; taskDisplayName = 'Deme Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run(): Promise<Result[]> { // Gather and populate data into results
+ return this.results; }}const { BaseTask } = require('@checkup/core');
+module.exports = class DemoTask extends BaseTask { taskName = 'demo-task'; taskDisplayName = 'Demo Task'; description = 'A task for demonstration purposes'; category = 'best practices';
+ async run() { // Gather and populate data into results
+ return this.results; }};The following are some of the most commonly used commands:
checkup --helpcheckup run .By path:
checkup run --config ./some/path/.checkuprcBy URL:
checkup run --config https://example.com/config.jsoncheckup run . --task my-taskcheckup run . --category my-categorycheckup run . --group my-groupcheckup run . --format checkup-formatter-prettycheckup run . --plugin-base-dir ./my-plugin-dircheckup generate configcheckup generate plugin my-plugincheckup generate task my-taskcheckup generate action my-actionCheckup uses a .checkuprc file to configure the behaviour of the tool. The file is located in the root of the project.
You can create a configuration file by running the following command:
checkup generate configThis will generate a .checkuprc file in the current directory, with the following contents:
{ "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json", "excludePaths": [], "plugins": [], "tasks": {}}excludePaths#You can exclude paths from the analysis by adding them to the excludePaths array, which is a comma separated list of paths.
plugins#Plugins can be configured by adding them to the plugins array. Each plugin is a string that represents the name of the plugin.
tasks#Tasks can be individually configured by adding them to the tasks object. The key is the name of the task, and the value is either a string or a tuple:
Example:
{ "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json", "excludePaths": [], "plugins": [], "tasks": { "plugin-name/my-task": "off", "plugin-name/my-other-task": [ "on", { "some-option": "some-value" } ] }}In addition to a CLI, Checkup also provides a Node API. This allows for programmatic access to Checkup's functionality.
You can import Checkup's task runner class and use it to run tasks. For example:
import { CheckupTaskRunner, getFormatter } from '@checkup/cli';
+let taskRunner = new CheckupTaskRunner({ // pass options here});
+let log = await taskRunner.run();
+let formatter = getFormatter({ // pass options here});
+formatter.format(log);const { CheckupTaskRunner, getFormatter } = require('@checkup/cli');
+let taskRunner = new CheckupTaskRunner({ // pass options here});
+let log = await taskRunner.run();
+let formatter = getFormatter({ // pass options here});
+formatter.format(log);See the following API documentation for more information.
Checkup was created to optimize writing tasks that enable you to gather the information that's useful to you, and use that information to make decisions. Checkup allows you to:
Checkup can be used through the command line, or programmatically through the Node API.
Checkup has it's own CLI for running tasks, installable via npm.
npm i -D @checkup/cliyarn add @checkup/cli --devThe Node API, which provides a way to run tasks programmatically, can also be accessed through the @checkup/cli package.
Checkup uses a configuration file to define the plugins and tasks to run. You can create a configuration file by running the following command in the root of your project:
checkup generate configThis will generate a .checkuprc file in the current directory, with the following contents:
{ "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json", "excludePaths": [], "plugins": [], "tasks": {}}excludePaths: A list of paths to exclude from analysis.plugins: A list of plugins to load.tasks: A list of tasks to run.In order to run checkup, you must add plugins to your configuration file. Add plugins to your project by running the following command:
npm i -D checkup-plugin-exampleyarn add checkup-plugin-example --devThen, edit the .checkuprc file that was created and add the plugin to your configuration file:
{ "$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json", "excludePaths": [], "plugins": ["checkup-plugin-example"], "tasks": {}}Finally, run the CLI in the root of your project to run your tasks:
checkup run .Checkup will run the tasks in the configured plugins, and output the results to a SARIF file by default.
You can also analyze your results using a SARIF viewer. See analyzing results for more information.
Codebases change over time, which means that the quality of the codebase changes as the project evolves. Keeping up with those changes, and making sure that the quality of the codebase is maintained, is a key part of the development process.
Static analysis has long been a part of the development process. And while the ecosystem of JavaScript static analysis tools is rich and evolving, most of those tools are focused on rule-based, single-file analysis. Getting a picture of the results of multiple tools that combine to give a full representation of the codebase is a challenge. Each tool would need to be run independently, and their results combined and normalized to get a clear picture of the codebase.
This is where Checkup comes in.
Checkup is a static analysis aggregator that produces a single report of the codebase across multiple tools. It uses tasks to run analysis, irrespective of tool, and combines the results into a single report. That report utilizes the Static Analysis Results Interchange Format (SARIF), which is a standard format for static analysis reports.
Most linters and other static analysis tools operate on a single file at a time. Understanding the relationship between results from multiple tools is difficult, or requires custom scripts to be written.
Checkup allows you to take a view from a higher level. It allows you to run multiple tools on a single file, or across groups of files, and then combine the results into a single report. This gives you a different picture of your codebase, and allows you to perform analysis with whole project knowledge.
Project maintenance often requires multiple series of API migrations. It's not uncommon to have a large number of API changes that need to be made to a project, which can overlap and be a challenge to track.
Checkup provides a way to quanitfy the changes that need to be made to a project, and to track the progress of those changes. This allows you to gauge the overall effort, and make adjustments to ensure that projects get completed in a timely manner.
The static analysis ecosystem is rich in JavaScript. While most of the tools are focused on rule-based, single-file analysis, Checkup is able to leverage the power of the tools to provide a more comprehensive view of the codebase.
Author static analysis tasks that allow you to gather insights across single or groups of files. Group output from multiple lint tools.
Generate consistent output using the SARIF open standard. Analyze output using integrations in popular IDEs.
Provide insights that help make sure your codebase is clean and maintainable to improve developer productivity. Monitor migrations to track progress.
You don't need React to write simple standalone pages.
{description}
-{siteConfig.tagline}
-