[{"data":1,"prerenderedAt":15020},["ShallowReactive",2],{"/environment/prettier-alternatives/":3,"article-/environment/prettier/":1644,"article-/php/phpcs/":3939,"article-/js/eslint/":10496,"article-/css/stylelint/":12978},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"head":10,"created":25,"tags":29,"chapters":32,"thumb":35,"contact":36,"feedback":36,"lead":36,"list":36,"index":36,"sitemap":36,"featured":36,"body":37,"_type":1638,"_id":1639,"_source":1640,"_file":1641,"_stem":1642,"_extension":1643},"/environment/prettier-alternatives","environment",false,"","What are the Prettier alternatives and why consider them?","The article outlines reasons for limiting Prettier's usage in the codebase and presents alternative options for enforcing consistent stylistic rules across the project.",{"title":11,"link":12,"meta":16},"What are the prettier alternatives and why consider them? | pragmate.dev",[13],{"rel":14,"href":15},"canonical","https://pragmate.dev/environment/prettier-alternatives/",[17,20,23,26],{"name":18,"content":19},"twitter:creator","@przemekhernik",{"name":21,"content":22},"author","Przemysław Hernik",{"name":24,"content":25},"article:published_time","2026-07-27",{"name":27,"content":28},"og:image","https://i9.ytimg.com/vi/kHmn6-UhnTw/maxresdefault.jpg",{"time":30,"level":31},"8 min","Easy",[33,34],"/environment/prettier-alternatives/","/environment/prettier/","approved",true,{"type":38,"children":39,"toc":1623},"root",[40,47,74,78,82,89,110,114,117,123,143,148,155,160,169,199,204,216,219,225,245,252,255,261,272,286,491,503,655,685,845,850,980,1000,1003,1009,1037,1044,1047,1052,1057,1065,1069,1072,1078,1083,1086,1092,1130,1152,1159,1210,1217,1220,1226,1249,1256,1277,1280,1286,1317,1347,1527,1539,1542,1548,1579,1583,1587,1591,1594,1617],{"type":41,"tag":42,"props":43,"children":46},"element","prose-video",{"thumbnail":44,"url":45},"https://cdn.pragmate.dev/wp-content/uploads/2025/11/a5f05670-9565-4f4f-8d85-22db99b9a4e3.jpg","https://www.youtube-nocookie.com/embed/kHmn6-UhnTw",[],{"type":41,"tag":48,"props":49,"children":50},"p",{},[51,54,63,65,72],{"type":52,"value":53},"text","I have finally decided to limit ",{"type":41,"tag":55,"props":56,"children":60},"a",{"href":57,"rel":58},"https://pragmate.dev/environment/prettier/",[59],"nofollow",[61],{"type":52,"value":62},"Prettier",{"type":52,"value":64}," usage as the primary code formatter. I ",{"type":41,"tag":55,"props":66,"children":69},{"href":67,"rel":68},"https://pragmate.dev/environment/prettier/#do-i-use-prettier-in-my-workflow",[59],[70],{"type":52,"value":71},"tried to get used to it",{"type":52,"value":73}," and gave it several chances, but the way it worked didn’t meet my needs. This article discusses the reasons, shows how you can opt out of using Prettier and what to use instead.",{"type":41,"tag":75,"props":76,"children":77},"cta",{},[],{"type":41,"tag":79,"props":80,"children":81},"hr",{},[],{"type":41,"tag":83,"props":84,"children":86},"h2",{"id":85},"what-is-prettier",[87],{"type":52,"value":88},"What is Prettier?",{"type":41,"tag":48,"props":90,"children":91},{},[92,94,100,102,108],{"type":52,"value":93},"A small reminder for those who don't know this tool yet. ",{"type":41,"tag":95,"props":96,"children":97},"strong",{},[98],{"type":52,"value":99},"Prettier is a code formatter that enforces a specific coding style across the project.",{"type":52,"value":101}," It simply takes your code and reprints it from scratch, following its rules to ensure consistent formatting. If you're not yet familiar with this tool, take a look at this ",{"type":41,"tag":55,"props":103,"children":105},{"href":57,"rel":104},[59],[106],{"type":52,"value":107},"basic guide",{"type":52,"value":109}," where I discuss more 👇",{"type":41,"tag":111,"props":112,"children":113},"prose-tile",{"url":34},[],{"type":41,"tag":79,"props":115,"children":116},{},[],{"type":41,"tag":83,"props":118,"children":120},{"id":119},"why-i-stopped-using-prettier",[121],{"type":52,"value":122},"Why I Stopped Using Prettier?",{"type":41,"tag":48,"props":124,"children":125},{},[126,128,141],{"type":52,"value":127},"Prettier has a specific way of formatting code without much customization. ",{"type":41,"tag":95,"props":129,"children":130},{},[131,133,139],{"type":52,"value":132},"It follows a specific set of rules and ",{"type":41,"tag":55,"props":134,"children":136},{"href":135},"/environment/prettier/#do-i-use-prettier-in-my-workflow",[137],{"type":52,"value":138},"doesn't allow much deviation from them",{"type":52,"value":140},".",{"type":52,"value":142}," This can be seen as both an advantage and a disadvantage. Check out a few examples below 👇",{"type":41,"tag":144,"props":145,"children":147},"spacer",{"height":146},75,[],{"type":41,"tag":149,"props":150,"children":152},"h3",{"id":151},"reason-1-no-immediate-feedback",[153],{"type":52,"value":154},"Reason #1: No Immediate Feedback ❌",{"type":41,"tag":48,"props":156,"children":157},{},[158],{"type":52,"value":159},"Take a look at the code, which breaks a few rules like incorrect quotes in line #2 and incorrect indentation in lines #5, #6, and #7. One part is handled by Stylelint, the other by Prettier.",{"type":41,"tag":48,"props":161,"children":162},{},[163],{"type":41,"tag":164,"props":165,"children":168},"img",{"alt":166,"src":167},"Image","https://crm.tentyp.dev/wp-content/uploads/2025/03/e00d421a-91c7-4e74-9b53-a40049df36bd.png",[],{"type":41,"tag":48,"props":170,"children":171},{},[172,174,181,183,190,192,197],{"type":52,"value":173},"When I use ",{"type":41,"tag":55,"props":175,"children":178},{"href":176,"rel":177},"https://pragmate.dev/css/stylelint/",[59],[179],{"type":52,"value":180},"Stylelint",{"type":52,"value":182}," with ",{"type":41,"tag":55,"props":184,"children":187},{"href":185,"rel":186},"https://pragmate.dev/css/stylelint/#how-to-integrate-stylelint-with-vs-code",[59],[188],{"type":52,"value":189},"VS Code",{"type":52,"value":191},", it highlights all the violations with exact references just as I write. ",{"type":41,"tag":95,"props":193,"children":194},{},[195],{"type":52,"value":196},"Similar setup for Prettier doesn't indicate any issues",{"type":52,"value":198},". It's obvious that there are problems with the indentation, but even after making some adjustments, the code still doesn't align with Prettier's rules, and I don't know about this until I trigger code format.",{"type":41,"tag":200,"props":201,"children":203},"prose-gallery",{":items":202},"[\"https://crm.tentyp.dev/wp-content/uploads/2025/03/e00d421a-91c7-4e74-9b53-a40049df36bd.png\",\"https://crm.tentyp.dev/wp-content/uploads/2025/03/32e65b59-e685-4814-95a9-108feb1b4354.png\",\"https://crm.tentyp.dev/wp-content/uploads/2025/03/c9868ac5-265a-431f-a637-65dc8df5d7b7.png\",\"https://crm.tentyp.dev/wp-content/uploads/2025/03/831b052c-2c31-4c8e-9b49-905fd8d02a24.png\"]",[],{"type":41,"tag":48,"props":205,"children":206},{},[207,209,214],{"type":52,"value":208},"I’m aware that Prettier was created to forget about such things. Automatic fixes, especially with features like \"format on save\" are amazing, and improve the coding experience a lot, but ",{"type":41,"tag":95,"props":210,"children":211},{},[212],{"type":52,"value":213},"they can also take away valuable learning opportunities",{"type":52,"value":215},". For those who thrive on detailed feedback to improve their coding practices, seeing each issue as they write is beneficial.",{"type":41,"tag":144,"props":217,"children":218},{"height":146},[],{"type":41,"tag":149,"props":220,"children":222},{"id":221},"reason-2-easier-to-forget-about-formatting",[223],{"type":52,"value":224},"Reason #2: Easier to Forget About Formatting ❌",{"type":41,"tag":48,"props":226,"children":227},{},[228,230,235,237,243],{"type":52,"value":229},"Without CI/CD processes or integrating tools like Husky, ",{"type":41,"tag":95,"props":231,"children":232},{},[233],{"type":52,"value":234},"developers must remember to format the code before pushing it to the repository",{"type":52,"value":236},". This reliance on memory is a potential source of the problems and that's why I prefer seeing issues as I write - I can't say \"",{"type":41,"tag":238,"props":239,"children":240},"em",{},[241],{"type":52,"value":242},"Oh, I haven’t noticed this",{"type":52,"value":244},"\" when everything is marked with red as it is in Stylelint.",{"type":41,"tag":48,"props":246,"children":247},{},[248],{"type":41,"tag":164,"props":249,"children":251},{"alt":166,"src":250},"https://crm.tentyp.dev/wp-content/uploads/2025/03/797204fa-c325-472e-8f28-4008a1ca5a71.png",[],{"type":41,"tag":144,"props":253,"children":254},{"height":146},[],{"type":41,"tag":149,"props":256,"children":258},{"id":257},"reason-3-too-aggressive-style",[259],{"type":52,"value":260},"Reason #3: Too Aggressive Style ❌",{"type":41,"tag":48,"props":262,"children":263},{},[264,266,271],{"type":52,"value":265},"Prettier's approach includes breaking up lines that exceed a set line length limit. It means that when lines are too long, Prettier will automatically adjust them to fit within the predefined boundary. However, its style checks don't stop there, and ",{"type":41,"tag":95,"props":267,"children":268},{},[269],{"type":52,"value":270},"the results are not always better",{"type":52,"value":140},{"type":41,"tag":48,"props":273,"children":274},{},[275,277,284],{"type":52,"value":276},"Take a look at this simple ",{"type":41,"tag":278,"props":279,"children":281},"code",{"className":280},[],[282],{"type":52,"value":283},"lint-staged",{"type":52,"value":285}," configuration file. It has a clear, consistent structure that is easy to read and modify when needed. Essentially, no changes are required.",{"type":41,"tag":287,"props":288,"children":293},"pre",{"className":289,"code":290,"filename":291,"language":292,"meta":7,"style":7},"language-json shiki shiki-themes one-dark-pro","{\n  \"*.js\": [\n    \"eslint --fix\",\n    \"eslint\",\n    \"test first\",\n    \"test second\",\n    \"test third\"\n  ],\n  \"*.css\": [\n    \"stylelint --fix\",\n    \"stylelint\"\n  ],\n  \"*blade.php\": [\n    \"prettier --write\",\n    \"prettier --check\"\n  ],\n}\n",".lintstagedrc","json",[294],{"type":41,"tag":278,"props":295,"children":296},{"__ignoreMap":7},[297,309,324,339,352,365,378,387,396,409,422,431,439,452,465,474,482],{"type":41,"tag":298,"props":299,"children":302},"span",{"class":300,"line":301},"line",1,[303],{"type":41,"tag":298,"props":304,"children":306},{"style":305},"--shiki-default:#ABB2BF",[307],{"type":52,"value":308},"{\n",{"type":41,"tag":298,"props":310,"children":312},{"class":300,"line":311},2,[313,319],{"type":41,"tag":298,"props":314,"children":316},{"style":315},"--shiki-default:#E06C75",[317],{"type":52,"value":318},"  \"*.js\"",{"type":41,"tag":298,"props":320,"children":321},{"style":305},[322],{"type":52,"value":323},": [\n",{"type":41,"tag":298,"props":325,"children":327},{"class":300,"line":326},3,[328,334],{"type":41,"tag":298,"props":329,"children":331},{"style":330},"--shiki-default:#98C379",[332],{"type":52,"value":333},"    \"eslint --fix\"",{"type":41,"tag":298,"props":335,"children":336},{"style":305},[337],{"type":52,"value":338},",\n",{"type":41,"tag":298,"props":340,"children":342},{"class":300,"line":341},4,[343,348],{"type":41,"tag":298,"props":344,"children":345},{"style":330},[346],{"type":52,"value":347},"    \"eslint\"",{"type":41,"tag":298,"props":349,"children":350},{"style":305},[351],{"type":52,"value":338},{"type":41,"tag":298,"props":353,"children":355},{"class":300,"line":354},5,[356,361],{"type":41,"tag":298,"props":357,"children":358},{"style":330},[359],{"type":52,"value":360},"    \"test first\"",{"type":41,"tag":298,"props":362,"children":363},{"style":305},[364],{"type":52,"value":338},{"type":41,"tag":298,"props":366,"children":368},{"class":300,"line":367},6,[369,374],{"type":41,"tag":298,"props":370,"children":371},{"style":330},[372],{"type":52,"value":373},"    \"test second\"",{"type":41,"tag":298,"props":375,"children":376},{"style":305},[377],{"type":52,"value":338},{"type":41,"tag":298,"props":379,"children":381},{"class":300,"line":380},7,[382],{"type":41,"tag":298,"props":383,"children":384},{"style":330},[385],{"type":52,"value":386},"    \"test third\"\n",{"type":41,"tag":298,"props":388,"children":390},{"class":300,"line":389},8,[391],{"type":41,"tag":298,"props":392,"children":393},{"style":305},[394],{"type":52,"value":395},"  ],\n",{"type":41,"tag":298,"props":397,"children":399},{"class":300,"line":398},9,[400,405],{"type":41,"tag":298,"props":401,"children":402},{"style":315},[403],{"type":52,"value":404},"  \"*.css\"",{"type":41,"tag":298,"props":406,"children":407},{"style":305},[408],{"type":52,"value":323},{"type":41,"tag":298,"props":410,"children":412},{"class":300,"line":411},10,[413,418],{"type":41,"tag":298,"props":414,"children":415},{"style":330},[416],{"type":52,"value":417},"    \"stylelint --fix\"",{"type":41,"tag":298,"props":419,"children":420},{"style":305},[421],{"type":52,"value":338},{"type":41,"tag":298,"props":423,"children":425},{"class":300,"line":424},11,[426],{"type":41,"tag":298,"props":427,"children":428},{"style":330},[429],{"type":52,"value":430},"    \"stylelint\"\n",{"type":41,"tag":298,"props":432,"children":434},{"class":300,"line":433},12,[435],{"type":41,"tag":298,"props":436,"children":437},{"style":305},[438],{"type":52,"value":395},{"type":41,"tag":298,"props":440,"children":442},{"class":300,"line":441},13,[443,448],{"type":41,"tag":298,"props":444,"children":445},{"style":315},[446],{"type":52,"value":447},"  \"*blade.php\"",{"type":41,"tag":298,"props":449,"children":450},{"style":305},[451],{"type":52,"value":323},{"type":41,"tag":298,"props":453,"children":455},{"class":300,"line":454},14,[456,461],{"type":41,"tag":298,"props":457,"children":458},{"style":330},[459],{"type":52,"value":460},"    \"prettier --write\"",{"type":41,"tag":298,"props":462,"children":463},{"style":305},[464],{"type":52,"value":338},{"type":41,"tag":298,"props":466,"children":468},{"class":300,"line":467},15,[469],{"type":41,"tag":298,"props":470,"children":471},{"style":330},[472],{"type":52,"value":473},"    \"prettier --check\"\n",{"type":41,"tag":298,"props":475,"children":477},{"class":300,"line":476},16,[478],{"type":41,"tag":298,"props":479,"children":480},{"style":305},[481],{"type":52,"value":395},{"type":41,"tag":298,"props":483,"children":485},{"class":300,"line":484},17,[486],{"type":41,"tag":298,"props":487,"children":488},{"style":305},[489],{"type":52,"value":490},"}\n",{"type":41,"tag":48,"props":492,"children":493},{},[494,496,501],{"type":52,"value":495},"After formatting the code, ",{"type":41,"tag":95,"props":497,"children":498},{},[499],{"type":52,"value":500},"I ended up with a file that has inconsistent formatting",{"type":52,"value":502},", which created more problems rather than solving them. Even though the file was initially well-structured and adhered to the line length limits, Prettier modified and compacted the lines.",{"type":41,"tag":287,"props":504,"children":506},{"className":289,"code":505,"language":292,"meta":7,"style":7},"{\n  \"*.js\": [\n    \"eslint --fix\",\n    \"eslint\",\n    \"test first\",\n    \"test second\",\n    \"test third\"\n  ],\n  \"*.css\": [\"stylelint --fix\", \"stylelint\"],\n  \"*blade.php\": [\"prettier --write\", \"prettier --check\"]\n}\n",[507],{"type":41,"tag":278,"props":508,"children":509},{"__ignoreMap":7},[510,517,528,539,550,561,572,579,586,618,648],{"type":41,"tag":298,"props":511,"children":512},{"class":300,"line":301},[513],{"type":41,"tag":298,"props":514,"children":515},{"style":305},[516],{"type":52,"value":308},{"type":41,"tag":298,"props":518,"children":519},{"class":300,"line":311},[520,524],{"type":41,"tag":298,"props":521,"children":522},{"style":315},[523],{"type":52,"value":318},{"type":41,"tag":298,"props":525,"children":526},{"style":305},[527],{"type":52,"value":323},{"type":41,"tag":298,"props":529,"children":530},{"class":300,"line":326},[531,535],{"type":41,"tag":298,"props":532,"children":533},{"style":330},[534],{"type":52,"value":333},{"type":41,"tag":298,"props":536,"children":537},{"style":305},[538],{"type":52,"value":338},{"type":41,"tag":298,"props":540,"children":541},{"class":300,"line":341},[542,546],{"type":41,"tag":298,"props":543,"children":544},{"style":330},[545],{"type":52,"value":347},{"type":41,"tag":298,"props":547,"children":548},{"style":305},[549],{"type":52,"value":338},{"type":41,"tag":298,"props":551,"children":552},{"class":300,"line":354},[553,557],{"type":41,"tag":298,"props":554,"children":555},{"style":330},[556],{"type":52,"value":360},{"type":41,"tag":298,"props":558,"children":559},{"style":305},[560],{"type":52,"value":338},{"type":41,"tag":298,"props":562,"children":563},{"class":300,"line":367},[564,568],{"type":41,"tag":298,"props":565,"children":566},{"style":330},[567],{"type":52,"value":373},{"type":41,"tag":298,"props":569,"children":570},{"style":305},[571],{"type":52,"value":338},{"type":41,"tag":298,"props":573,"children":574},{"class":300,"line":380},[575],{"type":41,"tag":298,"props":576,"children":577},{"style":330},[578],{"type":52,"value":386},{"type":41,"tag":298,"props":580,"children":581},{"class":300,"line":389},[582],{"type":41,"tag":298,"props":583,"children":584},{"style":305},[585],{"type":52,"value":395},{"type":41,"tag":298,"props":587,"children":588},{"class":300,"line":398},[589,593,598,603,608,613],{"type":41,"tag":298,"props":590,"children":591},{"style":315},[592],{"type":52,"value":404},{"type":41,"tag":298,"props":594,"children":595},{"style":305},[596],{"type":52,"value":597},": [",{"type":41,"tag":298,"props":599,"children":600},{"style":330},[601],{"type":52,"value":602},"\"stylelint --fix\"",{"type":41,"tag":298,"props":604,"children":605},{"style":305},[606],{"type":52,"value":607},", ",{"type":41,"tag":298,"props":609,"children":610},{"style":330},[611],{"type":52,"value":612},"\"stylelint\"",{"type":41,"tag":298,"props":614,"children":615},{"style":305},[616],{"type":52,"value":617},"],\n",{"type":41,"tag":298,"props":619,"children":620},{"class":300,"line":411},[621,625,629,634,638,643],{"type":41,"tag":298,"props":622,"children":623},{"style":315},[624],{"type":52,"value":447},{"type":41,"tag":298,"props":626,"children":627},{"style":305},[628],{"type":52,"value":597},{"type":41,"tag":298,"props":630,"children":631},{"style":330},[632],{"type":52,"value":633},"\"prettier --write\"",{"type":41,"tag":298,"props":635,"children":636},{"style":305},[637],{"type":52,"value":607},{"type":41,"tag":298,"props":639,"children":640},{"style":330},[641],{"type":52,"value":642},"\"prettier --check\"",{"type":41,"tag":298,"props":644,"children":645},{"style":305},[646],{"type":52,"value":647},"]\n",{"type":41,"tag":298,"props":649,"children":650},{"class":300,"line":424},[651],{"type":41,"tag":298,"props":652,"children":653},{"style":305},[654],{"type":52,"value":490},{"type":41,"tag":48,"props":656,"children":657},{},[658,660,667,669,675,677,683],{"type":52,"value":659},"Another example involves a component that utilizes an ",{"type":41,"tag":55,"props":661,"children":664},{"href":662,"rel":663},"https://laravel.com/docs/12.x/blade#component-attributes",[59],[665],{"type":52,"value":666},"attributes bag",{"type":52,"value":668},". To enhance readability, I split each operation related to attributes, such as ",{"type":41,"tag":278,"props":670,"children":672},{"className":671},[],[673],{"type":52,"value":674},"class",{"type":52,"value":676}," or ",{"type":41,"tag":278,"props":678,"children":680},{"className":679},[],[681],{"type":52,"value":682},"merge",{"type":52,"value":684},", to separate lines.",{"type":41,"tag":287,"props":686,"children":691},{"className":687,"code":688,"highlights":689,"language":690,"meta":7,"style":7},"language-blade shiki shiki-themes one-dark-pro","\u003Cdiv\n    {{\n        $attributes\n            ->class(['block-carousel not-prose relative'])\n            ->merge([\n                'x-data' => 'block_carousel',\n            ])\n    }}\n>\n    CONTENT\n\u003C/div>\n",[341,354,367,380],"blade",[692],{"type":41,"tag":278,"props":693,"children":694},{"__ignoreMap":7},[695,708,717,725,755,772,795,804,812,820,828],{"type":41,"tag":298,"props":696,"children":697},{"class":300,"line":301},[698,703],{"type":41,"tag":298,"props":699,"children":700},{"style":305},[701],{"type":52,"value":702},"\u003C",{"type":41,"tag":298,"props":704,"children":705},{"style":315},[706],{"type":52,"value":707},"div\n",{"type":41,"tag":298,"props":709,"children":710},{"class":300,"line":311},[711],{"type":41,"tag":298,"props":712,"children":714},{"style":713},"--shiki-default:#56B6C2",[715],{"type":52,"value":716},"    {{\n",{"type":41,"tag":298,"props":718,"children":719},{"class":300,"line":326},[720],{"type":41,"tag":298,"props":721,"children":722},{"style":315},[723],{"type":52,"value":724},"        $attributes\n",{"type":41,"tag":298,"props":726,"children":729},{"class":727,"line":341},[300,728],"highlight",[730,735,740,745,750],{"type":41,"tag":298,"props":731,"children":732},{"style":305},[733],{"type":52,"value":734},"            ->",{"type":41,"tag":298,"props":736,"children":738},{"style":737},"--shiki-default:#61AFEF",[739],{"type":52,"value":674},{"type":41,"tag":298,"props":741,"children":742},{"style":305},[743],{"type":52,"value":744},"([",{"type":41,"tag":298,"props":746,"children":747},{"style":330},[748],{"type":52,"value":749},"'block-carousel not-prose relative'",{"type":41,"tag":298,"props":751,"children":752},{"style":305},[753],{"type":52,"value":754},"])\n",{"type":41,"tag":298,"props":756,"children":758},{"class":757,"line":354},[300,728],[759,763,767],{"type":41,"tag":298,"props":760,"children":761},{"style":305},[762],{"type":52,"value":734},{"type":41,"tag":298,"props":764,"children":765},{"style":737},[766],{"type":52,"value":682},{"type":41,"tag":298,"props":768,"children":769},{"style":305},[770],{"type":52,"value":771},"([\n",{"type":41,"tag":298,"props":773,"children":775},{"class":774,"line":367},[300,728],[776,781,786,791],{"type":41,"tag":298,"props":777,"children":778},{"style":330},[779],{"type":52,"value":780},"                'x-data'",{"type":41,"tag":298,"props":782,"children":783},{"style":305},[784],{"type":52,"value":785}," => ",{"type":41,"tag":298,"props":787,"children":788},{"style":330},[789],{"type":52,"value":790},"'block_carousel'",{"type":41,"tag":298,"props":792,"children":793},{"style":305},[794],{"type":52,"value":338},{"type":41,"tag":298,"props":796,"children":798},{"class":797,"line":380},[300,728],[799],{"type":41,"tag":298,"props":800,"children":801},{"style":305},[802],{"type":52,"value":803},"            ])\n",{"type":41,"tag":298,"props":805,"children":806},{"class":300,"line":389},[807],{"type":41,"tag":298,"props":808,"children":809},{"style":713},[810],{"type":52,"value":811},"    }}\n",{"type":41,"tag":298,"props":813,"children":814},{"class":300,"line":398},[815],{"type":41,"tag":298,"props":816,"children":817},{"style":305},[818],{"type":52,"value":819},">\n",{"type":41,"tag":298,"props":821,"children":822},{"class":300,"line":411},[823],{"type":41,"tag":298,"props":824,"children":825},{"style":305},[826],{"type":52,"value":827},"    CONTENT\n",{"type":41,"tag":298,"props":829,"children":830},{"class":300,"line":424},[831,836,841],{"type":41,"tag":298,"props":832,"children":833},{"style":305},[834],{"type":52,"value":835},"\u003C/",{"type":41,"tag":298,"props":837,"children":838},{"style":315},[839],{"type":52,"value":840},"div",{"type":41,"tag":298,"props":842,"children":843},{"style":305},[844],{"type":52,"value":819},{"type":41,"tag":48,"props":846,"children":847},{},[848],{"type":52,"value":849},"When I need to add an additional class, I expect the structure to remain consistent. However, Prettier unexpectedly merges everything into a single line, significantly reducing readability.",{"type":41,"tag":287,"props":851,"children":854},{"className":687,"code":852,"highlights":853,"language":690,"meta":7,"style":7},"\u003Cdiv\n    {{\n        $attributes->class(['block-carousel not-prose relative overflow-hidden'])->merge([\n            'x-data' => 'block_carousel',\n        ])\n    }}\n>\n    CONTENT\n\u003C/div>\n",[326],[855],{"type":41,"tag":278,"props":856,"children":857},{"__ignoreMap":7},[858,869,876,916,936,944,951,958,965],{"type":41,"tag":298,"props":859,"children":860},{"class":300,"line":301},[861,865],{"type":41,"tag":298,"props":862,"children":863},{"style":305},[864],{"type":52,"value":702},{"type":41,"tag":298,"props":866,"children":867},{"style":315},[868],{"type":52,"value":707},{"type":41,"tag":298,"props":870,"children":871},{"class":300,"line":311},[872],{"type":41,"tag":298,"props":873,"children":874},{"style":713},[875],{"type":52,"value":716},{"type":41,"tag":298,"props":877,"children":879},{"class":878,"line":326},[300,728],[880,885,890,894,898,903,908,912],{"type":41,"tag":298,"props":881,"children":882},{"style":315},[883],{"type":52,"value":884},"        $attributes",{"type":41,"tag":298,"props":886,"children":887},{"style":305},[888],{"type":52,"value":889},"->",{"type":41,"tag":298,"props":891,"children":892},{"style":737},[893],{"type":52,"value":674},{"type":41,"tag":298,"props":895,"children":896},{"style":305},[897],{"type":52,"value":744},{"type":41,"tag":298,"props":899,"children":900},{"style":330},[901],{"type":52,"value":902},"'block-carousel not-prose relative overflow-hidden'",{"type":41,"tag":298,"props":904,"children":905},{"style":305},[906],{"type":52,"value":907},"])->",{"type":41,"tag":298,"props":909,"children":910},{"style":737},[911],{"type":52,"value":682},{"type":41,"tag":298,"props":913,"children":914},{"style":305},[915],{"type":52,"value":771},{"type":41,"tag":298,"props":917,"children":918},{"class":300,"line":341},[919,924,928,932],{"type":41,"tag":298,"props":920,"children":921},{"style":330},[922],{"type":52,"value":923},"            'x-data'",{"type":41,"tag":298,"props":925,"children":926},{"style":305},[927],{"type":52,"value":785},{"type":41,"tag":298,"props":929,"children":930},{"style":330},[931],{"type":52,"value":790},{"type":41,"tag":298,"props":933,"children":934},{"style":305},[935],{"type":52,"value":338},{"type":41,"tag":298,"props":937,"children":938},{"class":300,"line":354},[939],{"type":41,"tag":298,"props":940,"children":941},{"style":305},[942],{"type":52,"value":943},"        ])\n",{"type":41,"tag":298,"props":945,"children":946},{"class":300,"line":367},[947],{"type":41,"tag":298,"props":948,"children":949},{"style":713},[950],{"type":52,"value":811},{"type":41,"tag":298,"props":952,"children":953},{"class":300,"line":380},[954],{"type":41,"tag":298,"props":955,"children":956},{"style":305},[957],{"type":52,"value":819},{"type":41,"tag":298,"props":959,"children":960},{"class":300,"line":389},[961],{"type":41,"tag":298,"props":962,"children":963},{"style":305},[964],{"type":52,"value":827},{"type":41,"tag":298,"props":966,"children":967},{"class":300,"line":398},[968,972,976],{"type":41,"tag":298,"props":969,"children":970},{"style":305},[971],{"type":52,"value":835},{"type":41,"tag":298,"props":973,"children":974},{"style":315},[975],{"type":52,"value":840},{"type":41,"tag":298,"props":977,"children":978},{"style":305},[979],{"type":52,"value":819},{"type":41,"tag":48,"props":981,"children":982},{},[983,985,990,992,998],{"type":52,"value":984},"One more time, I ended up with more inconsistencies and less readable code than before. ",{"type":41,"tag":95,"props":986,"children":987},{},[988],{"type":52,"value":989},"One component looks one way, while another looks completely different.",{"type":52,"value":991}," That's something ",{"type":41,"tag":55,"props":993,"children":995},{"href":994},"/environment/linting/#_3-it-helps-avoids-unreadable-code",[996],{"type":52,"value":997},"I definitely wanted to avoid",{"type":52,"value":999}," when using linters and code formatters.",{"type":41,"tag":144,"props":1001,"children":1002},{"height":146},[],{"type":41,"tag":149,"props":1004,"children":1006},{"id":1005},"prettier-is-not-for-everyone",[1007],{"type":52,"value":1008},"Prettier Is Not For Everyone 🫵",{"type":41,"tag":48,"props":1010,"children":1011},{},[1012,1014,1021,1023,1030,1032],{"type":52,"value":1013},"Antony Fu ",{"type":41,"tag":55,"props":1015,"children":1018},{"href":1016,"rel":1017},"https://antfu.me/posts/why-not-prettier#the-line-wrapping-noise",[59],[1019],{"type":52,"value":1020},"in his article",{"type":52,"value":1022}," brings similar examples. I agree with the view that ",{"type":41,"tag":55,"props":1024,"children":1027},{"href":1025,"rel":1026},"https://antfu.me/posts/why-not-prettier#it%E2%80%99s-opinionated",[59],[1028],{"type":52,"value":1029},"Prettier is not for everyone",{"type":52,"value":1031},". And it seemed to be not for me. I don't like not having control over things like this.  ",{"type":41,"tag":95,"props":1033,"children":1034},{},[1035],{"type":52,"value":1036},"I expect more flexibility, which is why I've decided to stop using it.",{"type":41,"tag":48,"props":1038,"children":1039},{},[1040],{"type":41,"tag":164,"props":1041,"children":1043},{"alt":166,"src":1042},"https://crm.tentyp.dev/wp-content/uploads/2025/03/5cf3d476-2ce6-4f49-883a-1357ae532083.png",[],{"type":41,"tag":79,"props":1045,"children":1046},{},[],{"type":41,"tag":48,"props":1048,"children":1049},{},[1050],{"type":52,"value":1051},"Hi Guys! This article is part of a larger initiative I've been recently putting my heart into 👇",{"type":41,"tag":48,"props":1053,"children":1054},{},[1055],{"type":52,"value":1056},"I've been working on something I’m really proud of - a new eBook all about code linting and formatting in web development. It’s filled with practical tips to help you set up the project environment so your code stays clean, consistent, and free of those annoying little errors.",{"type":41,"tag":48,"props":1058,"children":1059},{},[1060],{"type":41,"tag":95,"props":1061,"children":1062},{},[1063],{"type":52,"value":1064},"The plan is to sell it for $15, but if you're on my newsletter, you’ll get almost 70% discount. Just drop your email below, and you’ll get it for just $5 when it’s ready 🙌",{"type":41,"tag":1066,"props":1067,"children":1068},"newsletter",{},[],{"type":41,"tag":79,"props":1070,"children":1071},{},[],{"type":41,"tag":83,"props":1073,"children":1075},{"id":1074},"what-to-use-instead-of-prettier",[1076],{"type":52,"value":1077},"What to Use Instead of Prettier?",{"type":41,"tag":48,"props":1079,"children":1080},{},[1081],{"type":52,"value":1082},"Prettier, as the leading code formatter, is gaining significant market traction. It has become so popular that many well-known linters are discontinuing support for stylistic rules and suggest Prettier instead. Fortunately, despite this trend, we are not limited to Prettier alone.",{"type":41,"tag":144,"props":1084,"children":1085},{"height":146},[],{"type":41,"tag":149,"props":1087,"children":1089},{"id":1088},"javascript-eslint-stylistic",[1090],{"type":52,"value":1091},"JavaScript | ESLint Stylistic",{"type":41,"tag":48,"props":1093,"children":1094},{},[1095,1097,1102,1104,1111,1113,1120,1122,1129],{"type":52,"value":1096},"If you're looking for an easy way to replace ",{"type":41,"tag":55,"props":1098,"children":1100},{"href":57,"rel":1099},[59],[1101],{"type":52,"value":62},{"type":52,"value":1103}," in JavaScript, ",{"type":41,"tag":55,"props":1105,"children":1108},{"href":1106,"rel":1107},"https://pragmate.dev/js/eslint/",[59],[1109],{"type":52,"value":1110},"ESLint",{"type":52,"value":1112}," might seem like a good option. Unfortunately, in its latest version, ",{"type":41,"tag":55,"props":1114,"children":1117},{"href":1115,"rel":1116},"https://eslint.org/blog/2023/10/deprecating-formatting-rules/",[59],[1118],{"type":52,"value":1119},"ESLint discontinues support for stylistic rules",{"type":52,"value":1121}," as they don't want to handle them further and recommends ",{"type":41,"tag":55,"props":1123,"children":1126},{"href":1124,"rel":1125},"https://eslint.org/blog/2023/10/deprecating-formatting-rules/#what-you-should-do-instead",[59],[1127],{"type":52,"value":1128},"using Prettier instead",{"type":52,"value":140},{"type":41,"tag":48,"props":1131,"children":1132},{},[1133,1135,1142,1144,1151],{"type":52,"value":1134},"Help comes in the form of ",{"type":41,"tag":55,"props":1136,"children":1139},{"href":1137,"rel":1138},"https://eslint.style/",[59],[1140],{"type":52,"value":1141},"ESLint Stylistic",{"type":52,"value":1143},". It's a collection of stylistic rules for ESLint, migrated from the ESLint core to ",{"type":41,"tag":55,"props":1145,"children":1148},{"href":1146,"rel":1147},"https://eslint.style/guide/why",[59],[1149],{"type":52,"value":1150},"shift the maintenance effort to the community",{"type":52,"value":140},{"type":41,"tag":48,"props":1153,"children":1154},{},[1155],{"type":41,"tag":164,"props":1156,"children":1158},{"alt":166,"src":1157},"https://crm.tentyp.dev/wp-content/uploads/2025/03/2368608c-f1cf-4239-818d-f25a0bd06bb2.png",[],{"type":41,"tag":48,"props":1160,"children":1161},{},[1162,1169,1171,1177,1179,1185,1187,1193,1195,1201,1203,1209],{"type":41,"tag":55,"props":1163,"children":1166},{"href":1164,"rel":1165},"https://eslint.style/rules#install",[59],[1167],{"type":52,"value":1168},"Install the tool",{"type":52,"value":1170}," with  ",{"type":41,"tag":278,"props":1172,"children":1174},{"className":1173},[],[1175],{"type":52,"value":1176},"yarn add @stylistic/eslint-plugin --dev",{"type":52,"value":1178},", and set it in the ",{"type":41,"tag":278,"props":1180,"children":1182},{"className":1181},[],[1183],{"type":52,"value":1184},"eslint.config.js",{"type":52,"value":1186}," file. Remember that the stylistic rules now require the ",{"type":41,"tag":278,"props":1188,"children":1190},{"className":1189},[],[1191],{"type":52,"value":1192},"@stylistic",{"type":52,"value":1194}," prefix, so instead of configuring the ",{"type":41,"tag":278,"props":1196,"children":1198},{"className":1197},[],[1199],{"type":52,"value":1200},"indent",{"type":52,"value":1202}," rule, you need to use ",{"type":41,"tag":278,"props":1204,"children":1206},{"className":1205},[],[1207],{"type":52,"value":1208},"@stylistic/indent",{"type":52,"value":140},{"type":41,"tag":48,"props":1211,"children":1212},{},[1213],{"type":41,"tag":164,"props":1214,"children":1216},{"alt":166,"src":1215},"https://crm.tentyp.dev/wp-content/uploads/2025/03/c2fdc4c2-dbf9-4478-b19b-fca70be30a75.png",[],{"type":41,"tag":144,"props":1218,"children":1219},{"height":146},[],{"type":41,"tag":149,"props":1221,"children":1223},{"id":1222},"scss-stylelint-stylistic",[1224],{"type":52,"value":1225},"SCSS | Stylelint Stylistic",{"type":41,"tag":48,"props":1227,"children":1228},{},[1229,1231,1238,1240,1247],{"type":52,"value":1230},"With the release of version 16, Stylelint ",{"type":41,"tag":55,"props":1232,"children":1235},{"href":1233,"rel":1234},"https://stylelint.io/migration-guide/to-16/#removed-deprecated-stylistic-rules",[59],[1236],{"type":52,"value":1237},"discontinued support for stylistic rules",{"type":52,"value":1239}," and suggests Prettier instead. Fortunately, a ",{"type":41,"tag":55,"props":1241,"children":1244},{"href":1242,"rel":1243},"https://www.npmjs.com/package/@stylistic/stylelint-plugin",[59],[1245],{"type":52,"value":1246},"community plugin",{"type":52,"value":1248}," has brought these deprecated rules back.",{"type":41,"tag":48,"props":1250,"children":1251},{},[1252],{"type":41,"tag":164,"props":1253,"children":1255},{"alt":166,"src":1254},"https://crm.tentyp.dev/wp-content/uploads/2025/03/6bf5fa7d-77d8-4db9-bd9d-c22d4c28935a.png",[],{"type":41,"tag":48,"props":1257,"children":1258},{},[1259,1261,1267,1269,1275],{"type":52,"value":1260},"Install the plugin with the ",{"type":41,"tag":278,"props":1262,"children":1264},{"className":1263},[],[1265],{"type":52,"value":1266},"yarn add @stylistic/stylelint-config --dev",{"type":52,"value":1268}," and extend the stylelint configuration with ",{"type":41,"tag":278,"props":1270,"children":1272},{"className":1271},[],[1273],{"type":52,"value":1274},"@stylistic/stylelint-config",{"type":52,"value":1276},". Once done, stylistic issues such as breaking indentation rules in the CSS or SCSS files are displayed and verified in the reports again.",{"type":41,"tag":144,"props":1278,"children":1279},{"height":146},[],{"type":41,"tag":149,"props":1281,"children":1283},{"id":1282},"blade-prettier",[1284],{"type":52,"value":1285},"Blade | Prettier",{"type":41,"tag":48,"props":1287,"children":1288},{},[1289,1291,1298,1300,1306,1308,1315],{"type":52,"value":1290},"Blade, the templating system in PHP and ",{"type":41,"tag":55,"props":1292,"children":1295},{"href":1293,"rel":1294},"https://pragmate.dev/wordpress/blade/introduction/",[59],[1296],{"type":52,"value":1297},"an important part of the workflow",{"type":52,"value":1299},", but doesn't have a dedicated tool for verifying code style. While ",{"type":41,"tag":278,"props":1301,"children":1303},{"className":1302},[],[1304],{"type":52,"value":1305},"phpcs",{"type":52,"value":1307}," is ",{"type":41,"tag":55,"props":1309,"children":1312},{"href":1310,"rel":1311},"https://pragmate.dev/php/phpcs/",[59],[1313],{"type":52,"value":1314},"the closest tool to fulfill this role",{"type":52,"value":1316},", it doesn't fully support this format. In such situations, Prettier fits well.",{"type":41,"tag":48,"props":1318,"children":1319},{},[1320,1322,1329,1331,1337,1339,1345],{"type":52,"value":1321},"It does not have built-in support for the Blade format, but you can work around this by installing an ",{"type":41,"tag":55,"props":1323,"children":1326},{"href":1324,"rel":1325},"https://www.npmjs.com/package/prettier-plugin-blade",[59],[1327],{"type":52,"value":1328},"additional extension",{"type":52,"value":1330}," with ",{"type":41,"tag":278,"props":1332,"children":1334},{"className":1333},[],[1335],{"type":52,"value":1336},"yarn add prettier-plugin-blade --dev",{"type":52,"value":1338}," command and configuring it in the ",{"type":41,"tag":278,"props":1340,"children":1342},{"className":1341},[],[1343],{"type":52,"value":1344},".prettierrc",{"type":52,"value":1346}," file to handle style fixes there.",{"type":41,"tag":287,"props":1348,"children":1350},{"className":289,"code":1349,"filename":1344,"language":292,"meta":7,"style":7},"{\n  \"singleQuote\": true,\n  \"singleAttributePerLine\": true,\n  \"plugins\": [\"prettier-plugin-blade\"],\n  \"overrides\": [\n    {\n      \"files\": [\"*.blade.php\"],\n      \"options\": {\n        \"parser\": \"blade\"\n      }\n    }\n  ]\n}\n",[1351],{"type":41,"tag":278,"props":1352,"children":1353},{"__ignoreMap":7},[1354,1361,1384,1404,1425,1437,1445,1466,1479,1496,1504,1512,1520],{"type":41,"tag":298,"props":1355,"children":1356},{"class":300,"line":301},[1357],{"type":41,"tag":298,"props":1358,"children":1359},{"style":305},[1360],{"type":52,"value":308},{"type":41,"tag":298,"props":1362,"children":1363},{"class":300,"line":311},[1364,1369,1374,1380],{"type":41,"tag":298,"props":1365,"children":1366},{"style":315},[1367],{"type":52,"value":1368},"  \"singleQuote\"",{"type":41,"tag":298,"props":1370,"children":1371},{"style":305},[1372],{"type":52,"value":1373},": ",{"type":41,"tag":298,"props":1375,"children":1377},{"style":1376},"--shiki-default:#D19A66",[1378],{"type":52,"value":1379},"true",{"type":41,"tag":298,"props":1381,"children":1382},{"style":305},[1383],{"type":52,"value":338},{"type":41,"tag":298,"props":1385,"children":1386},{"class":300,"line":326},[1387,1392,1396,1400],{"type":41,"tag":298,"props":1388,"children":1389},{"style":315},[1390],{"type":52,"value":1391},"  \"singleAttributePerLine\"",{"type":41,"tag":298,"props":1393,"children":1394},{"style":305},[1395],{"type":52,"value":1373},{"type":41,"tag":298,"props":1397,"children":1398},{"style":1376},[1399],{"type":52,"value":1379},{"type":41,"tag":298,"props":1401,"children":1402},{"style":305},[1403],{"type":52,"value":338},{"type":41,"tag":298,"props":1405,"children":1406},{"class":300,"line":341},[1407,1412,1416,1421],{"type":41,"tag":298,"props":1408,"children":1409},{"style":315},[1410],{"type":52,"value":1411},"  \"plugins\"",{"type":41,"tag":298,"props":1413,"children":1414},{"style":305},[1415],{"type":52,"value":597},{"type":41,"tag":298,"props":1417,"children":1418},{"style":330},[1419],{"type":52,"value":1420},"\"prettier-plugin-blade\"",{"type":41,"tag":298,"props":1422,"children":1423},{"style":305},[1424],{"type":52,"value":617},{"type":41,"tag":298,"props":1426,"children":1427},{"class":300,"line":354},[1428,1433],{"type":41,"tag":298,"props":1429,"children":1430},{"style":315},[1431],{"type":52,"value":1432},"  \"overrides\"",{"type":41,"tag":298,"props":1434,"children":1435},{"style":305},[1436],{"type":52,"value":323},{"type":41,"tag":298,"props":1438,"children":1439},{"class":300,"line":367},[1440],{"type":41,"tag":298,"props":1441,"children":1442},{"style":305},[1443],{"type":52,"value":1444},"    {\n",{"type":41,"tag":298,"props":1446,"children":1447},{"class":300,"line":380},[1448,1453,1457,1462],{"type":41,"tag":298,"props":1449,"children":1450},{"style":315},[1451],{"type":52,"value":1452},"      \"files\"",{"type":41,"tag":298,"props":1454,"children":1455},{"style":305},[1456],{"type":52,"value":597},{"type":41,"tag":298,"props":1458,"children":1459},{"style":330},[1460],{"type":52,"value":1461},"\"*.blade.php\"",{"type":41,"tag":298,"props":1463,"children":1464},{"style":305},[1465],{"type":52,"value":617},{"type":41,"tag":298,"props":1467,"children":1468},{"class":300,"line":389},[1469,1474],{"type":41,"tag":298,"props":1470,"children":1471},{"style":315},[1472],{"type":52,"value":1473},"      \"options\"",{"type":41,"tag":298,"props":1475,"children":1476},{"style":305},[1477],{"type":52,"value":1478},": {\n",{"type":41,"tag":298,"props":1480,"children":1481},{"class":300,"line":398},[1482,1487,1491],{"type":41,"tag":298,"props":1483,"children":1484},{"style":315},[1485],{"type":52,"value":1486},"        \"parser\"",{"type":41,"tag":298,"props":1488,"children":1489},{"style":305},[1490],{"type":52,"value":1373},{"type":41,"tag":298,"props":1492,"children":1493},{"style":330},[1494],{"type":52,"value":1495},"\"blade\"\n",{"type":41,"tag":298,"props":1497,"children":1498},{"class":300,"line":411},[1499],{"type":41,"tag":298,"props":1500,"children":1501},{"style":305},[1502],{"type":52,"value":1503},"      }\n",{"type":41,"tag":298,"props":1505,"children":1506},{"class":300,"line":424},[1507],{"type":41,"tag":298,"props":1508,"children":1509},{"style":305},[1510],{"type":52,"value":1511},"    }\n",{"type":41,"tag":298,"props":1513,"children":1514},{"class":300,"line":433},[1515],{"type":41,"tag":298,"props":1516,"children":1517},{"style":305},[1518],{"type":52,"value":1519},"  ]\n",{"type":41,"tag":298,"props":1521,"children":1522},{"class":300,"line":441},[1523],{"type":41,"tag":298,"props":1524,"children":1525},{"style":305},[1526],{"type":52,"value":490},{"type":41,"tag":48,"props":1528,"children":1529},{},[1530,1532,1537],{"type":52,"value":1531},"So, is it worth completely giving up on Prettier? Despite the catchy title, ",{"type":41,"tag":95,"props":1533,"children":1534},{},[1535],{"type":52,"value":1536},"I would say no, because any validation is better than none",{"type":52,"value":1538},". Therefore, when using formats that don't offer linters, such as Blade, JSON, or even plain text files, Prettier is still a solid choice.",{"type":41,"tag":79,"props":1540,"children":1541},{},[],{"type":41,"tag":83,"props":1543,"children":1545},{"id":1544},"when-do-we-use-prettier-at-coditive",[1546],{"type":52,"value":1547},"When Do We Use Prettier at Coditive?",{"type":41,"tag":48,"props":1549,"children":1550},{},[1551,1553,1558,1560,1565,1566,1571,1573,1578],{"type":52,"value":1552},"In our daily work, we primarily ",{"type":41,"tag":95,"props":1554,"children":1555},{},[1556],{"type":52,"value":1557},"use Prettier as a last resort when we need to quickly organize code and there are no other ways to rapidly resolve the issue",{"type":52,"value":1559},". However, in most cases, we opt for tools that better meet our needs, such as ",{"type":41,"tag":55,"props":1561,"children":1563},{"href":1310,"rel":1562},[59],[1564],{"type":52,"value":1305},{"type":52,"value":607},{"type":41,"tag":55,"props":1567,"children":1569},{"href":1106,"rel":1568},[59],[1570],{"type":52,"value":1110},{"type":52,"value":1572},", or ",{"type":41,"tag":55,"props":1574,"children":1576},{"href":176,"rel":1575},[59],[1577],{"type":52,"value":180},{"type":52,"value":140},{"type":41,"tag":111,"props":1580,"children":1582},{"url":1581},"/php/phpcs/",[],{"type":41,"tag":111,"props":1584,"children":1586},{"url":1585},"/js/eslint/",[],{"type":41,"tag":111,"props":1588,"children":1590},{"url":1589},"/css/stylelint/",[],{"type":41,"tag":79,"props":1592,"children":1593},{},[],{"type":41,"tag":48,"props":1595,"children":1596},{},[1597,1599,1606,1608,1615],{"type":52,"value":1598},"Thank you so much for joining me in today ❤️ Your support means a lot to me, and it keeps me motivated to create more content. If you enjoyed this video, please consider ",{"type":41,"tag":55,"props":1600,"children":1603},{"href":1601,"rel":1602},"https://www.youtube.com/@pragmatedev?sub_confirmation=1",[59],[1604],{"type":52,"value":1605},"subscribing to the channel",{"type":52,"value":1607}," and giving it a thumbs-up - it really helps spread the word. And if you need developers who truly care about quality and delivering great results, visit my company’s site: ",{"type":41,"tag":55,"props":1609,"children":1612},{"href":1610,"rel":1611},"https://coditive.com/?utm_source=www&utm_medium=content&utm_campaign=pragmate_dev",[59],[1613],{"type":52,"value":1614},"coditive.com",{"type":52,"value":1616}," or contact me with the form below. Thanks again and see you next time!",{"type":41,"tag":1618,"props":1619,"children":1620},"style",{},[1621],{"type":52,"value":1622},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":311,"depth":311,"links":1624},[1625,1626,1632,1637],{"id":85,"depth":311,"text":88},{"id":119,"depth":311,"text":122,"children":1627},[1628,1629,1630,1631],{"id":151,"depth":326,"text":154},{"id":221,"depth":326,"text":224},{"id":257,"depth":326,"text":260},{"id":1005,"depth":326,"text":1008},{"id":1074,"depth":311,"text":1077,"children":1633},[1634,1635,1636],{"id":1088,"depth":326,"text":1091},{"id":1222,"depth":326,"text":1225},{"id":1282,"depth":326,"text":1285},{"id":1544,"depth":311,"text":1547},"markdown","content:environment:prettier-alternatives.md","content","environment/prettier-alternatives.md","environment/prettier-alternatives","md",{"_path":1645,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":1646,"description":1647,"head":1648,"tags":1658,"links":1660,"chapters":1662,"thumb":278,"created":1655,"body":1663,"_type":1638,"_id":3936,"_source":1640,"_file":3937,"_stem":3938,"_extension":1643},"/environment/prettier","Prettier: The World's Most Stubborn Code Formatter","In this guide, I'll walk you through Prettier - a tool for ensuring a unify coding style across your frontend assets in WordPress projects. I'll explore its perks and drawbacks, guiding you to decide if it's the right fit for you and share my own experiences with it.",{"title":1649,"link":1650,"meta":1652},"Prettier: The Most Stubborn Formatter in The World | pragmate.dev",[1651],{"rel":14,"href":57},[1653,1654,1656],{"name":18,"content":19},{"name":24,"content":1655},"2024-04-10",{"name":27,"content":1657},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/828a3893-6532-4e7a-93f0-d1e1649ee494.jpeg",{"time":1659,"level":31},"10 min",{"github":1661},"https://github.com/pragmatedev/vilare/pull/19/files",[34,33],{"type":38,"children":1664,"toc":3927},[1665,1669,1672,1675,1679,1724,1867,1887,1890,1896,1919,1956,1959,1965,1994,2067,2102,2172,2215,2336,2372,3173,3176,3182,3203,3240,3270,3307,3343,3346,3350,3354,3361,3364,3367,3373,3387,3394,3422,3425,3431,3468,3730,3759,3762,3768,3780,3792,3812,3819,3849,3883,3886,3898,3923],{"type":41,"tag":42,"props":1666,"children":1668},{"thumbnail":1657,"url":1667},"https://www.youtube-nocookie.com/embed/8ARcAziF50E",[],{"type":41,"tag":75,"props":1670,"children":1671},{},[],{"type":41,"tag":79,"props":1673,"children":1674},{},[],{"type":41,"tag":83,"props":1676,"children":1677},{"id":85},[1678],{"type":52,"value":88},{"type":41,"tag":48,"props":1680,"children":1681},{},[1682,1684,1689,1691,1698,1700,1707,1709,1714,1716,1722],{"type":52,"value":1683},"Prettier is an ",{"type":41,"tag":95,"props":1685,"children":1686},{},[1687],{"type":52,"value":1688},"opinionated code formatter",{"type":52,"value":1690}," that enforces a specific code style across the project. It removes all original styling of ",{"type":41,"tag":55,"props":1692,"children":1695},{"href":1693,"rel":1694},"https://prettier.io/docs/en/",[59],[1696],{"type":52,"value":1697},"supported languages",{"type":52,"value":1699}," and ",{"type":41,"tag":55,"props":1701,"children":1704},{"href":1702,"rel":1703},"https://jlongster.com/A-Prettier-Formatter",[59],[1705],{"type":52,"value":1706},"ensures that the code conforms to a consistent style",{"type":52,"value":1708},". ",{"type":41,"tag":95,"props":1710,"children":1711},{},[1712],{"type":52,"value":1713},"It simply takes your code and reprints it from scratch by taking its rules into account.",{"type":52,"value":1715}," Like for example ",{"type":41,"tag":278,"props":1717,"children":1719},{"className":1718},[],[1720],{"type":52,"value":1721},"max_line_length",{"type":52,"value":1723}," in here:",{"type":41,"tag":1725,"props":1726,"children":1728},"ide",{":tabs":1727},"[\"Before\", \"After\"]",[1729,1790],{"type":41,"tag":287,"props":1730,"children":1735},{"className":1731,"code":1732,"filename":1733,"language":1734,"meta":7,"style":7},"language-js shiki shiki-themes one-dark-pro","foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());\n","Before","js",[1736],{"type":41,"tag":278,"props":1737,"children":1738},{"__ignoreMap":7},[1739],{"type":41,"tag":298,"props":1740,"children":1741},{"class":300,"line":301},[1742,1747,1752,1757,1762,1767,1771,1776,1780,1785],{"type":41,"tag":298,"props":1743,"children":1744},{"style":737},[1745],{"type":52,"value":1746},"foo",{"type":41,"tag":298,"props":1748,"children":1749},{"style":305},[1750],{"type":52,"value":1751},"(",{"type":41,"tag":298,"props":1753,"children":1754},{"style":737},[1755],{"type":52,"value":1756},"reallyLongArg",{"type":41,"tag":298,"props":1758,"children":1759},{"style":305},[1760],{"type":52,"value":1761},"(), ",{"type":41,"tag":298,"props":1763,"children":1764},{"style":737},[1765],{"type":52,"value":1766},"omgSoManyParameters",{"type":41,"tag":298,"props":1768,"children":1769},{"style":305},[1770],{"type":52,"value":1761},{"type":41,"tag":298,"props":1772,"children":1773},{"style":737},[1774],{"type":52,"value":1775},"IShouldRefactorThis",{"type":41,"tag":298,"props":1777,"children":1778},{"style":305},[1779],{"type":52,"value":1761},{"type":41,"tag":298,"props":1781,"children":1782},{"style":737},[1783],{"type":52,"value":1784},"isThereSeriouslyAnotherOne",{"type":41,"tag":298,"props":1786,"children":1787},{"style":305},[1788],{"type":52,"value":1789},"());\n",{"type":41,"tag":287,"props":1791,"children":1794},{"className":1731,"code":1792,"filename":1793,"language":1734,"meta":7,"style":7},"foo(\n  reallyLongArg(),\n  omgSoManyParameters(),\n  IShouldRefactorThis(),\n  isThereSeriouslyAnotherOne(),\n);\n","After",[1795],{"type":41,"tag":278,"props":1796,"children":1797},{"__ignoreMap":7},[1798,1810,1823,1835,1847,1859],{"type":41,"tag":298,"props":1799,"children":1800},{"class":300,"line":301},[1801,1805],{"type":41,"tag":298,"props":1802,"children":1803},{"style":737},[1804],{"type":52,"value":1746},{"type":41,"tag":298,"props":1806,"children":1807},{"style":305},[1808],{"type":52,"value":1809},"(\n",{"type":41,"tag":298,"props":1811,"children":1812},{"class":300,"line":311},[1813,1818],{"type":41,"tag":298,"props":1814,"children":1815},{"style":737},[1816],{"type":52,"value":1817},"  reallyLongArg",{"type":41,"tag":298,"props":1819,"children":1820},{"style":305},[1821],{"type":52,"value":1822},"(),\n",{"type":41,"tag":298,"props":1824,"children":1825},{"class":300,"line":326},[1826,1831],{"type":41,"tag":298,"props":1827,"children":1828},{"style":737},[1829],{"type":52,"value":1830},"  omgSoManyParameters",{"type":41,"tag":298,"props":1832,"children":1833},{"style":305},[1834],{"type":52,"value":1822},{"type":41,"tag":298,"props":1836,"children":1837},{"class":300,"line":341},[1838,1843],{"type":41,"tag":298,"props":1839,"children":1840},{"style":737},[1841],{"type":52,"value":1842},"  IShouldRefactorThis",{"type":41,"tag":298,"props":1844,"children":1845},{"style":305},[1846],{"type":52,"value":1822},{"type":41,"tag":298,"props":1848,"children":1849},{"class":300,"line":354},[1850,1855],{"type":41,"tag":298,"props":1851,"children":1852},{"style":737},[1853],{"type":52,"value":1854},"  isThereSeriouslyAnotherOne",{"type":41,"tag":298,"props":1856,"children":1857},{"style":305},[1858],{"type":52,"value":1822},{"type":41,"tag":298,"props":1860,"children":1861},{"class":300,"line":367},[1862],{"type":41,"tag":298,"props":1863,"children":1864},{"style":305},[1865],{"type":52,"value":1866},");\n",{"type":41,"tag":48,"props":1868,"children":1869},{},[1870,1872,1877,1879,1886],{"type":52,"value":1871},"It's crucial to note that ",{"type":41,"tag":95,"props":1873,"children":1874},{},[1875],{"type":52,"value":1876},"it's a formatter, not a linter",{"type":52,"value":1878},". If you're unfamiliar with the distinction, I recommend watching ",{"type":41,"tag":55,"props":1880,"children":1883},{"href":1881,"rel":1882},"https://pragmate.dev/environment/linting/",[59],[1884],{"type":52,"value":1885},"my first video on this topic here",{"type":52,"value":140},{"type":41,"tag":79,"props":1888,"children":1889},{},[],{"type":41,"tag":83,"props":1891,"children":1893},{"id":1892},"how-to-install-prettier",[1894],{"type":52,"value":1895},"How to Install Prettier?",{"type":41,"tag":48,"props":1897,"children":1898},{},[1899,1901,1908,1910,1917],{"type":52,"value":1900},"To ",{"type":41,"tag":55,"props":1902,"children":1905},{"href":1903,"rel":1904},"https://github.com/pragmatedev/vilare/pull/19/commits/9afc2684b55b807bf1bbc4a85723b04f333d597e",[59],[1906],{"type":52,"value":1907},"install Prettier",{"type":52,"value":1909}," within your codebase, just simply navigate to the project root in the terminal and ",{"type":41,"tag":55,"props":1911,"children":1914},{"href":1912,"rel":1913},"https://prettier.io/docs/en/install",[59],[1915],{"type":52,"value":1916},"install it",{"type":52,"value":1918}," using the following command.",{"type":41,"tag":287,"props":1920,"children":1924},{"className":1921,"code":1922,"language":1923,"meta":7,"style":7},"language-bash shiki shiki-themes one-dark-pro","yarn add --dev --exact prettier\n","bash",[1925],{"type":41,"tag":278,"props":1926,"children":1927},{"__ignoreMap":7},[1928],{"type":41,"tag":298,"props":1929,"children":1930},{"class":300,"line":301},[1931,1936,1941,1946,1951],{"type":41,"tag":298,"props":1932,"children":1933},{"style":737},[1934],{"type":52,"value":1935},"yarn",{"type":41,"tag":298,"props":1937,"children":1938},{"style":330},[1939],{"type":52,"value":1940}," add",{"type":41,"tag":298,"props":1942,"children":1943},{"style":1376},[1944],{"type":52,"value":1945}," --dev",{"type":41,"tag":298,"props":1947,"children":1948},{"style":1376},[1949],{"type":52,"value":1950}," --exact",{"type":41,"tag":298,"props":1952,"children":1953},{"style":330},[1954],{"type":52,"value":1955}," prettier\n",{"type":41,"tag":79,"props":1957,"children":1958},{},[],{"type":41,"tag":83,"props":1960,"children":1962},{"id":1961},"how-to-use-prettier",[1963],{"type":52,"value":1964},"How to Use Prettier?",{"type":41,"tag":48,"props":1966,"children":1967},{},[1968,1970,1976,1978,1985,1987,1992],{"type":52,"value":1969},"To search for rule violations, you can use the  ",{"type":41,"tag":278,"props":1971,"children":1973},{"className":1972},[],[1974],{"type":52,"value":1975},"prettier",{"type":52,"value":1977}," ",{"type":41,"tag":55,"props":1979,"children":1982},{"href":1980,"rel":1981},"https://prettier.io/docs/en/cli#--check",[59],[1983],{"type":52,"value":1984},"command",{"type":52,"value":1986}," and specify a directory to check. ",{"type":41,"tag":95,"props":1988,"children":1989},{},[1990],{"type":52,"value":1991},"It will scan files and list any issues.",{"type":52,"value":1993}," Unfortunately, it doesn't show exact issues with references to problematic lines as it happens in other similar tools.",{"type":41,"tag":287,"props":1995,"children":1999},{"className":1996,"code":1997,"language":1998,"meta":7,"style":7},"language-diff shiki shiki-themes one-dark-pro","yarn prettier . --check\n\nChecking formatting...\n[warn] .stylelintrc\n[warn] changelog.md\n[warn] composer.json\n[warn] style.css\n[warn] Code style issues found in 4 files. Run Prettier to fix.\n","diff",[2000],{"type":41,"tag":278,"props":2001,"children":2002},{"__ignoreMap":7},[2003,2011,2019,2027,2035,2043,2051,2059],{"type":41,"tag":298,"props":2004,"children":2005},{"class":300,"line":301},[2006],{"type":41,"tag":298,"props":2007,"children":2008},{"style":305},[2009],{"type":52,"value":2010},"yarn prettier . --check\n",{"type":41,"tag":298,"props":2012,"children":2013},{"class":300,"line":311},[2014],{"type":41,"tag":298,"props":2015,"children":2016},{"emptyLinePlaceholder":36},[2017],{"type":52,"value":2018},"\n",{"type":41,"tag":298,"props":2020,"children":2021},{"class":300,"line":326},[2022],{"type":41,"tag":298,"props":2023,"children":2024},{"style":305},[2025],{"type":52,"value":2026},"Checking formatting...\n",{"type":41,"tag":298,"props":2028,"children":2029},{"class":300,"line":341},[2030],{"type":41,"tag":298,"props":2031,"children":2032},{"style":305},[2033],{"type":52,"value":2034},"[warn] .stylelintrc\n",{"type":41,"tag":298,"props":2036,"children":2037},{"class":300,"line":354},[2038],{"type":41,"tag":298,"props":2039,"children":2040},{"style":305},[2041],{"type":52,"value":2042},"[warn] changelog.md\n",{"type":41,"tag":298,"props":2044,"children":2045},{"class":300,"line":367},[2046],{"type":41,"tag":298,"props":2047,"children":2048},{"style":305},[2049],{"type":52,"value":2050},"[warn] composer.json\n",{"type":41,"tag":298,"props":2052,"children":2053},{"class":300,"line":380},[2054],{"type":41,"tag":298,"props":2055,"children":2056},{"style":305},[2057],{"type":52,"value":2058},"[warn] style.css\n",{"type":41,"tag":298,"props":2060,"children":2061},{"class":300,"line":389},[2062],{"type":41,"tag":298,"props":2063,"children":2064},{"style":305},[2065],{"type":52,"value":2066},"[warn] Code style issues found in 4 files. Run Prettier to fix.\n",{"type":41,"tag":48,"props":2068,"children":2069},{},[2070,2091,2093,2100],{"type":41,"tag":95,"props":2071,"children":2072},{},[2073,2075,2081,2083,2090],{"type":52,"value":2074},"To fix the issues automatically, you can run the same command, but with the ",{"type":41,"tag":278,"props":2076,"children":2078},{"className":2077},[],[2079],{"type":52,"value":2080},"--write",{"type":52,"value":2082}," ",{"type":41,"tag":55,"props":2084,"children":2087},{"href":2085,"rel":2086},"https://prettier.io/docs/en/cli#--write",[59],[2088],{"type":52,"value":2089},"argument",{"type":52,"value":140},{"type":52,"value":2092}," As a result, you'll get information about which file has been changed so you can ",{"type":41,"tag":2094,"props":2095,"children":2097},"button",{"type":2094,"dataModal":2096},"nQwDG8",[2098],{"type":52,"value":2099},"verify some files",{"type":52,"value":2101}," to check that it works fine.",{"type":41,"tag":287,"props":2103,"children":2105},{"className":1996,"code":2104,"language":1998,"meta":7,"style":7},"yarn prettier . --write\n\n.prettierrc 23ms (unchanged)\n.stylelintrc 5ms\nchangelog.md 19ms\ncomposer.json 2ms\npackage.json 1ms (unchanged)\nstyle.css 8ms\n",[2106],{"type":41,"tag":278,"props":2107,"children":2108},{"__ignoreMap":7},[2109,2117,2124,2132,2140,2148,2156,2164],{"type":41,"tag":298,"props":2110,"children":2111},{"class":300,"line":301},[2112],{"type":41,"tag":298,"props":2113,"children":2114},{"style":305},[2115],{"type":52,"value":2116},"yarn prettier . --write\n",{"type":41,"tag":298,"props":2118,"children":2119},{"class":300,"line":311},[2120],{"type":41,"tag":298,"props":2121,"children":2122},{"emptyLinePlaceholder":36},[2123],{"type":52,"value":2018},{"type":41,"tag":298,"props":2125,"children":2126},{"class":300,"line":326},[2127],{"type":41,"tag":298,"props":2128,"children":2129},{"style":305},[2130],{"type":52,"value":2131},".prettierrc 23ms (unchanged)\n",{"type":41,"tag":298,"props":2133,"children":2134},{"class":300,"line":341},[2135],{"type":41,"tag":298,"props":2136,"children":2137},{"style":305},[2138],{"type":52,"value":2139},".stylelintrc 5ms\n",{"type":41,"tag":298,"props":2141,"children":2142},{"class":300,"line":354},[2143],{"type":41,"tag":298,"props":2144,"children":2145},{"style":305},[2146],{"type":52,"value":2147},"changelog.md 19ms\n",{"type":41,"tag":298,"props":2149,"children":2150},{"class":300,"line":367},[2151],{"type":41,"tag":298,"props":2152,"children":2153},{"style":305},[2154],{"type":52,"value":2155},"composer.json 2ms\n",{"type":41,"tag":298,"props":2157,"children":2158},{"class":300,"line":380},[2159],{"type":41,"tag":298,"props":2160,"children":2161},{"style":305},[2162],{"type":52,"value":2163},"package.json 1ms (unchanged)\n",{"type":41,"tag":298,"props":2165,"children":2166},{"class":300,"line":389},[2167],{"type":41,"tag":298,"props":2168,"children":2169},{"style":305},[2170],{"type":52,"value":2171},"style.css 8ms\n",{"type":41,"tag":48,"props":2173,"children":2174},{},[2175,2177,2184,2186,2192,2194],{"type":52,"value":2176},"We can also ",{"type":41,"tag":55,"props":2178,"children":2181},{"href":2179,"rel":2180},"https://github.com/pragmatedev/vilare/pull/19/commits/5e419e109f2c0dd3989b2b281ea4ed57b2fd5d40",[59],[2182],{"type":52,"value":2183},"add new tasks",{"type":52,"value":2185}," in ",{"type":41,"tag":278,"props":2187,"children":2189},{"className":2188},[],[2190],{"type":52,"value":2191},"package.json",{"type":52,"value":2193}," to make this process easier. ",{"type":41,"tag":95,"props":2195,"children":2196},{},[2197,2199,2205,2207,2213],{"type":52,"value":2198},"Now, you can run ",{"type":41,"tag":278,"props":2200,"children":2202},{"className":2201},[],[2203],{"type":52,"value":2204},"yarn lint",{"type":52,"value":2206}," and ",{"type":41,"tag":278,"props":2208,"children":2210},{"className":2209},[],[2211],{"type":52,"value":2212},"yarn format",{"type":52,"value":2214}," commands to run Prettier tasks.",{"type":41,"tag":287,"props":2216,"children":2218},{"className":289,"code":2217,"filename":2191,"language":292,"meta":7,"style":7},"{\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"prettier . --check\",\n    \"format\": \"prettier . --write\"\n  },\n}\n",[2219],{"type":41,"tag":278,"props":2220,"children":2221},{"__ignoreMap":7},[2222,2229,2241,2262,2283,2304,2321,2329],{"type":41,"tag":298,"props":2223,"children":2224},{"class":300,"line":301},[2225],{"type":41,"tag":298,"props":2226,"children":2227},{"style":305},[2228],{"type":52,"value":308},{"type":41,"tag":298,"props":2230,"children":2231},{"class":300,"line":311},[2232,2237],{"type":41,"tag":298,"props":2233,"children":2234},{"style":315},[2235],{"type":52,"value":2236},"  \"scripts\"",{"type":41,"tag":298,"props":2238,"children":2239},{"style":305},[2240],{"type":52,"value":1478},{"type":41,"tag":298,"props":2242,"children":2243},{"class":300,"line":326},[2244,2249,2253,2258],{"type":41,"tag":298,"props":2245,"children":2246},{"style":315},[2247],{"type":52,"value":2248},"    \"build\"",{"type":41,"tag":298,"props":2250,"children":2251},{"style":305},[2252],{"type":52,"value":1373},{"type":41,"tag":298,"props":2254,"children":2255},{"style":330},[2256],{"type":52,"value":2257},"\"vite build\"",{"type":41,"tag":298,"props":2259,"children":2260},{"style":305},[2261],{"type":52,"value":338},{"type":41,"tag":298,"props":2263,"children":2264},{"class":300,"line":341},[2265,2270,2274,2279],{"type":41,"tag":298,"props":2266,"children":2267},{"style":315},[2268],{"type":52,"value":2269},"    \"dev\"",{"type":41,"tag":298,"props":2271,"children":2272},{"style":305},[2273],{"type":52,"value":1373},{"type":41,"tag":298,"props":2275,"children":2276},{"style":330},[2277],{"type":52,"value":2278},"\"vite\"",{"type":41,"tag":298,"props":2280,"children":2281},{"style":305},[2282],{"type":52,"value":338},{"type":41,"tag":298,"props":2284,"children":2285},{"class":300,"line":354},[2286,2291,2295,2300],{"type":41,"tag":298,"props":2287,"children":2288},{"style":315},[2289],{"type":52,"value":2290},"    \"lint\"",{"type":41,"tag":298,"props":2292,"children":2293},{"style":305},[2294],{"type":52,"value":1373},{"type":41,"tag":298,"props":2296,"children":2297},{"style":330},[2298],{"type":52,"value":2299},"\"prettier . --check\"",{"type":41,"tag":298,"props":2301,"children":2302},{"style":305},[2303],{"type":52,"value":338},{"type":41,"tag":298,"props":2305,"children":2306},{"class":300,"line":367},[2307,2312,2316],{"type":41,"tag":298,"props":2308,"children":2309},{"style":315},[2310],{"type":52,"value":2311},"    \"format\"",{"type":41,"tag":298,"props":2313,"children":2314},{"style":305},[2315],{"type":52,"value":1373},{"type":41,"tag":298,"props":2317,"children":2318},{"style":330},[2319],{"type":52,"value":2320},"\"prettier . --write\"\n",{"type":41,"tag":298,"props":2322,"children":2323},{"class":300,"line":380},[2324],{"type":41,"tag":298,"props":2325,"children":2326},{"style":305},[2327],{"type":52,"value":2328},"  },\n",{"type":41,"tag":298,"props":2330,"children":2331},{"class":300,"line":389},[2332],{"type":41,"tag":298,"props":2333,"children":2334},{"style":305},[2335],{"type":52,"value":490},{"type":41,"tag":48,"props":2337,"children":2338},{},[2339,2341,2348,2350,2357,2359,2364,2366,2371],{"type":52,"value":2340},"You can use Prettier manually as described here, but it has been created to forget about manual fixes! That's why you can integrate ",{"type":41,"tag":55,"props":2342,"children":2345},{"href":2343,"rel":2344},"https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks",[59],[2346],{"type":52,"value":2347},"git hooks",{"type":52,"value":2349}," with tools like ",{"type":41,"tag":55,"props":2351,"children":2354},{"href":2352,"rel":2353},"https://github.com/typicode/husky",[59],[2355],{"type":52,"value":2356},"Husky",{"type":52,"value":2358},", but ",{"type":41,"tag":95,"props":2360,"children":2361},{},[2362],{"type":52,"value":2363},"I'll handle this in another video together with other formatters and linters",{"type":52,"value":2365}," like ",{"type":41,"tag":55,"props":2367,"children":2369},{"href":1310,"rel":2368},[59],[2370],{"type":52,"value":1305},{"type":52,"value":140},{"type":41,"tag":2373,"props":2374,"children":2375},"prose-modal",{"id":2096},[2376,2389],{"type":41,"tag":48,"props":2377,"children":2378},{},[2379,2381,2387],{"type":52,"value":2380},"Let's check the ",{"type":41,"tag":278,"props":2382,"children":2384},{"className":2383},[],[2385],{"type":52,"value":2386},"composer.json",{"type":52,"value":2388}," file that doesn't follow the indentation rules defined in my project. After running Prettier, we get the code with fixed indentation, meaning that it is compliant with Prettier rules now.",{"type":41,"tag":1725,"props":2390,"children":2391},{":tabs":1727},[2392,2798],{"type":41,"tag":287,"props":2393,"children":2395},{"className":289,"code":2394,"filename":1733,"language":292,"meta":7,"style":7},"{\n    \"name\": \"pragmatedev/footmate\",\n    \"description\": \"FootMATE Theme\",\n    \"license\": \"GPLv3\",\n    \"autoload\": {\n        \"psr-4\": {\n            \"FM\\\\\": \"app/\"\n        }\n    },\n    \"authors\": [\n        {\n            \"name\": \"pragmate.dev\",\n            \"email\": \"hello@pragmate.dev\"\n        }\n    ],\n    \"require\": {\n        \"php\": \"^8.1\",\n        \"illuminate/view\": \"^10.15\",\n        \"illuminate/support\": \"^10.15\"\n    },\n    \"scripts\": {\n      \"lint\": \"phpcs app\",\n      \"format\": \"phpcbf app\"\n    },\n    \"require-dev\": {\n        \"squizlabs/php_codesniffer\": \"*\"\n    }\n}\n\n",[2396],{"type":41,"tag":278,"props":2397,"children":2398},{"__ignoreMap":7},[2399,2406,2427,2448,2469,2481,2493,2520,2528,2536,2548,2556,2577,2594,2601,2609,2621,2642,2664,2682,2690,2703,2725,2743,2751,2764,2782,2790],{"type":41,"tag":298,"props":2400,"children":2401},{"class":300,"line":301},[2402],{"type":41,"tag":298,"props":2403,"children":2404},{"style":305},[2405],{"type":52,"value":308},{"type":41,"tag":298,"props":2407,"children":2408},{"class":300,"line":311},[2409,2414,2418,2423],{"type":41,"tag":298,"props":2410,"children":2411},{"style":315},[2412],{"type":52,"value":2413},"    \"name\"",{"type":41,"tag":298,"props":2415,"children":2416},{"style":305},[2417],{"type":52,"value":1373},{"type":41,"tag":298,"props":2419,"children":2420},{"style":330},[2421],{"type":52,"value":2422},"\"pragmatedev/footmate\"",{"type":41,"tag":298,"props":2424,"children":2425},{"style":305},[2426],{"type":52,"value":338},{"type":41,"tag":298,"props":2428,"children":2429},{"class":300,"line":326},[2430,2435,2439,2444],{"type":41,"tag":298,"props":2431,"children":2432},{"style":315},[2433],{"type":52,"value":2434},"    \"description\"",{"type":41,"tag":298,"props":2436,"children":2437},{"style":305},[2438],{"type":52,"value":1373},{"type":41,"tag":298,"props":2440,"children":2441},{"style":330},[2442],{"type":52,"value":2443},"\"FootMATE Theme\"",{"type":41,"tag":298,"props":2445,"children":2446},{"style":305},[2447],{"type":52,"value":338},{"type":41,"tag":298,"props":2449,"children":2450},{"class":300,"line":341},[2451,2456,2460,2465],{"type":41,"tag":298,"props":2452,"children":2453},{"style":315},[2454],{"type":52,"value":2455},"    \"license\"",{"type":41,"tag":298,"props":2457,"children":2458},{"style":305},[2459],{"type":52,"value":1373},{"type":41,"tag":298,"props":2461,"children":2462},{"style":330},[2463],{"type":52,"value":2464},"\"GPLv3\"",{"type":41,"tag":298,"props":2466,"children":2467},{"style":305},[2468],{"type":52,"value":338},{"type":41,"tag":298,"props":2470,"children":2471},{"class":300,"line":354},[2472,2477],{"type":41,"tag":298,"props":2473,"children":2474},{"style":315},[2475],{"type":52,"value":2476},"    \"autoload\"",{"type":41,"tag":298,"props":2478,"children":2479},{"style":305},[2480],{"type":52,"value":1478},{"type":41,"tag":298,"props":2482,"children":2483},{"class":300,"line":367},[2484,2489],{"type":41,"tag":298,"props":2485,"children":2486},{"style":315},[2487],{"type":52,"value":2488},"        \"psr-4\"",{"type":41,"tag":298,"props":2490,"children":2491},{"style":305},[2492],{"type":52,"value":1478},{"type":41,"tag":298,"props":2494,"children":2495},{"class":300,"line":380},[2496,2501,2506,2511,2515],{"type":41,"tag":298,"props":2497,"children":2498},{"style":315},[2499],{"type":52,"value":2500},"            \"FM",{"type":41,"tag":298,"props":2502,"children":2503},{"style":713},[2504],{"type":52,"value":2505},"\\\\",{"type":41,"tag":298,"props":2507,"children":2508},{"style":315},[2509],{"type":52,"value":2510},"\"",{"type":41,"tag":298,"props":2512,"children":2513},{"style":305},[2514],{"type":52,"value":1373},{"type":41,"tag":298,"props":2516,"children":2517},{"style":330},[2518],{"type":52,"value":2519},"\"app/\"\n",{"type":41,"tag":298,"props":2521,"children":2522},{"class":300,"line":389},[2523],{"type":41,"tag":298,"props":2524,"children":2525},{"style":305},[2526],{"type":52,"value":2527},"        }\n",{"type":41,"tag":298,"props":2529,"children":2530},{"class":300,"line":398},[2531],{"type":41,"tag":298,"props":2532,"children":2533},{"style":305},[2534],{"type":52,"value":2535},"    },\n",{"type":41,"tag":298,"props":2537,"children":2538},{"class":300,"line":411},[2539,2544],{"type":41,"tag":298,"props":2540,"children":2541},{"style":315},[2542],{"type":52,"value":2543},"    \"authors\"",{"type":41,"tag":298,"props":2545,"children":2546},{"style":305},[2547],{"type":52,"value":323},{"type":41,"tag":298,"props":2549,"children":2550},{"class":300,"line":424},[2551],{"type":41,"tag":298,"props":2552,"children":2553},{"style":305},[2554],{"type":52,"value":2555},"        {\n",{"type":41,"tag":298,"props":2557,"children":2558},{"class":300,"line":433},[2559,2564,2568,2573],{"type":41,"tag":298,"props":2560,"children":2561},{"style":315},[2562],{"type":52,"value":2563},"            \"name\"",{"type":41,"tag":298,"props":2565,"children":2566},{"style":305},[2567],{"type":52,"value":1373},{"type":41,"tag":298,"props":2569,"children":2570},{"style":330},[2571],{"type":52,"value":2572},"\"pragmate.dev\"",{"type":41,"tag":298,"props":2574,"children":2575},{"style":305},[2576],{"type":52,"value":338},{"type":41,"tag":298,"props":2578,"children":2579},{"class":300,"line":441},[2580,2585,2589],{"type":41,"tag":298,"props":2581,"children":2582},{"style":315},[2583],{"type":52,"value":2584},"            \"email\"",{"type":41,"tag":298,"props":2586,"children":2587},{"style":305},[2588],{"type":52,"value":1373},{"type":41,"tag":298,"props":2590,"children":2591},{"style":330},[2592],{"type":52,"value":2593},"\"hello@pragmate.dev\"\n",{"type":41,"tag":298,"props":2595,"children":2596},{"class":300,"line":454},[2597],{"type":41,"tag":298,"props":2598,"children":2599},{"style":305},[2600],{"type":52,"value":2527},{"type":41,"tag":298,"props":2602,"children":2603},{"class":300,"line":467},[2604],{"type":41,"tag":298,"props":2605,"children":2606},{"style":305},[2607],{"type":52,"value":2608},"    ],\n",{"type":41,"tag":298,"props":2610,"children":2611},{"class":300,"line":476},[2612,2617],{"type":41,"tag":298,"props":2613,"children":2614},{"style":315},[2615],{"type":52,"value":2616},"    \"require\"",{"type":41,"tag":298,"props":2618,"children":2619},{"style":305},[2620],{"type":52,"value":1478},{"type":41,"tag":298,"props":2622,"children":2623},{"class":300,"line":484},[2624,2629,2633,2638],{"type":41,"tag":298,"props":2625,"children":2626},{"style":315},[2627],{"type":52,"value":2628},"        \"php\"",{"type":41,"tag":298,"props":2630,"children":2631},{"style":305},[2632],{"type":52,"value":1373},{"type":41,"tag":298,"props":2634,"children":2635},{"style":330},[2636],{"type":52,"value":2637},"\"^8.1\"",{"type":41,"tag":298,"props":2639,"children":2640},{"style":305},[2641],{"type":52,"value":338},{"type":41,"tag":298,"props":2643,"children":2645},{"class":300,"line":2644},18,[2646,2651,2655,2660],{"type":41,"tag":298,"props":2647,"children":2648},{"style":315},[2649],{"type":52,"value":2650},"        \"illuminate/view\"",{"type":41,"tag":298,"props":2652,"children":2653},{"style":305},[2654],{"type":52,"value":1373},{"type":41,"tag":298,"props":2656,"children":2657},{"style":330},[2658],{"type":52,"value":2659},"\"^10.15\"",{"type":41,"tag":298,"props":2661,"children":2662},{"style":305},[2663],{"type":52,"value":338},{"type":41,"tag":298,"props":2665,"children":2667},{"class":300,"line":2666},19,[2668,2673,2677],{"type":41,"tag":298,"props":2669,"children":2670},{"style":315},[2671],{"type":52,"value":2672},"        \"illuminate/support\"",{"type":41,"tag":298,"props":2674,"children":2675},{"style":305},[2676],{"type":52,"value":1373},{"type":41,"tag":298,"props":2678,"children":2679},{"style":330},[2680],{"type":52,"value":2681},"\"^10.15\"\n",{"type":41,"tag":298,"props":2683,"children":2685},{"class":300,"line":2684},20,[2686],{"type":41,"tag":298,"props":2687,"children":2688},{"style":305},[2689],{"type":52,"value":2535},{"type":41,"tag":298,"props":2691,"children":2693},{"class":300,"line":2692},21,[2694,2699],{"type":41,"tag":298,"props":2695,"children":2696},{"style":315},[2697],{"type":52,"value":2698},"    \"scripts\"",{"type":41,"tag":298,"props":2700,"children":2701},{"style":305},[2702],{"type":52,"value":1478},{"type":41,"tag":298,"props":2704,"children":2706},{"class":300,"line":2705},22,[2707,2712,2716,2721],{"type":41,"tag":298,"props":2708,"children":2709},{"style":315},[2710],{"type":52,"value":2711},"      \"lint\"",{"type":41,"tag":298,"props":2713,"children":2714},{"style":305},[2715],{"type":52,"value":1373},{"type":41,"tag":298,"props":2717,"children":2718},{"style":330},[2719],{"type":52,"value":2720},"\"phpcs app\"",{"type":41,"tag":298,"props":2722,"children":2723},{"style":305},[2724],{"type":52,"value":338},{"type":41,"tag":298,"props":2726,"children":2728},{"class":300,"line":2727},23,[2729,2734,2738],{"type":41,"tag":298,"props":2730,"children":2731},{"style":315},[2732],{"type":52,"value":2733},"      \"format\"",{"type":41,"tag":298,"props":2735,"children":2736},{"style":305},[2737],{"type":52,"value":1373},{"type":41,"tag":298,"props":2739,"children":2740},{"style":330},[2741],{"type":52,"value":2742},"\"phpcbf app\"\n",{"type":41,"tag":298,"props":2744,"children":2746},{"class":300,"line":2745},24,[2747],{"type":41,"tag":298,"props":2748,"children":2749},{"style":305},[2750],{"type":52,"value":2535},{"type":41,"tag":298,"props":2752,"children":2754},{"class":300,"line":2753},25,[2755,2760],{"type":41,"tag":298,"props":2756,"children":2757},{"style":315},[2758],{"type":52,"value":2759},"    \"require-dev\"",{"type":41,"tag":298,"props":2761,"children":2762},{"style":305},[2763],{"type":52,"value":1478},{"type":41,"tag":298,"props":2765,"children":2767},{"class":300,"line":2766},26,[2768,2773,2777],{"type":41,"tag":298,"props":2769,"children":2770},{"style":315},[2771],{"type":52,"value":2772},"        \"squizlabs/php_codesniffer\"",{"type":41,"tag":298,"props":2774,"children":2775},{"style":305},[2776],{"type":52,"value":1373},{"type":41,"tag":298,"props":2778,"children":2779},{"style":330},[2780],{"type":52,"value":2781},"\"*\"\n",{"type":41,"tag":298,"props":2783,"children":2785},{"class":300,"line":2784},27,[2786],{"type":41,"tag":298,"props":2787,"children":2788},{"style":305},[2789],{"type":52,"value":1511},{"type":41,"tag":298,"props":2791,"children":2793},{"class":300,"line":2792},28,[2794],{"type":41,"tag":298,"props":2795,"children":2796},{"style":305},[2797],{"type":52,"value":490},{"type":41,"tag":287,"props":2799,"children":2801},{"className":289,"code":2800,"filename":1793,"language":292,"meta":7,"style":7},"{\n  \"name\": \"pragmatedev/footmate\",\n  \"description\": \"FootMATE Theme\",\n  \"license\": \"GPLv3\",\n  \"autoload\": {\n    \"psr-4\": {\n      \"FM\\\\\": \"app/\"\n    }\n  },\n  \"authors\": [\n    {\n      \"name\": \"pragmate.dev\",\n      \"email\": \"hello@pragmate.dev\"\n    }\n  ],\n  \"require\": {\n    \"php\": \"^8.1\",\n    \"illuminate/view\": \"^10.15\",\n    \"illuminate/support\": \"^10.15\"\n  },\n  \"scripts\": {\n    \"lint\": \"phpcs app\",\n    \"format\": \"phpcbf app\"\n  },\n  \"require-dev\": {\n    \"squizlabs/php_codesniffer\": \"*\"\n  }\n}\n",[2802],{"type":41,"tag":278,"props":2803,"children":2804},{"__ignoreMap":7},[2805,2812,2832,2852,2872,2884,2896,2920,2927,2934,2946,2953,2973,2989,2996,3003,3015,3035,3055,3071,3078,3089,3108,3123,3130,3142,3158,3166],{"type":41,"tag":298,"props":2806,"children":2807},{"class":300,"line":301},[2808],{"type":41,"tag":298,"props":2809,"children":2810},{"style":305},[2811],{"type":52,"value":308},{"type":41,"tag":298,"props":2813,"children":2814},{"class":300,"line":311},[2815,2820,2824,2828],{"type":41,"tag":298,"props":2816,"children":2817},{"style":315},[2818],{"type":52,"value":2819},"  \"name\"",{"type":41,"tag":298,"props":2821,"children":2822},{"style":305},[2823],{"type":52,"value":1373},{"type":41,"tag":298,"props":2825,"children":2826},{"style":330},[2827],{"type":52,"value":2422},{"type":41,"tag":298,"props":2829,"children":2830},{"style":305},[2831],{"type":52,"value":338},{"type":41,"tag":298,"props":2833,"children":2834},{"class":300,"line":326},[2835,2840,2844,2848],{"type":41,"tag":298,"props":2836,"children":2837},{"style":315},[2838],{"type":52,"value":2839},"  \"description\"",{"type":41,"tag":298,"props":2841,"children":2842},{"style":305},[2843],{"type":52,"value":1373},{"type":41,"tag":298,"props":2845,"children":2846},{"style":330},[2847],{"type":52,"value":2443},{"type":41,"tag":298,"props":2849,"children":2850},{"style":305},[2851],{"type":52,"value":338},{"type":41,"tag":298,"props":2853,"children":2854},{"class":300,"line":341},[2855,2860,2864,2868],{"type":41,"tag":298,"props":2856,"children":2857},{"style":315},[2858],{"type":52,"value":2859},"  \"license\"",{"type":41,"tag":298,"props":2861,"children":2862},{"style":305},[2863],{"type":52,"value":1373},{"type":41,"tag":298,"props":2865,"children":2866},{"style":330},[2867],{"type":52,"value":2464},{"type":41,"tag":298,"props":2869,"children":2870},{"style":305},[2871],{"type":52,"value":338},{"type":41,"tag":298,"props":2873,"children":2874},{"class":300,"line":354},[2875,2880],{"type":41,"tag":298,"props":2876,"children":2877},{"style":315},[2878],{"type":52,"value":2879},"  \"autoload\"",{"type":41,"tag":298,"props":2881,"children":2882},{"style":305},[2883],{"type":52,"value":1478},{"type":41,"tag":298,"props":2885,"children":2886},{"class":300,"line":367},[2887,2892],{"type":41,"tag":298,"props":2888,"children":2889},{"style":315},[2890],{"type":52,"value":2891},"    \"psr-4\"",{"type":41,"tag":298,"props":2893,"children":2894},{"style":305},[2895],{"type":52,"value":1478},{"type":41,"tag":298,"props":2897,"children":2898},{"class":300,"line":380},[2899,2904,2908,2912,2916],{"type":41,"tag":298,"props":2900,"children":2901},{"style":315},[2902],{"type":52,"value":2903},"      \"FM",{"type":41,"tag":298,"props":2905,"children":2906},{"style":713},[2907],{"type":52,"value":2505},{"type":41,"tag":298,"props":2909,"children":2910},{"style":315},[2911],{"type":52,"value":2510},{"type":41,"tag":298,"props":2913,"children":2914},{"style":305},[2915],{"type":52,"value":1373},{"type":41,"tag":298,"props":2917,"children":2918},{"style":330},[2919],{"type":52,"value":2519},{"type":41,"tag":298,"props":2921,"children":2922},{"class":300,"line":389},[2923],{"type":41,"tag":298,"props":2924,"children":2925},{"style":305},[2926],{"type":52,"value":1511},{"type":41,"tag":298,"props":2928,"children":2929},{"class":300,"line":398},[2930],{"type":41,"tag":298,"props":2931,"children":2932},{"style":305},[2933],{"type":52,"value":2328},{"type":41,"tag":298,"props":2935,"children":2936},{"class":300,"line":411},[2937,2942],{"type":41,"tag":298,"props":2938,"children":2939},{"style":315},[2940],{"type":52,"value":2941},"  \"authors\"",{"type":41,"tag":298,"props":2943,"children":2944},{"style":305},[2945],{"type":52,"value":323},{"type":41,"tag":298,"props":2947,"children":2948},{"class":300,"line":424},[2949],{"type":41,"tag":298,"props":2950,"children":2951},{"style":305},[2952],{"type":52,"value":1444},{"type":41,"tag":298,"props":2954,"children":2955},{"class":300,"line":433},[2956,2961,2965,2969],{"type":41,"tag":298,"props":2957,"children":2958},{"style":315},[2959],{"type":52,"value":2960},"      \"name\"",{"type":41,"tag":298,"props":2962,"children":2963},{"style":305},[2964],{"type":52,"value":1373},{"type":41,"tag":298,"props":2966,"children":2967},{"style":330},[2968],{"type":52,"value":2572},{"type":41,"tag":298,"props":2970,"children":2971},{"style":305},[2972],{"type":52,"value":338},{"type":41,"tag":298,"props":2974,"children":2975},{"class":300,"line":441},[2976,2981,2985],{"type":41,"tag":298,"props":2977,"children":2978},{"style":315},[2979],{"type":52,"value":2980},"      \"email\"",{"type":41,"tag":298,"props":2982,"children":2983},{"style":305},[2984],{"type":52,"value":1373},{"type":41,"tag":298,"props":2986,"children":2987},{"style":330},[2988],{"type":52,"value":2593},{"type":41,"tag":298,"props":2990,"children":2991},{"class":300,"line":454},[2992],{"type":41,"tag":298,"props":2993,"children":2994},{"style":305},[2995],{"type":52,"value":1511},{"type":41,"tag":298,"props":2997,"children":2998},{"class":300,"line":467},[2999],{"type":41,"tag":298,"props":3000,"children":3001},{"style":305},[3002],{"type":52,"value":395},{"type":41,"tag":298,"props":3004,"children":3005},{"class":300,"line":476},[3006,3011],{"type":41,"tag":298,"props":3007,"children":3008},{"style":315},[3009],{"type":52,"value":3010},"  \"require\"",{"type":41,"tag":298,"props":3012,"children":3013},{"style":305},[3014],{"type":52,"value":1478},{"type":41,"tag":298,"props":3016,"children":3017},{"class":300,"line":484},[3018,3023,3027,3031],{"type":41,"tag":298,"props":3019,"children":3020},{"style":315},[3021],{"type":52,"value":3022},"    \"php\"",{"type":41,"tag":298,"props":3024,"children":3025},{"style":305},[3026],{"type":52,"value":1373},{"type":41,"tag":298,"props":3028,"children":3029},{"style":330},[3030],{"type":52,"value":2637},{"type":41,"tag":298,"props":3032,"children":3033},{"style":305},[3034],{"type":52,"value":338},{"type":41,"tag":298,"props":3036,"children":3037},{"class":300,"line":2644},[3038,3043,3047,3051],{"type":41,"tag":298,"props":3039,"children":3040},{"style":315},[3041],{"type":52,"value":3042},"    \"illuminate/view\"",{"type":41,"tag":298,"props":3044,"children":3045},{"style":305},[3046],{"type":52,"value":1373},{"type":41,"tag":298,"props":3048,"children":3049},{"style":330},[3050],{"type":52,"value":2659},{"type":41,"tag":298,"props":3052,"children":3053},{"style":305},[3054],{"type":52,"value":338},{"type":41,"tag":298,"props":3056,"children":3057},{"class":300,"line":2666},[3058,3063,3067],{"type":41,"tag":298,"props":3059,"children":3060},{"style":315},[3061],{"type":52,"value":3062},"    \"illuminate/support\"",{"type":41,"tag":298,"props":3064,"children":3065},{"style":305},[3066],{"type":52,"value":1373},{"type":41,"tag":298,"props":3068,"children":3069},{"style":330},[3070],{"type":52,"value":2681},{"type":41,"tag":298,"props":3072,"children":3073},{"class":300,"line":2684},[3074],{"type":41,"tag":298,"props":3075,"children":3076},{"style":305},[3077],{"type":52,"value":2328},{"type":41,"tag":298,"props":3079,"children":3080},{"class":300,"line":2692},[3081,3085],{"type":41,"tag":298,"props":3082,"children":3083},{"style":315},[3084],{"type":52,"value":2236},{"type":41,"tag":298,"props":3086,"children":3087},{"style":305},[3088],{"type":52,"value":1478},{"type":41,"tag":298,"props":3090,"children":3091},{"class":300,"line":2705},[3092,3096,3100,3104],{"type":41,"tag":298,"props":3093,"children":3094},{"style":315},[3095],{"type":52,"value":2290},{"type":41,"tag":298,"props":3097,"children":3098},{"style":305},[3099],{"type":52,"value":1373},{"type":41,"tag":298,"props":3101,"children":3102},{"style":330},[3103],{"type":52,"value":2720},{"type":41,"tag":298,"props":3105,"children":3106},{"style":305},[3107],{"type":52,"value":338},{"type":41,"tag":298,"props":3109,"children":3110},{"class":300,"line":2727},[3111,3115,3119],{"type":41,"tag":298,"props":3112,"children":3113},{"style":315},[3114],{"type":52,"value":2311},{"type":41,"tag":298,"props":3116,"children":3117},{"style":305},[3118],{"type":52,"value":1373},{"type":41,"tag":298,"props":3120,"children":3121},{"style":330},[3122],{"type":52,"value":2742},{"type":41,"tag":298,"props":3124,"children":3125},{"class":300,"line":2745},[3126],{"type":41,"tag":298,"props":3127,"children":3128},{"style":305},[3129],{"type":52,"value":2328},{"type":41,"tag":298,"props":3131,"children":3132},{"class":300,"line":2753},[3133,3138],{"type":41,"tag":298,"props":3134,"children":3135},{"style":315},[3136],{"type":52,"value":3137},"  \"require-dev\"",{"type":41,"tag":298,"props":3139,"children":3140},{"style":305},[3141],{"type":52,"value":1478},{"type":41,"tag":298,"props":3143,"children":3144},{"class":300,"line":2766},[3145,3150,3154],{"type":41,"tag":298,"props":3146,"children":3147},{"style":315},[3148],{"type":52,"value":3149},"    \"squizlabs/php_codesniffer\"",{"type":41,"tag":298,"props":3151,"children":3152},{"style":305},[3153],{"type":52,"value":1373},{"type":41,"tag":298,"props":3155,"children":3156},{"style":330},[3157],{"type":52,"value":2781},{"type":41,"tag":298,"props":3159,"children":3160},{"class":300,"line":2784},[3161],{"type":41,"tag":298,"props":3162,"children":3163},{"style":305},[3164],{"type":52,"value":3165},"  }\n",{"type":41,"tag":298,"props":3167,"children":3168},{"class":300,"line":2792},[3169],{"type":41,"tag":298,"props":3170,"children":3171},{"style":305},[3172],{"type":52,"value":490},{"type":41,"tag":79,"props":3174,"children":3175},{},[],{"type":41,"tag":83,"props":3177,"children":3179},{"id":3178},"how-to-configure-prettier",[3180],{"type":52,"value":3181},"How to Configure Prettier?",{"type":41,"tag":48,"props":3183,"children":3184},{},[3185,3187,3194,3196,3201],{"type":52,"value":3186},"I wanted to discuss ",{"type":41,"tag":55,"props":3188,"children":3191},{"href":3189,"rel":3190},"https://prettier.io/docs/en/rationale",[59],[3192],{"type":52,"value":3193},"Prettier's rules",{"type":52,"value":3195}," now and show how you can modify them, but I'm not sure if it's needed. According to the core idea of Prettier - being opinionated - ",{"type":41,"tag":95,"props":3197,"children":3198},{},[3199],{"type":52,"value":3200},"you should not need this because you should rely on the rules defined by Prettier",{"type":52,"value":3202},". If you decide to use it, you must accept its rules.",{"type":41,"tag":48,"props":3204,"children":3205},{},[3206,3208,3213,3215,3222,3224,3229,3231,3238],{"type":52,"value":3207},"It's a little bit different approach than for example in ",{"type":41,"tag":278,"props":3209,"children":3211},{"className":3210},[],[3212],{"type":52,"value":1305},{"type":52,"value":3214},", where ",{"type":41,"tag":55,"props":3216,"children":3219},{"href":3217,"rel":3218},"https://pragmate.dev/wordpress/coding-standards/#what-coding-standard-i-use-for-wordpress",[59],[3220],{"type":52,"value":3221},"you can define which rules you want to use",{"type":52,"value":3223}," in your project and the tool verifies them. Here, ",{"type":41,"tag":95,"props":3225,"children":3226},{},[3227],{"type":52,"value":3228},"Prettier tells how to format the code and if you decide to use it, you need to trust it.",{"type":52,"value":3230}," The official articles describe the choice well, so you should ",{"type":41,"tag":55,"props":3232,"children":3235},{"href":3233,"rel":3234},"https://prettier.io/docs/en/option-philosophy",[59],[3236],{"type":52,"value":3237},"check it out",{"type":52,"value":3239},"!",{"type":41,"tag":48,"props":3241,"children":3242},{},[3243,3245,3259,3261,3268],{"type":52,"value":3244},"Of course, it provides a limited set of options so you can ",{"type":41,"tag":95,"props":3246,"children":3247},{},[3248,3250,3257],{"type":52,"value":3249},"create the ",{"type":41,"tag":55,"props":3251,"children":3254},{"href":3252,"rel":3253},"https://prettier.io/docs/en/configuration",[59],[3255],{"type":52,"value":3256},"configuration file",{"type":52,"value":3258},", and modify rules",{"type":52,"value":3260},", like ",{"type":41,"tag":55,"props":3262,"children":3265},{"href":3263,"rel":3264},"https://github.com/pragmatedev/vilare/pull/19/commits/76708ce37c459218ff023eb6d6396f25eb611e65",[59],[3266],{"type":52,"value":3267},"using a single quote instead of double ones",{"type":52,"value":3269},", but most of them are there only due to \"history\" reasons and no more will be added in the future.",{"type":41,"tag":287,"props":3271,"children":3273},{"className":289,"code":3272,"filename":1344,"language":292,"meta":7,"style":7},"{\n  \"singleQuote\": true\n}\n",[3274],{"type":41,"tag":278,"props":3275,"children":3276},{"__ignoreMap":7},[3277,3284,3300],{"type":41,"tag":298,"props":3278,"children":3279},{"class":300,"line":301},[3280],{"type":41,"tag":298,"props":3281,"children":3282},{"style":305},[3283],{"type":52,"value":308},{"type":41,"tag":298,"props":3285,"children":3286},{"class":300,"line":311},[3287,3291,3295],{"type":41,"tag":298,"props":3288,"children":3289},{"style":315},[3290],{"type":52,"value":1368},{"type":41,"tag":298,"props":3292,"children":3293},{"style":305},[3294],{"type":52,"value":1373},{"type":41,"tag":298,"props":3296,"children":3297},{"style":1376},[3298],{"type":52,"value":3299},"true\n",{"type":41,"tag":298,"props":3301,"children":3302},{"class":300,"line":326},[3303],{"type":41,"tag":298,"props":3304,"children":3305},{"style":305},[3306],{"type":52,"value":490},{"type":41,"tag":48,"props":3308,"children":3309},{},[3310,3312,3324,3326,3332,3334,3341],{"type":52,"value":3311},"Note that ",{"type":41,"tag":95,"props":3313,"children":3314},{},[3315,3317],{"type":52,"value":3316},"Prettier supports ",{"type":41,"tag":55,"props":3318,"children":3321},{"href":3319,"rel":3320},"https://pragmate.dev/environment/editorconfig/",[59],[3322],{"type":52,"value":3323},"EditorConfig",{"type":52,"value":3325},", which is a great addition! For example, if you've set ",{"type":41,"tag":278,"props":3327,"children":3329},{"className":3328},[],[3330],{"type":52,"value":3331},"indent_size",{"type":52,"value":3333}," there already, ",{"type":41,"tag":55,"props":3335,"children":3338},{"href":3336,"rel":3337},"https://prettier.io/docs/en/options#tab-width",[59],[3339],{"type":52,"value":3340},"this configuration will be reflected",{"type":52,"value":3342}," in Prettier too.",{"type":41,"tag":79,"props":3344,"children":3345},{},[],{"type":41,"tag":48,"props":3347,"children":3348},{},[3349],{"type":52,"value":1051},{"type":41,"tag":48,"props":3351,"children":3352},{},[3353],{"type":52,"value":1056},{"type":41,"tag":48,"props":3355,"children":3356},{},[3357],{"type":41,"tag":95,"props":3358,"children":3359},{},[3360],{"type":52,"value":1064},{"type":41,"tag":1066,"props":3362,"children":3363},{},[],{"type":41,"tag":79,"props":3365,"children":3366},{},[],{"type":41,"tag":83,"props":3368,"children":3370},{"id":3369},"how-to-use-prettier-in-vs-code",[3371],{"type":52,"value":3372},"How to Use Prettier in VS Code?",{"type":41,"tag":48,"props":3374,"children":3375},{},[3376,3378,3385],{"type":52,"value":3377},"If you want to use it now without worrying about running commands in your terminal manually, you can integrate it with your VS Code (",{"type":41,"tag":55,"props":3379,"children":3382},{"href":3380,"rel":3381},"https://prettier.io/docs/en/editors",[59],[3383],{"type":52,"value":3384},"and not only",{"type":52,"value":3386},") editor.",{"type":41,"tag":48,"props":3388,"children":3389},{},[3390],{"type":41,"tag":164,"props":3391,"children":3393},{"alt":166,"src":3392},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/1fba9b67-928e-47f9-8cd8-24e032cceb42.png",[],{"type":41,"tag":48,"props":3395,"children":3396},{},[3397,3411,3413,3420],{"type":41,"tag":95,"props":3398,"children":3399},{},[3400,3402,3409],{"type":52,"value":3401},"Just install ",{"type":41,"tag":55,"props":3403,"children":3406},{"href":3404,"rel":3405},"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode",[59],[3407],{"type":52,"value":3408},"the plugin",{"type":52,"value":3410}," and use it when needed.",{"type":52,"value":3412}," You can configure it ",{"type":41,"tag":55,"props":3414,"children":3417},{"href":3415,"rel":3416},"https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode#format-on-save",[59],[3418],{"type":52,"value":3419},"to format the code on save",{"type":52,"value":3421},", or just run the command manually which is a way preferable to me. I don't like it when something changes the code without my permission so I do this manually 😅",{"type":41,"tag":79,"props":3423,"children":3424},{},[],{"type":41,"tag":83,"props":3426,"children":3428},{"id":3427},"how-to-ignore-code-in-prettier",[3429],{"type":52,"value":3430},"How to Ignore Code in Prettier?",{"type":41,"tag":48,"props":3432,"children":3433},{},[3434,3436,3449,3451,3457,3459,3466],{"type":52,"value":3435},"As with all tools like this, ",{"type":41,"tag":95,"props":3437,"children":3438},{},[3439,3441,3447],{"type":52,"value":3440},"you can ignore code checks by creating a ",{"type":41,"tag":278,"props":3442,"children":3444},{"className":3443},[],[3445],{"type":52,"value":3446},".prettierignore",{"type":52,"value":3448}," file",{"type":52,"value":3450},", which has a similar format as ",{"type":41,"tag":278,"props":3452,"children":3454},{"className":3453},[],[3455],{"type":52,"value":3456},".gitignore",{"type":52,"value":3458}," and ignores files and directories defined there. You can also ignore specific ",{"type":41,"tag":55,"props":3460,"children":3463},{"href":3461,"rel":3462},"https://prettier.io/docs/en/ignore#javascript",[59],[3464],{"type":52,"value":3465},"lines with comments",{"type":52,"value":3467}," that differ based on the language.",{"type":41,"tag":1725,"props":3469,"children":3471},{":tabs":3470},"[\".prettierignore\", \"js\", \"css\", \"html\"]",[3472,3503,3621,3673],{"type":41,"tag":287,"props":3473,"children":3475},{"className":1996,"code":3474,"filename":3446,"language":1998,"meta":7,"style":7},"dist\n*.lock\n*-lock.json\n",[3476],{"type":41,"tag":278,"props":3477,"children":3478},{"__ignoreMap":7},[3479,3487,3495],{"type":41,"tag":298,"props":3480,"children":3481},{"class":300,"line":301},[3482],{"type":41,"tag":298,"props":3483,"children":3484},{"style":305},[3485],{"type":52,"value":3486},"dist\n",{"type":41,"tag":298,"props":3488,"children":3489},{"class":300,"line":311},[3490],{"type":41,"tag":298,"props":3491,"children":3492},{"style":305},[3493],{"type":52,"value":3494},"*.lock\n",{"type":41,"tag":298,"props":3496,"children":3497},{"class":300,"line":326},[3498],{"type":41,"tag":298,"props":3499,"children":3500},{"style":305},[3501],{"type":52,"value":3502},"*-lock.json\n",{"type":41,"tag":287,"props":3504,"children":3506},{"className":1731,"code":3505,"filename":1734,"language":1734,"meta":7,"style":7},"// prettier-ignore\nmatrix(\n  1, 0, 0,\n  0, 1, 0,\n  0, 0, 1\n)\n",[3507],{"type":41,"tag":278,"props":3508,"children":3509},{"__ignoreMap":7},[3510,3519,3531,3560,3589,3613],{"type":41,"tag":298,"props":3511,"children":3512},{"class":300,"line":301},[3513],{"type":41,"tag":298,"props":3514,"children":3516},{"style":3515},"--shiki-default:#7F848E;--shiki-default-font-style:italic",[3517],{"type":52,"value":3518},"// prettier-ignore\n",{"type":41,"tag":298,"props":3520,"children":3521},{"class":300,"line":311},[3522,3527],{"type":41,"tag":298,"props":3523,"children":3524},{"style":737},[3525],{"type":52,"value":3526},"matrix",{"type":41,"tag":298,"props":3528,"children":3529},{"style":305},[3530],{"type":52,"value":1809},{"type":41,"tag":298,"props":3532,"children":3533},{"class":300,"line":326},[3534,3539,3543,3548,3552,3556],{"type":41,"tag":298,"props":3535,"children":3536},{"style":1376},[3537],{"type":52,"value":3538},"  1",{"type":41,"tag":298,"props":3540,"children":3541},{"style":305},[3542],{"type":52,"value":607},{"type":41,"tag":298,"props":3544,"children":3545},{"style":1376},[3546],{"type":52,"value":3547},"0",{"type":41,"tag":298,"props":3549,"children":3550},{"style":305},[3551],{"type":52,"value":607},{"type":41,"tag":298,"props":3553,"children":3554},{"style":1376},[3555],{"type":52,"value":3547},{"type":41,"tag":298,"props":3557,"children":3558},{"style":305},[3559],{"type":52,"value":338},{"type":41,"tag":298,"props":3561,"children":3562},{"class":300,"line":341},[3563,3568,3572,3577,3581,3585],{"type":41,"tag":298,"props":3564,"children":3565},{"style":1376},[3566],{"type":52,"value":3567},"  0",{"type":41,"tag":298,"props":3569,"children":3570},{"style":305},[3571],{"type":52,"value":607},{"type":41,"tag":298,"props":3573,"children":3574},{"style":1376},[3575],{"type":52,"value":3576},"1",{"type":41,"tag":298,"props":3578,"children":3579},{"style":305},[3580],{"type":52,"value":607},{"type":41,"tag":298,"props":3582,"children":3583},{"style":1376},[3584],{"type":52,"value":3547},{"type":41,"tag":298,"props":3586,"children":3587},{"style":305},[3588],{"type":52,"value":338},{"type":41,"tag":298,"props":3590,"children":3591},{"class":300,"line":354},[3592,3596,3600,3604,3608],{"type":41,"tag":298,"props":3593,"children":3594},{"style":1376},[3595],{"type":52,"value":3567},{"type":41,"tag":298,"props":3597,"children":3598},{"style":305},[3599],{"type":52,"value":607},{"type":41,"tag":298,"props":3601,"children":3602},{"style":1376},[3603],{"type":52,"value":3547},{"type":41,"tag":298,"props":3605,"children":3606},{"style":305},[3607],{"type":52,"value":607},{"type":41,"tag":298,"props":3609,"children":3610},{"style":1376},[3611],{"type":52,"value":3612},"1\n",{"type":41,"tag":298,"props":3614,"children":3615},{"class":300,"line":367},[3616],{"type":41,"tag":298,"props":3617,"children":3618},{"style":305},[3619],{"type":52,"value":3620},")\n",{"type":41,"tag":287,"props":3622,"children":3626},{"className":3623,"code":3624,"filename":3625,"language":3625,"meta":7,"style":7},"language-css shiki shiki-themes one-dark-pro","/* prettier-ignore */\n.my    ugly rule\n{\n\n}\n","css",[3627],{"type":41,"tag":278,"props":3628,"children":3629},{"__ignoreMap":7},[3630,3638,3652,3659,3666],{"type":41,"tag":298,"props":3631,"children":3632},{"class":300,"line":301},[3633],{"type":41,"tag":298,"props":3634,"children":3635},{"style":3515},[3636],{"type":52,"value":3637},"/* prettier-ignore */\n",{"type":41,"tag":298,"props":3639,"children":3640},{"class":300,"line":311},[3641,3646],{"type":41,"tag":298,"props":3642,"children":3643},{"style":1376},[3644],{"type":52,"value":3645},".my",{"type":41,"tag":298,"props":3647,"children":3649},{"style":3648},"--shiki-default:#C678DD",[3650],{"type":52,"value":3651},"    ugly rule\n",{"type":41,"tag":298,"props":3653,"children":3654},{"class":300,"line":326},[3655],{"type":41,"tag":298,"props":3656,"children":3657},{"style":305},[3658],{"type":52,"value":308},{"type":41,"tag":298,"props":3660,"children":3661},{"class":300,"line":341},[3662],{"type":41,"tag":298,"props":3663,"children":3664},{"emptyLinePlaceholder":36},[3665],{"type":52,"value":2018},{"type":41,"tag":298,"props":3667,"children":3668},{"class":300,"line":354},[3669],{"type":41,"tag":298,"props":3670,"children":3671},{"style":305},[3672],{"type":52,"value":490},{"type":41,"tag":287,"props":3674,"children":3678},{"className":3675,"code":3676,"filename":3677,"language":3677,"meta":7,"style":7},"language-html shiki shiki-themes one-dark-pro","\u003C!-- prettier-ignore -->\n\u003Cdiv         class=\"x\"       >hello world\u003C/div            >\n","html",[3679],{"type":41,"tag":278,"props":3680,"children":3681},{"__ignoreMap":7},[3682,3690],{"type":41,"tag":298,"props":3683,"children":3684},{"class":300,"line":301},[3685],{"type":41,"tag":298,"props":3686,"children":3687},{"style":3515},[3688],{"type":52,"value":3689},"\u003C!-- prettier-ignore -->\n",{"type":41,"tag":298,"props":3691,"children":3692},{"class":300,"line":311},[3693,3697,3701,3706,3711,3716,3721,3725],{"type":41,"tag":298,"props":3694,"children":3695},{"style":305},[3696],{"type":52,"value":702},{"type":41,"tag":298,"props":3698,"children":3699},{"style":315},[3700],{"type":52,"value":840},{"type":41,"tag":298,"props":3702,"children":3703},{"style":1376},[3704],{"type":52,"value":3705},"         class",{"type":41,"tag":298,"props":3707,"children":3708},{"style":305},[3709],{"type":52,"value":3710},"=",{"type":41,"tag":298,"props":3712,"children":3713},{"style":330},[3714],{"type":52,"value":3715},"\"x\"",{"type":41,"tag":298,"props":3717,"children":3718},{"style":305},[3719],{"type":52,"value":3720},"       >hello world\u003C/",{"type":41,"tag":298,"props":3722,"children":3723},{"style":315},[3724],{"type":52,"value":840},{"type":41,"tag":298,"props":3726,"children":3727},{"style":305},[3728],{"type":52,"value":3729},"            >\n",{"type":41,"tag":48,"props":3731,"children":3732},{},[3733,3740,3742,3748,3750,3757],{"type":41,"tag":55,"props":3734,"children":3737},{"href":3735,"rel":3736},"https://github.com/pragmatedev/vilare/pull/19/commits/26d91426df45d44678c7296258cfb9031cf1420e",[59],[3738],{"type":52,"value":3739},"In this example",{"type":52,"value":3741},", we want to skip the ",{"type":41,"tag":278,"props":3743,"children":3745},{"className":3744},[],[3746],{"type":52,"value":3747},"dist",{"type":52,"value":3749}," directory, which is the output directory for ",{"type":41,"tag":55,"props":3751,"children":3754},{"href":3752,"rel":3753},"https://pragmate.dev/wordpress/vite/integration/",[59],[3755],{"type":52,"value":3756},"my front-end assets",{"type":52,"value":3758}," and lock files from package managers.",{"type":41,"tag":79,"props":3760,"children":3761},{},[],{"type":41,"tag":83,"props":3763,"children":3765},{"id":3764},"do-i-use-prettier-in-my-workflow",[3766],{"type":52,"value":3767},"Do I Use Prettier in My Workflow?",{"type":41,"tag":48,"props":3769,"children":3770},{},[3771,3773,3778],{"type":52,"value":3772},"I was wondering a lot - ",{"type":41,"tag":238,"props":3774,"children":3775},{},[3776],{"type":52,"value":3777},"Why do the docs highlight the opinionating aspect of Prettier so often?",{"type":52,"value":3779}," Now, after using it for a while I understand why 😅",{"type":41,"tag":48,"props":3781,"children":3782},{},[3783,3785,3790],{"type":52,"value":3784},"Prettier has a specific way of formatting code without offering much customization. It follows a specific set of rules and ",{"type":41,"tag":55,"props":3786,"children":3788},{"href":1025,"rel":3787},[59],[3789],{"type":52,"value":138},{"type":52,"value":3791},", ensuring a consistent code style across a project. That's why it's opinionated.",{"type":41,"tag":48,"props":3793,"children":3794},{},[3795,3797,3802,3804,3810],{"type":52,"value":3796},"Its greatest advantage, like this, might be also treated as disadvantage. ",{"type":41,"tag":95,"props":3798,"children":3799},{},[3800],{"type":52,"value":3801},"In some aspects, Prettier follows the code too strictly, making problems instead of solving them.",{"type":52,"value":3803}," Antony Fu, in his ",{"type":41,"tag":55,"props":3805,"children":3807},{"href":1016,"rel":3806},[59],[3808],{"type":52,"value":3809},"article",{"type":52,"value":3811},", already pointed out why it might be treated as a problem. I insist you check out the whole article because it's a great reference for the decisions about usage.",{"type":41,"tag":48,"props":3813,"children":3814},{},[3815],{"type":41,"tag":164,"props":3816,"children":3818},{"alt":166,"src":3817},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/0c2391ce-cc65-4ead-978d-ec35dae0f718.png",[],{"type":41,"tag":48,"props":3820,"children":3821},{},[3822,3824,3832,3834,3839,3841,3847],{"type":52,"value":3823},"I like the opinion provided there which states that ",{"type":41,"tag":55,"props":3825,"children":3827},{"href":1025,"rel":3826},[59],[3828],{"type":41,"tag":95,"props":3829,"children":3830},{},[3831],{"type":52,"value":1029},{"type":52,"value":3833},". And it seems to be not for me. ",{"type":41,"tag":95,"props":3835,"children":3836},{},[3837],{"type":52,"value":3838},"I don't like not having control over things like this, and I expect more flexibility in rules management.",{"type":52,"value":3840}," It also generates some problems in my workflow when using other linters like Stylelint or ES Lint, but I'll discuss this topic wider in the separate materials about those linters, so ",{"type":41,"tag":55,"props":3842,"children":3844},{"href":1601,"rel":3843},[59],[3845],{"type":52,"value":3846},"remember to stay up to date",{"type":52,"value":3848}," 🥰",{"type":41,"tag":48,"props":3850,"children":3851},{},[3852,3854,3859,3861,3866,3868,3873,3875,3881],{"type":52,"value":3853},"So do I use it? For now, ",{"type":41,"tag":95,"props":3855,"children":3856},{},[3857],{"type":52,"value":3858},"I'll leave Prettier in my project to let it format other than JS and SCSS file types",{"type":52,"value":3860}," and check how it handles this task. ",{"type":41,"tag":95,"props":3862,"children":3863},{},[3864],{"type":52,"value":3865},"I won't be using it for SCSS and JS formatting",{"type":52,"value":3867},", at least for now because I prefer more flexible ",{"type":41,"tag":278,"props":3869,"children":3871},{"className":3870},[],[3872],{"type":52,"value":180},{"type":52,"value":3874}," and ",{"type":41,"tag":278,"props":3876,"children":3878},{"className":3877},[],[3879],{"type":52,"value":3880},"ES Lint",{"type":52,"value":3882}," which are the linters, but handle formatting well too. Maybe I'll get back to Prettier? We'll see",{"type":41,"tag":79,"props":3884,"children":3885},{},[],{"type":41,"tag":48,"props":3887,"children":3888},{},[3889,3891,3896],{"type":52,"value":3890},"I'm just one simple developer, so you don't need to blindly follow me! ",{"type":41,"tag":95,"props":3892,"children":3893},{},[3894],{"type":52,"value":3895},"You're the chief here so install the Prettier and check on your own how it improves the workflow.",{"type":52,"value":3897}," I believe that for projects that don't need JS or CSS linting that's the perfect tool.",{"type":41,"tag":48,"props":3899,"children":3900},{},[3901,3902,3907,3908,3915,3917,3922],{"type":52,"value":1598},{"type":41,"tag":55,"props":3903,"children":3905},{"href":1601,"rel":3904},[59],[3906],{"type":52,"value":1605},{"type":52,"value":3874},{"type":41,"tag":55,"props":3909,"children":3912},{"href":3910,"rel":3911},"https://www.youtube.com/watch?v=8ARcAziF50E",[59],[3913],{"type":52,"value":3914},"giving it a thumbs-up",{"type":52,"value":3916}," - it really helps spread the word. And if you need developers who truly care about quality and delivering great results, visit my company’s site: ",{"type":41,"tag":55,"props":3918,"children":3920},{"href":1610,"rel":3919},[59],[3921],{"type":52,"value":1614},{"type":52,"value":1616},{"type":41,"tag":1618,"props":3924,"children":3925},{},[3926],{"type":52,"value":1622},{"title":7,"searchDepth":311,"depth":311,"links":3928},[3929,3930,3931,3932,3933,3934,3935],{"id":85,"depth":311,"text":88},{"id":1892,"depth":311,"text":1895},{"id":1961,"depth":311,"text":1964},{"id":3178,"depth":311,"text":3181},{"id":3369,"depth":311,"text":3372},{"id":3427,"depth":311,"text":3430},{"id":3764,"depth":311,"text":3767},"content:environment:prettier.md","environment/prettier.md","environment/prettier",{"_path":3940,"_dir":3941,"_draft":6,"_partial":6,"_locale":7,"title":3942,"description":3943,"head":3944,"tags":3955,"links":3960,"chapters":3963,"created":3952,"thumb":3964,"body":3965,"_type":1638,"_id":10493,"_source":1640,"_file":10494,"_stem":10495,"_extension":1643},"/php/phpcs","php","PHP Code Sniffer: In-Depth Tutorial for Developers","Learn how to integrate PHP Code Sniffer into your development workflow and create coding standards tailored to your needs. Discover how it works, from its core functionalities to its integration with Visual Studio Code and don't miss any problems ever again.",{"title":3945,"link":3946,"meta":3948},"PHP Code Sniffer: In-Depth Tutorial for Developers | pragmate.dev",[3947],{"rel":14,"href":1310},[3949,3950,3951,3953],{"name":21,"content":22},{"name":18,"content":19},{"name":24,"content":3952},"2024-03-20",{"name":27,"content":3954},"https://cdn.pragmate.dev/wp-content/uploads/2024/03/b89af984-e6c7-4a3b-8e55-19046d6393cb.jpeg",{"time":3956,"level":3957,"stack":3958},"15min","Medium",[3959],"PHP",{"github":3961,"solution":3962},"https://github.com/pragmatedev/vilare/pull/18","#how-to-use-php-code-sniffer",[1581],"font",{"type":38,"children":3966,"toc":10480},[3967,3971,3976,3981,3986,3989,3992,3998,4025,4061,4065,4101,4267,4303,4531,4570,4611,4618,4621,4627,4640,5738,5742,5746,5750,5754,5758,5762,5766,5770,5773,5779,5826,5840,5843,5849,5868,5970,5997,6161,6173,6256,6275,6278,6282,6286,6293,6296,6299,6305,6315,6351,7043,7069,7072,7078,7112,7141,7162,7346,7358,7372,7394,7576,7608,7676,7718,7967,7987,9810,9822,9825,9831,9845,9858,9892,9899,9904,9909,9916,9919,9925,9945,9964,10104,10117,10271,10284,10290,10320,10327,10353,10358,10363,10369,10414,10421,10426,10450,10453,10476],{"type":41,"tag":42,"props":3968,"children":3970},{"thumbnail":3954,"url":3969},"https://www.youtube-nocookie.com/embed/0OelE2c4wVs",[],{"type":41,"tag":48,"props":3972,"children":3973},{},[3974],{"type":52,"value":3975},"If you work with PHP you probably heard about PHP Code Sniffer. And I'm not surprised! There are plenty of articles with basic knowledge about how to set it up, and if you think that's another one, please let me give you something more.",{"type":41,"tag":48,"props":3977,"children":3978},{},[3979],{"type":52,"value":3980},"Because, in the latest material on my channel, I'll provide the knowledge that I wish to have when starting my adventure with this tool. The knowledge that is not discussed so often. Of course, you'll find some basics too, but what's more important, you'll get more advanced tips that will help you build solutions that work for you, for your real needs.",{"type":41,"tag":48,"props":3982,"children":3983},{},[3984],{"type":52,"value":3985},"Welcome back, I'm Przemek and in this material, I'll talk about setting up PHP Code Sniffer and performing more advanced configurations to let you build your own rules.",{"type":41,"tag":75,"props":3987,"children":3988},{},[],{"type":41,"tag":79,"props":3990,"children":3991},{},[],{"type":41,"tag":83,"props":3993,"children":3995},{"id":3994},"what-is-php-code-sniffer",[3996],{"type":52,"value":3997},"What is PHP Code Sniffer?",{"type":41,"tag":48,"props":3999,"children":4000},{},[4001,4003,4008,4010,4015,4017,4023],{"type":52,"value":4002},"PHP Code Sniffer is a command line tool that ",{"type":41,"tag":95,"props":4004,"children":4005},{},[4006],{"type":52,"value":4007},"ensures your PHP code remains clean and consistent with a specific coding standard",{"type":52,"value":4009},". It consists of two scripts: ",{"type":41,"tag":278,"props":4011,"children":4013},{"className":4012},[],[4014],{"type":52,"value":1305},{"type":52,"value":4016}," - linter that checks what is wrong with the code, and ",{"type":41,"tag":278,"props":4018,"children":4020},{"className":4019},[],[4021],{"type":52,"value":4022},"phpcbf",{"type":52,"value":4024}," - formatter that tries to fix problems.",{"type":41,"tag":48,"props":4026,"children":4027},{},[4028,4030,4037,4039,4045,4047,4052,4054,4060],{"type":52,"value":4029},"A coding standard in PHP Code Sniffer is a collection of ",{"type":41,"tag":55,"props":4031,"children":4034},{"href":4032,"rel":4033},"https://github.com/PHPCSStandards/PHP_CodeSniffer/tree/master/src/Standards/Generic/Sniffs",[59],[4035],{"type":52,"value":4036},"sniffs",{"type":52,"value":4038},", each identified by the code using the ",{"type":41,"tag":278,"props":4040,"children":4042},{"className":4041},[],[4043],{"type":52,"value":4044},"Standard.Category.Name",{"type":52,"value":4046}," pattern. ",{"type":41,"tag":95,"props":4048,"children":4049},{},[4050],{"type":52,"value":4051},"A single sniff is designed to find one or more rule violations",{"type":52,"value":4053}," which also have a unique identifier: ",{"type":41,"tag":278,"props":4055,"children":4057},{"className":4056},[],[4058],{"type":52,"value":4059},"Standard.Category.Name.Error",{"type":52,"value":140},{"type":41,"tag":200,"props":4062,"children":4064},{":items":4063},"[\"https://cdn.pragmate.dev/wp-content/uploads/2024/02/285f9bdc-7356-4b66-a759-3f18fe653a1a.jpg\",\"https://cdn.pragmate.dev/wp-content/uploads/2024/02/edb490f4-0e5a-4f0e-9adc-bc4183be4b02.jpg\"]",[],{"type":41,"tag":48,"props":4066,"children":4067},{},[4068,4070,4076,4078,4084,4086,4091,4093,4099],{"type":52,"value":4069},"For example, the ",{"type":41,"tag":278,"props":4071,"children":4073},{"className":4072},[],[4074],{"type":52,"value":4075},"Generic.Arrays.DisallowLongArraySyntax",{"type":52,"value":4077}," sniff checks if the code uses a long array syntax like ",{"type":41,"tag":278,"props":4079,"children":4081},{"className":4080},[],[4082],{"type":52,"value":4083},"array()",{"type":52,"value":4085},". If so, ",{"type":41,"tag":278,"props":4087,"children":4089},{"className":4088},[],[4090],{"type":52,"value":1305},{"type":52,"value":4092}," informs that it's not allowed and that the short syntax ",{"type":41,"tag":278,"props":4094,"children":4096},{"className":4095},[],[4097],{"type":52,"value":4098},"[]",{"type":52,"value":4100}," should be used instead. That's a pretty fast check showing just one fix.",{"type":41,"tag":1725,"props":4102,"children":4104},{":tabs":4103},"[\"Code\", \"Error\"]",[4105,4211],{"type":41,"tag":287,"props":4106,"children":4111},{"className":4107,"code":4108,"filename":4109,"highlights":4110,"language":3941,"meta":7,"style":7},"language-php shiki shiki-themes one-dark-pro","class Hooks\n{\n    public static function init(): void {\n        $foo = array();\n    }\n}\n","Code",[341],[4112],{"type":41,"tag":278,"props":4113,"children":4114},{"__ignoreMap":7},[4115,4128,4135,4173,4197,4204],{"type":41,"tag":298,"props":4116,"children":4117},{"class":300,"line":301},[4118,4122],{"type":41,"tag":298,"props":4119,"children":4120},{"style":3648},[4121],{"type":52,"value":674},{"type":41,"tag":298,"props":4123,"children":4125},{"style":4124},"--shiki-default:#E5C07B",[4126],{"type":52,"value":4127}," Hooks\n",{"type":41,"tag":298,"props":4129,"children":4130},{"class":300,"line":311},[4131],{"type":41,"tag":298,"props":4132,"children":4133},{"style":305},[4134],{"type":52,"value":308},{"type":41,"tag":298,"props":4136,"children":4137},{"class":300,"line":326},[4138,4143,4148,4153,4158,4163,4168],{"type":41,"tag":298,"props":4139,"children":4140},{"style":3648},[4141],{"type":52,"value":4142},"    public",{"type":41,"tag":298,"props":4144,"children":4145},{"style":3648},[4146],{"type":52,"value":4147}," static",{"type":41,"tag":298,"props":4149,"children":4150},{"style":3648},[4151],{"type":52,"value":4152}," function",{"type":41,"tag":298,"props":4154,"children":4155},{"style":737},[4156],{"type":52,"value":4157}," init",{"type":41,"tag":298,"props":4159,"children":4160},{"style":305},[4161],{"type":52,"value":4162},"(): ",{"type":41,"tag":298,"props":4164,"children":4165},{"style":4124},[4166],{"type":52,"value":4167},"void",{"type":41,"tag":298,"props":4169,"children":4170},{"style":305},[4171],{"type":52,"value":4172}," {\n",{"type":41,"tag":298,"props":4174,"children":4176},{"class":4175,"line":341},[300,728],[4177,4182,4187,4192],{"type":41,"tag":298,"props":4178,"children":4179},{"style":315},[4180],{"type":52,"value":4181},"        $foo",{"type":41,"tag":298,"props":4183,"children":4184},{"style":713},[4185],{"type":52,"value":4186}," =",{"type":41,"tag":298,"props":4188,"children":4189},{"style":713},[4190],{"type":52,"value":4191}," array",{"type":41,"tag":298,"props":4193,"children":4194},{"style":305},[4195],{"type":52,"value":4196},"();\n",{"type":41,"tag":298,"props":4198,"children":4199},{"class":300,"line":354},[4200],{"type":41,"tag":298,"props":4201,"children":4202},{"style":305},[4203],{"type":52,"value":1511},{"type":41,"tag":298,"props":4205,"children":4206},{"class":300,"line":367},[4207],{"type":41,"tag":298,"props":4208,"children":4209},{"style":305},[4210],{"type":52,"value":490},{"type":41,"tag":287,"props":4212,"children":4216},{"className":1996,"code":4213,"filename":4214,"highlights":4215,"language":1998,"meta":7,"style":7},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n-----------------------------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n-----------------------------------------------------------------------------------------------------------------\n7 | ERROR | [x] Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax)\n-----------------------------------------------------------------------------------------------------------------\n","Error",[354],[4217],{"type":41,"tag":278,"props":4218,"children":4219},{"__ignoreMap":7},[4220,4228,4236,4244,4251,4260],{"type":41,"tag":298,"props":4221,"children":4222},{"class":300,"line":301},[4223],{"type":41,"tag":298,"props":4224,"children":4225},{"style":305},[4226],{"type":52,"value":4227},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n",{"type":41,"tag":298,"props":4229,"children":4230},{"class":300,"line":311},[4231],{"type":41,"tag":298,"props":4232,"children":4233},{"style":315},[4234],{"type":52,"value":4235},"-----------------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":4237,"children":4238},{"class":300,"line":326},[4239],{"type":41,"tag":298,"props":4240,"children":4241},{"style":305},[4242],{"type":52,"value":4243},"FOUND 1 ERROR AFFECTING 1 LINE\n",{"type":41,"tag":298,"props":4245,"children":4246},{"class":300,"line":341},[4247],{"type":41,"tag":298,"props":4248,"children":4249},{"style":315},[4250],{"type":52,"value":4235},{"type":41,"tag":298,"props":4252,"children":4254},{"class":4253,"line":354},[300,728],[4255],{"type":41,"tag":298,"props":4256,"children":4257},{"style":305},[4258],{"type":52,"value":4259},"7 | ERROR | [x] Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax)\n",{"type":41,"tag":298,"props":4261,"children":4262},{"class":300,"line":367},[4263],{"type":41,"tag":298,"props":4264,"children":4265},{"style":315},[4266],{"type":52,"value":4235},{"type":41,"tag":48,"props":4268,"children":4269},{},[4270,4272,4278,4280,4286,4288,4294,4296,4302],{"type":52,"value":4271},"Another example is ",{"type":41,"tag":278,"props":4273,"children":4275},{"className":4274},[],[4276],{"type":52,"value":4277},"Squiz.ControlStructures.ForEachLoopDeclaration",{"type":52,"value":4279}," sniff which ensures a space between each element of a ",{"type":41,"tag":278,"props":4281,"children":4283},{"className":4282},[],[4284],{"type":52,"value":4285},"foreach",{"type":52,"value":4287}," loop and lowercase ",{"type":41,"tag":278,"props":4289,"children":4291},{"className":4290},[],[4292],{"type":52,"value":4293},"keyword",{"type":52,"value":4295},". Compared to the previous example, this rule might be violated in different ways, so as a result, we get more errors to fix, e.g. ",{"type":41,"tag":278,"props":4297,"children":4299},{"className":4298},[],[4300],{"type":52,"value":4301},"Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen",{"type":52,"value":140},{"type":41,"tag":1725,"props":4304,"children":4305},{":tabs":4103},[4306,4441],{"type":41,"tag":287,"props":4307,"children":4310},{"className":4107,"code":4308,"filename":4109,"highlights":4309,"language":3941,"meta":7,"style":7},"class Hooks\n{\n    public static function init(): void {\n        foreach ( [] AS $bar=>$baz ) {\n            echo $baz;\n        }\n    }\n}\n",[341],[4311],{"type":41,"tag":278,"props":4312,"children":4313},{"__ignoreMap":7},[4314,4325,4332,4363,4402,4420,4427,4434],{"type":41,"tag":298,"props":4315,"children":4316},{"class":300,"line":301},[4317,4321],{"type":41,"tag":298,"props":4318,"children":4319},{"style":3648},[4320],{"type":52,"value":674},{"type":41,"tag":298,"props":4322,"children":4323},{"style":4124},[4324],{"type":52,"value":4127},{"type":41,"tag":298,"props":4326,"children":4327},{"class":300,"line":311},[4328],{"type":41,"tag":298,"props":4329,"children":4330},{"style":305},[4331],{"type":52,"value":308},{"type":41,"tag":298,"props":4333,"children":4334},{"class":300,"line":326},[4335,4339,4343,4347,4351,4355,4359],{"type":41,"tag":298,"props":4336,"children":4337},{"style":3648},[4338],{"type":52,"value":4142},{"type":41,"tag":298,"props":4340,"children":4341},{"style":3648},[4342],{"type":52,"value":4147},{"type":41,"tag":298,"props":4344,"children":4345},{"style":3648},[4346],{"type":52,"value":4152},{"type":41,"tag":298,"props":4348,"children":4349},{"style":737},[4350],{"type":52,"value":4157},{"type":41,"tag":298,"props":4352,"children":4353},{"style":305},[4354],{"type":52,"value":4162},{"type":41,"tag":298,"props":4356,"children":4357},{"style":4124},[4358],{"type":52,"value":4167},{"type":41,"tag":298,"props":4360,"children":4361},{"style":305},[4362],{"type":52,"value":4172},{"type":41,"tag":298,"props":4364,"children":4366},{"class":4365,"line":341},[300,728],[4367,4372,4377,4382,4387,4392,4397],{"type":41,"tag":298,"props":4368,"children":4369},{"style":3648},[4370],{"type":52,"value":4371},"        foreach",{"type":41,"tag":298,"props":4373,"children":4374},{"style":305},[4375],{"type":52,"value":4376}," ( [] ",{"type":41,"tag":298,"props":4378,"children":4379},{"style":713},[4380],{"type":52,"value":4381},"AS",{"type":41,"tag":298,"props":4383,"children":4384},{"style":315},[4385],{"type":52,"value":4386}," $bar",{"type":41,"tag":298,"props":4388,"children":4389},{"style":305},[4390],{"type":52,"value":4391},"=>",{"type":41,"tag":298,"props":4393,"children":4394},{"style":315},[4395],{"type":52,"value":4396},"$baz",{"type":41,"tag":298,"props":4398,"children":4399},{"style":305},[4400],{"type":52,"value":4401}," ) {\n",{"type":41,"tag":298,"props":4403,"children":4404},{"class":300,"line":354},[4405,4410,4415],{"type":41,"tag":298,"props":4406,"children":4407},{"style":713},[4408],{"type":52,"value":4409},"            echo",{"type":41,"tag":298,"props":4411,"children":4412},{"style":315},[4413],{"type":52,"value":4414}," $baz",{"type":41,"tag":298,"props":4416,"children":4417},{"style":305},[4418],{"type":52,"value":4419},";\n",{"type":41,"tag":298,"props":4421,"children":4422},{"class":300,"line":367},[4423],{"type":41,"tag":298,"props":4424,"children":4425},{"style":305},[4426],{"type":52,"value":2527},{"type":41,"tag":298,"props":4428,"children":4429},{"class":300,"line":380},[4430],{"type":41,"tag":298,"props":4431,"children":4432},{"style":305},[4433],{"type":52,"value":1511},{"type":41,"tag":298,"props":4435,"children":4436},{"class":300,"line":389},[4437],{"type":41,"tag":298,"props":4438,"children":4439},{"style":305},[4440],{"type":52,"value":490},{"type":41,"tag":287,"props":4442,"children":4445},{"className":1996,"code":4443,"filename":4214,"highlights":4444,"language":1998,"meta":7,"style":7},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n----------------------------------------------------------------------------------------------------------------------------------------\nFOUND 5 ERRORS AFFECTING 1 LINE\n----------------------------------------------------------------------------------------------------------------------------------------\n7 | ERROR | [x] Space found after opening bracket of FOREACH loop (Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen)\n7 | ERROR | [x] Space found before closing bracket of FOREACH loop (Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose)\n7 | ERROR | [x] Expected 1 space before \"=>\"; 0 found (Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceBeforeArrow)\n7 | ERROR | [x] Expected 1 space after \"=>\"; 0 found (Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceAfterArrow)\n7 | ERROR | [x] AS keyword must be lowercase; expected \"as\" but found \"AS\" (Squiz.ControlStructures.ForEachLoopDeclaration.AsNotLower)\n----------------------------------------------------------------------------------------------------------------------------------------\n",[354,367,380,389,398],[4446],{"type":41,"tag":278,"props":4447,"children":4448},{"__ignoreMap":7},[4449,4456,4464,4472,4479,4488,4497,4506,4515,4524],{"type":41,"tag":298,"props":4450,"children":4451},{"class":300,"line":301},[4452],{"type":41,"tag":298,"props":4453,"children":4454},{"style":305},[4455],{"type":52,"value":4227},{"type":41,"tag":298,"props":4457,"children":4458},{"class":300,"line":311},[4459],{"type":41,"tag":298,"props":4460,"children":4461},{"style":315},[4462],{"type":52,"value":4463},"----------------------------------------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":4465,"children":4466},{"class":300,"line":326},[4467],{"type":41,"tag":298,"props":4468,"children":4469},{"style":305},[4470],{"type":52,"value":4471},"FOUND 5 ERRORS AFFECTING 1 LINE\n",{"type":41,"tag":298,"props":4473,"children":4474},{"class":300,"line":341},[4475],{"type":41,"tag":298,"props":4476,"children":4477},{"style":315},[4478],{"type":52,"value":4463},{"type":41,"tag":298,"props":4480,"children":4482},{"class":4481,"line":354},[300,728],[4483],{"type":41,"tag":298,"props":4484,"children":4485},{"style":305},[4486],{"type":52,"value":4487},"7 | ERROR | [x] Space found after opening bracket of FOREACH loop (Squiz.ControlStructures.ForEachLoopDeclaration.SpaceAfterOpen)\n",{"type":41,"tag":298,"props":4489,"children":4491},{"class":4490,"line":367},[300,728],[4492],{"type":41,"tag":298,"props":4493,"children":4494},{"style":305},[4495],{"type":52,"value":4496},"7 | ERROR | [x] Space found before closing bracket of FOREACH loop (Squiz.ControlStructures.ForEachLoopDeclaration.SpaceBeforeClose)\n",{"type":41,"tag":298,"props":4498,"children":4500},{"class":4499,"line":380},[300,728],[4501],{"type":41,"tag":298,"props":4502,"children":4503},{"style":305},[4504],{"type":52,"value":4505},"7 | ERROR | [x] Expected 1 space before \"=>\"; 0 found (Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceBeforeArrow)\n",{"type":41,"tag":298,"props":4507,"children":4509},{"class":4508,"line":389},[300,728],[4510],{"type":41,"tag":298,"props":4511,"children":4512},{"style":305},[4513],{"type":52,"value":4514},"7 | ERROR | [x] Expected 1 space after \"=>\"; 0 found (Squiz.ControlStructures.ForEachLoopDeclaration.NoSpaceAfterArrow)\n",{"type":41,"tag":298,"props":4516,"children":4518},{"class":4517,"line":398},[300,728],[4519],{"type":41,"tag":298,"props":4520,"children":4521},{"style":305},[4522],{"type":52,"value":4523},"7 | ERROR | [x] AS keyword must be lowercase; expected \"as\" but found \"AS\" (Squiz.ControlStructures.ForEachLoopDeclaration.AsNotLower)\n",{"type":41,"tag":298,"props":4525,"children":4526},{"class":300,"line":411},[4527],{"type":41,"tag":298,"props":4528,"children":4529},{"style":315},[4530],{"type":52,"value":4463},{"type":41,"tag":48,"props":4532,"children":4533},{},[4534,4536,4543,4545,4552,4553,4560,4561,4568],{"type":52,"value":4535},"If we want those rules to be respected across the codebase, we can create a new coding standard to ensure that the codebase meets our needs. Of course, there's no need to build them from scratch. PHP Code Sniffer includes ",{"type":41,"tag":55,"props":4537,"children":4540},{"href":4538,"rel":4539},"https://github.com/PHPCSStandards/PHP_CodeSniffer/tree/e0bb06cee41684be1b7be85b275afcffcc85f4e4/src/Standards",[59],[4541],{"type":52,"value":4542},"several standards",{"type":52,"value":4544}," like ",{"type":41,"tag":55,"props":4546,"children":4549},{"href":4547,"rel":4548},"https://www.php-fig.org/psr/psr-1/",[59],[4550],{"type":52,"value":4551},"PSR1",{"type":52,"value":607},{"type":41,"tag":55,"props":4554,"children":4557},{"href":4555,"rel":4556},"https://www.php-fig.org/psr/psr-12/",[59],[4558],{"type":52,"value":4559},"PSR12",{"type":52,"value":607},{"type":41,"tag":55,"props":4562,"children":4565},{"href":4563,"rel":4564},"https://pear.php.net/manual/en/standards.php",[59],[4566],{"type":52,"value":4567},"PEAR",{"type":52,"value":4569},", and a few more within installation, so we can use one of them.",{"type":41,"tag":48,"props":4571,"children":4572},{},[4573,4578,4580,4587,4588,4594,4595,4602,4603,4610],{"type":41,"tag":95,"props":4574,"children":4575},{},[4576],{"type":52,"value":4577},"This is simply the way how the standards are built.",{"type":52,"value":4579}," Just by choosing specific sniffs and adding them to the ruleset. You can simply check them: ",{"type":41,"tag":55,"props":4581,"children":4584},{"href":4582,"rel":4583},"https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/PEAR/ruleset.xml",[59],[4585],{"type":52,"value":4586},"Pear",{"type":52,"value":607},{"type":41,"tag":55,"props":4589,"children":4592},{"href":4590,"rel":4591},"https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/PSR12/ruleset.xml",[59],[4593],{"type":52,"value":4559},{"type":52,"value":607},{"type":41,"tag":55,"props":4596,"children":4599},{"href":4597,"rel":4598},"https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/Squiz/ruleset.xml",[59],[4600],{"type":52,"value":4601},"Squiz",{"type":52,"value":1699},{"type":41,"tag":55,"props":4604,"children":4607},{"href":4605,"rel":4606},"https://github.com/PHPCSStandards/PHP_CodeSniffer/tree/master/src/Standards",[59],[4608],{"type":52,"value":4609},"others",{"type":52,"value":140},{"type":41,"tag":48,"props":4612,"children":4613},{},[4614],{"type":41,"tag":164,"props":4615,"children":4617},{"alt":166,"src":4616},"https://cdn.pragmate.dev/wp-content/uploads/2024/02/ce83539a-d255-43d3-869a-1d8ae55b5974.jpg",[],{"type":41,"tag":79,"props":4619,"children":4620},{},[],{"type":41,"tag":83,"props":4622,"children":4624},{"id":4623},"what-are-available-coding-standards",[4625],{"type":52,"value":4626},"What are available coding standards?",{"type":41,"tag":48,"props":4628,"children":4629},{},[4630,4632,4638],{"type":52,"value":4631},"Personal documentation generated with simple ",{"type":41,"tag":2094,"props":4633,"children":4635},{"type":2094,"dataModal":4634},"L1Goqfa6cs",[4636],{"type":52,"value":4637},"script",{"type":52,"value":4639}," for the sniffs available in the PHP Code Sniffer coding standards to help build an own rulesets and search for errors.",{"type":41,"tag":2373,"props":4641,"children":4642},{"id":4634},[4643,4673,5702,5729],{"type":41,"tag":48,"props":4644,"children":4645},{},[4646,4648,4654,4656,4663,4665,4671],{"type":52,"value":4647},"The simple bash script created for personal needs to list all the sniffs available in the ",{"type":41,"tag":55,"props":4649,"children":4651},{"href":4605,"rel":4650},[59],[4652],{"type":52,"value":4653},"coding standards",{"type":52,"value":4655}," provided by ",{"type":41,"tag":55,"props":4657,"children":4660},{"href":4658,"rel":4659},"https://github.com/squizlabs/PHP_CodeSniffer/tree/master",[59],[4661],{"type":52,"value":4662},"PHP_Code_Sniffer",{"type":52,"value":4664},". It iterates through the standards, list sniffs with ",{"type":41,"tag":278,"props":4666,"children":4668},{"className":4667},[],[4669],{"type":52,"value":4670},"-e",{"type":52,"value":4672}," attribute, exctract sniff codes, and generates docs for each of them.",{"type":41,"tag":287,"props":4674,"children":4676},{"className":1921,"code":4675,"language":1923,"meta":7,"style":7},"#!/bin/bash\n\nSTANDARDS=('Generic' 'Pear' 'PSR1' 'PSR12' 'PSR2' 'Squiz' 'Zend', 'WordPress')\noutput=\"\"\n\nfor standard in \"${STANDARDS[@]}\"; do\n  output+=\"# Standard: $standard\"\n  output+=$'\\n\\n'\n\n  list=$(vendor/bin/phpcs --standard=$standard -e)\n  codes=$(echo \"$list\" | grep -E '^[[:space:]]{2,}[A-Za-z0-9.]+' | sed 's/^[[:space:]]*//')\n\n  IFS=$'\\n'\n  for code in $codes; do\n    stnd=$(echo \"$code\" | cut -d'.' -f1)\n    category=$(echo \"$code\" | cut -d'.' -f2)\n    sniff=$(echo \"$code\" | cut -d'.' -f3)\n    url=\"https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/${stnd}/Sniffs/${category}/${sniff}Sniff.php\"\n\n    output+=$'\\n\\n'\n    output+=\"\\`$code\\` | [[ref]($url)]\"\n    output+=$(vendor/bin/phpcs --standard=$standard --generator=markdown --sniffs=\"$code\")\n    output+=$'\\n\\n---\\n\\n'\n  done\ndone\n\noutput=$(echo \"$output\" | sed -E \"s/Documentation generated on [[:alpha:]]+, [0-9]+ [[:alpha:]]+ [0-9]+ [0-9]+:[0-9]+:[0-9]+ \\+[0-9]+ by \\[PHP_CodeSniffer [0-9]+\\.[0-9]+\\.[0-9]+\\](.*)//\")\noutput=$(echo \"$output\" | sed -E \"s/# (Generic|Pear|PSR1|PSR12|PSR2|Squiz|Zend|WordPress) Coding Standard//\")\noutput=$(echo \"$output\" | sed '/^$/N;/^\\n$/D')\noutput=$(echo \"$output\" | sed '/^##/d')\n\necho \"$output\"\n",[4677],{"type":41,"tag":278,"props":4678,"children":4679},{"__ignoreMap":7},[4680,4688,4695,4755,4772,4779,4831,4859,4885,4892,4932,5005,5012,5037,5067,5128,5185,5242,5289,5296,5320,5363,5416,5448,5456,5464,5471,5524,5576,5625,5674,5682],{"type":41,"tag":298,"props":4681,"children":4682},{"class":300,"line":301},[4683],{"type":41,"tag":298,"props":4684,"children":4685},{"style":3515},[4686],{"type":52,"value":4687},"#!/bin/bash\n",{"type":41,"tag":298,"props":4689,"children":4690},{"class":300,"line":311},[4691],{"type":41,"tag":298,"props":4692,"children":4693},{"emptyLinePlaceholder":36},[4694],{"type":52,"value":2018},{"type":41,"tag":298,"props":4696,"children":4697},{"class":300,"line":326},[4698,4703,4707,4711,4716,4721,4726,4731,4736,4741,4746,4751],{"type":41,"tag":298,"props":4699,"children":4700},{"style":315},[4701],{"type":52,"value":4702},"STANDARDS",{"type":41,"tag":298,"props":4704,"children":4705},{"style":713},[4706],{"type":52,"value":3710},{"type":41,"tag":298,"props":4708,"children":4709},{"style":305},[4710],{"type":52,"value":1751},{"type":41,"tag":298,"props":4712,"children":4713},{"style":330},[4714],{"type":52,"value":4715},"'Generic'",{"type":41,"tag":298,"props":4717,"children":4718},{"style":330},[4719],{"type":52,"value":4720}," 'Pear'",{"type":41,"tag":298,"props":4722,"children":4723},{"style":330},[4724],{"type":52,"value":4725}," 'PSR1'",{"type":41,"tag":298,"props":4727,"children":4728},{"style":330},[4729],{"type":52,"value":4730}," 'PSR12'",{"type":41,"tag":298,"props":4732,"children":4733},{"style":330},[4734],{"type":52,"value":4735}," 'PSR2'",{"type":41,"tag":298,"props":4737,"children":4738},{"style":330},[4739],{"type":52,"value":4740}," 'Squiz'",{"type":41,"tag":298,"props":4742,"children":4743},{"style":330},[4744],{"type":52,"value":4745}," 'Zend',",{"type":41,"tag":298,"props":4747,"children":4748},{"style":330},[4749],{"type":52,"value":4750}," 'WordPress'",{"type":41,"tag":298,"props":4752,"children":4753},{"style":305},[4754],{"type":52,"value":3620},{"type":41,"tag":298,"props":4756,"children":4757},{"class":300,"line":341},[4758,4763,4767],{"type":41,"tag":298,"props":4759,"children":4760},{"style":315},[4761],{"type":52,"value":4762},"output",{"type":41,"tag":298,"props":4764,"children":4765},{"style":713},[4766],{"type":52,"value":3710},{"type":41,"tag":298,"props":4768,"children":4769},{"style":330},[4770],{"type":52,"value":4771},"\"\"\n",{"type":41,"tag":298,"props":4773,"children":4774},{"class":300,"line":354},[4775],{"type":41,"tag":298,"props":4776,"children":4777},{"emptyLinePlaceholder":36},[4778],{"type":52,"value":2018},{"type":41,"tag":298,"props":4780,"children":4781},{"class":300,"line":367},[4782,4787,4792,4797,4802,4806,4811,4816,4821,4826],{"type":41,"tag":298,"props":4783,"children":4784},{"style":3648},[4785],{"type":52,"value":4786},"for",{"type":41,"tag":298,"props":4788,"children":4789},{"style":315},[4790],{"type":52,"value":4791}," standard",{"type":41,"tag":298,"props":4793,"children":4794},{"style":3648},[4795],{"type":52,"value":4796}," in",{"type":41,"tag":298,"props":4798,"children":4799},{"style":330},[4800],{"type":52,"value":4801}," \"${",{"type":41,"tag":298,"props":4803,"children":4804},{"style":315},[4805],{"type":52,"value":4702},{"type":41,"tag":298,"props":4807,"children":4808},{"style":330},[4809],{"type":52,"value":4810},"[",{"type":41,"tag":298,"props":4812,"children":4813},{"style":305},[4814],{"type":52,"value":4815},"@",{"type":41,"tag":298,"props":4817,"children":4818},{"style":330},[4819],{"type":52,"value":4820},"]}\"",{"type":41,"tag":298,"props":4822,"children":4823},{"style":305},[4824],{"type":52,"value":4825},"; ",{"type":41,"tag":298,"props":4827,"children":4828},{"style":3648},[4829],{"type":52,"value":4830},"do\n",{"type":41,"tag":298,"props":4832,"children":4833},{"class":300,"line":380},[4834,4839,4844,4849,4854],{"type":41,"tag":298,"props":4835,"children":4836},{"style":315},[4837],{"type":52,"value":4838},"  output",{"type":41,"tag":298,"props":4840,"children":4841},{"style":3648},[4842],{"type":52,"value":4843},"+=",{"type":41,"tag":298,"props":4845,"children":4846},{"style":330},[4847],{"type":52,"value":4848},"\"# Standard: ",{"type":41,"tag":298,"props":4850,"children":4851},{"style":315},[4852],{"type":52,"value":4853},"$standard",{"type":41,"tag":298,"props":4855,"children":4856},{"style":330},[4857],{"type":52,"value":4858},"\"\n",{"type":41,"tag":298,"props":4860,"children":4861},{"class":300,"line":389},[4862,4866,4870,4875,4880],{"type":41,"tag":298,"props":4863,"children":4864},{"style":315},[4865],{"type":52,"value":4838},{"type":41,"tag":298,"props":4867,"children":4868},{"style":3648},[4869],{"type":52,"value":4843},{"type":41,"tag":298,"props":4871,"children":4872},{"style":330},[4873],{"type":52,"value":4874},"$'",{"type":41,"tag":298,"props":4876,"children":4877},{"style":713},[4878],{"type":52,"value":4879},"\\n\\n",{"type":41,"tag":298,"props":4881,"children":4882},{"style":330},[4883],{"type":52,"value":4884},"'\n",{"type":41,"tag":298,"props":4886,"children":4887},{"class":300,"line":398},[4888],{"type":41,"tag":298,"props":4889,"children":4890},{"emptyLinePlaceholder":36},[4891],{"type":52,"value":2018},{"type":41,"tag":298,"props":4893,"children":4894},{"class":300,"line":411},[4895,4900,4904,4909,4914,4919,4923,4928],{"type":41,"tag":298,"props":4896,"children":4897},{"style":315},[4898],{"type":52,"value":4899},"  list",{"type":41,"tag":298,"props":4901,"children":4902},{"style":713},[4903],{"type":52,"value":3710},{"type":41,"tag":298,"props":4905,"children":4906},{"style":305},[4907],{"type":52,"value":4908},"$(",{"type":41,"tag":298,"props":4910,"children":4911},{"style":737},[4912],{"type":52,"value":4913},"vendor/bin/phpcs",{"type":41,"tag":298,"props":4915,"children":4916},{"style":1376},[4917],{"type":52,"value":4918}," --standard=",{"type":41,"tag":298,"props":4920,"children":4921},{"style":315},[4922],{"type":52,"value":4853},{"type":41,"tag":298,"props":4924,"children":4925},{"style":1376},[4926],{"type":52,"value":4927}," -e",{"type":41,"tag":298,"props":4929,"children":4930},{"style":305},[4931],{"type":52,"value":3620},{"type":41,"tag":298,"props":4933,"children":4934},{"class":300,"line":424},[4935,4940,4944,4948,4953,4958,4963,4967,4972,4977,4982,4987,4991,4996,5001],{"type":41,"tag":298,"props":4936,"children":4937},{"style":315},[4938],{"type":52,"value":4939},"  codes",{"type":41,"tag":298,"props":4941,"children":4942},{"style":713},[4943],{"type":52,"value":3710},{"type":41,"tag":298,"props":4945,"children":4946},{"style":305},[4947],{"type":52,"value":4908},{"type":41,"tag":298,"props":4949,"children":4950},{"style":713},[4951],{"type":52,"value":4952},"echo",{"type":41,"tag":298,"props":4954,"children":4955},{"style":330},[4956],{"type":52,"value":4957}," \"",{"type":41,"tag":298,"props":4959,"children":4960},{"style":315},[4961],{"type":52,"value":4962},"$list",{"type":41,"tag":298,"props":4964,"children":4965},{"style":330},[4966],{"type":52,"value":2510},{"type":41,"tag":298,"props":4968,"children":4969},{"style":305},[4970],{"type":52,"value":4971}," | ",{"type":41,"tag":298,"props":4973,"children":4974},{"style":737},[4975],{"type":52,"value":4976},"grep",{"type":41,"tag":298,"props":4978,"children":4979},{"style":1376},[4980],{"type":52,"value":4981}," -E",{"type":41,"tag":298,"props":4983,"children":4984},{"style":330},[4985],{"type":52,"value":4986}," '^[[:space:]]{2,}[A-Za-z0-9.]+'",{"type":41,"tag":298,"props":4988,"children":4989},{"style":305},[4990],{"type":52,"value":4971},{"type":41,"tag":298,"props":4992,"children":4993},{"style":737},[4994],{"type":52,"value":4995},"sed",{"type":41,"tag":298,"props":4997,"children":4998},{"style":330},[4999],{"type":52,"value":5000}," 's/^[[:space:]]*//'",{"type":41,"tag":298,"props":5002,"children":5003},{"style":305},[5004],{"type":52,"value":3620},{"type":41,"tag":298,"props":5006,"children":5007},{"class":300,"line":433},[5008],{"type":41,"tag":298,"props":5009,"children":5010},{"emptyLinePlaceholder":36},[5011],{"type":52,"value":2018},{"type":41,"tag":298,"props":5013,"children":5014},{"class":300,"line":441},[5015,5020,5024,5028,5033],{"type":41,"tag":298,"props":5016,"children":5017},{"style":315},[5018],{"type":52,"value":5019},"  IFS",{"type":41,"tag":298,"props":5021,"children":5022},{"style":713},[5023],{"type":52,"value":3710},{"type":41,"tag":298,"props":5025,"children":5026},{"style":330},[5027],{"type":52,"value":4874},{"type":41,"tag":298,"props":5029,"children":5030},{"style":713},[5031],{"type":52,"value":5032},"\\n",{"type":41,"tag":298,"props":5034,"children":5035},{"style":330},[5036],{"type":52,"value":4884},{"type":41,"tag":298,"props":5038,"children":5039},{"class":300,"line":454},[5040,5045,5050,5054,5059,5063],{"type":41,"tag":298,"props":5041,"children":5042},{"style":3648},[5043],{"type":52,"value":5044},"  for",{"type":41,"tag":298,"props":5046,"children":5047},{"style":315},[5048],{"type":52,"value":5049}," code",{"type":41,"tag":298,"props":5051,"children":5052},{"style":3648},[5053],{"type":52,"value":4796},{"type":41,"tag":298,"props":5055,"children":5056},{"style":315},[5057],{"type":52,"value":5058}," $codes",{"type":41,"tag":298,"props":5060,"children":5061},{"style":305},[5062],{"type":52,"value":4825},{"type":41,"tag":298,"props":5064,"children":5065},{"style":3648},[5066],{"type":52,"value":4830},{"type":41,"tag":298,"props":5068,"children":5069},{"class":300,"line":467},[5070,5075,5079,5083,5087,5091,5096,5100,5104,5109,5114,5119,5124],{"type":41,"tag":298,"props":5071,"children":5072},{"style":315},[5073],{"type":52,"value":5074},"    stnd",{"type":41,"tag":298,"props":5076,"children":5077},{"style":713},[5078],{"type":52,"value":3710},{"type":41,"tag":298,"props":5080,"children":5081},{"style":305},[5082],{"type":52,"value":4908},{"type":41,"tag":298,"props":5084,"children":5085},{"style":713},[5086],{"type":52,"value":4952},{"type":41,"tag":298,"props":5088,"children":5089},{"style":330},[5090],{"type":52,"value":4957},{"type":41,"tag":298,"props":5092,"children":5093},{"style":315},[5094],{"type":52,"value":5095},"$code",{"type":41,"tag":298,"props":5097,"children":5098},{"style":330},[5099],{"type":52,"value":2510},{"type":41,"tag":298,"props":5101,"children":5102},{"style":305},[5103],{"type":52,"value":4971},{"type":41,"tag":298,"props":5105,"children":5106},{"style":737},[5107],{"type":52,"value":5108},"cut",{"type":41,"tag":298,"props":5110,"children":5111},{"style":1376},[5112],{"type":52,"value":5113}," -d",{"type":41,"tag":298,"props":5115,"children":5116},{"style":330},[5117],{"type":52,"value":5118},"'.'",{"type":41,"tag":298,"props":5120,"children":5121},{"style":1376},[5122],{"type":52,"value":5123}," -f1",{"type":41,"tag":298,"props":5125,"children":5126},{"style":305},[5127],{"type":52,"value":3620},{"type":41,"tag":298,"props":5129,"children":5130},{"class":300,"line":476},[5131,5136,5140,5144,5148,5152,5156,5160,5164,5168,5172,5176,5181],{"type":41,"tag":298,"props":5132,"children":5133},{"style":315},[5134],{"type":52,"value":5135},"    category",{"type":41,"tag":298,"props":5137,"children":5138},{"style":713},[5139],{"type":52,"value":3710},{"type":41,"tag":298,"props":5141,"children":5142},{"style":305},[5143],{"type":52,"value":4908},{"type":41,"tag":298,"props":5145,"children":5146},{"style":713},[5147],{"type":52,"value":4952},{"type":41,"tag":298,"props":5149,"children":5150},{"style":330},[5151],{"type":52,"value":4957},{"type":41,"tag":298,"props":5153,"children":5154},{"style":315},[5155],{"type":52,"value":5095},{"type":41,"tag":298,"props":5157,"children":5158},{"style":330},[5159],{"type":52,"value":2510},{"type":41,"tag":298,"props":5161,"children":5162},{"style":305},[5163],{"type":52,"value":4971},{"type":41,"tag":298,"props":5165,"children":5166},{"style":737},[5167],{"type":52,"value":5108},{"type":41,"tag":298,"props":5169,"children":5170},{"style":1376},[5171],{"type":52,"value":5113},{"type":41,"tag":298,"props":5173,"children":5174},{"style":330},[5175],{"type":52,"value":5118},{"type":41,"tag":298,"props":5177,"children":5178},{"style":1376},[5179],{"type":52,"value":5180}," -f2",{"type":41,"tag":298,"props":5182,"children":5183},{"style":305},[5184],{"type":52,"value":3620},{"type":41,"tag":298,"props":5186,"children":5187},{"class":300,"line":484},[5188,5193,5197,5201,5205,5209,5213,5217,5221,5225,5229,5233,5238],{"type":41,"tag":298,"props":5189,"children":5190},{"style":315},[5191],{"type":52,"value":5192},"    sniff",{"type":41,"tag":298,"props":5194,"children":5195},{"style":713},[5196],{"type":52,"value":3710},{"type":41,"tag":298,"props":5198,"children":5199},{"style":305},[5200],{"type":52,"value":4908},{"type":41,"tag":298,"props":5202,"children":5203},{"style":713},[5204],{"type":52,"value":4952},{"type":41,"tag":298,"props":5206,"children":5207},{"style":330},[5208],{"type":52,"value":4957},{"type":41,"tag":298,"props":5210,"children":5211},{"style":315},[5212],{"type":52,"value":5095},{"type":41,"tag":298,"props":5214,"children":5215},{"style":330},[5216],{"type":52,"value":2510},{"type":41,"tag":298,"props":5218,"children":5219},{"style":305},[5220],{"type":52,"value":4971},{"type":41,"tag":298,"props":5222,"children":5223},{"style":737},[5224],{"type":52,"value":5108},{"type":41,"tag":298,"props":5226,"children":5227},{"style":1376},[5228],{"type":52,"value":5113},{"type":41,"tag":298,"props":5230,"children":5231},{"style":330},[5232],{"type":52,"value":5118},{"type":41,"tag":298,"props":5234,"children":5235},{"style":1376},[5236],{"type":52,"value":5237}," -f3",{"type":41,"tag":298,"props":5239,"children":5240},{"style":305},[5241],{"type":52,"value":3620},{"type":41,"tag":298,"props":5243,"children":5244},{"class":300,"line":2644},[5245,5250,5254,5259,5264,5269,5274,5279,5284],{"type":41,"tag":298,"props":5246,"children":5247},{"style":315},[5248],{"type":52,"value":5249},"    url",{"type":41,"tag":298,"props":5251,"children":5252},{"style":713},[5253],{"type":52,"value":3710},{"type":41,"tag":298,"props":5255,"children":5256},{"style":330},[5257],{"type":52,"value":5258},"\"https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/src/Standards/${",{"type":41,"tag":298,"props":5260,"children":5261},{"style":315},[5262],{"type":52,"value":5263},"stnd",{"type":41,"tag":298,"props":5265,"children":5266},{"style":330},[5267],{"type":52,"value":5268},"}/Sniffs/${",{"type":41,"tag":298,"props":5270,"children":5271},{"style":315},[5272],{"type":52,"value":5273},"category",{"type":41,"tag":298,"props":5275,"children":5276},{"style":330},[5277],{"type":52,"value":5278},"}/${",{"type":41,"tag":298,"props":5280,"children":5281},{"style":315},[5282],{"type":52,"value":5283},"sniff",{"type":41,"tag":298,"props":5285,"children":5286},{"style":330},[5287],{"type":52,"value":5288},"}Sniff.php\"\n",{"type":41,"tag":298,"props":5290,"children":5291},{"class":300,"line":2666},[5292],{"type":41,"tag":298,"props":5293,"children":5294},{"emptyLinePlaceholder":36},[5295],{"type":52,"value":2018},{"type":41,"tag":298,"props":5297,"children":5298},{"class":300,"line":2684},[5299,5304,5308,5312,5316],{"type":41,"tag":298,"props":5300,"children":5301},{"style":315},[5302],{"type":52,"value":5303},"    output",{"type":41,"tag":298,"props":5305,"children":5306},{"style":3648},[5307],{"type":52,"value":4843},{"type":41,"tag":298,"props":5309,"children":5310},{"style":330},[5311],{"type":52,"value":4874},{"type":41,"tag":298,"props":5313,"children":5314},{"style":713},[5315],{"type":52,"value":4879},{"type":41,"tag":298,"props":5317,"children":5318},{"style":330},[5319],{"type":52,"value":4884},{"type":41,"tag":298,"props":5321,"children":5322},{"class":300,"line":2692},[5323,5327,5331,5335,5340,5344,5348,5353,5358],{"type":41,"tag":298,"props":5324,"children":5325},{"style":315},[5326],{"type":52,"value":5303},{"type":41,"tag":298,"props":5328,"children":5329},{"style":3648},[5330],{"type":52,"value":4843},{"type":41,"tag":298,"props":5332,"children":5333},{"style":330},[5334],{"type":52,"value":2510},{"type":41,"tag":298,"props":5336,"children":5337},{"style":713},[5338],{"type":52,"value":5339},"\\`",{"type":41,"tag":298,"props":5341,"children":5342},{"style":315},[5343],{"type":52,"value":5095},{"type":41,"tag":298,"props":5345,"children":5346},{"style":713},[5347],{"type":52,"value":5339},{"type":41,"tag":298,"props":5349,"children":5350},{"style":330},[5351],{"type":52,"value":5352}," | [[ref](",{"type":41,"tag":298,"props":5354,"children":5355},{"style":315},[5356],{"type":52,"value":5357},"$url",{"type":41,"tag":298,"props":5359,"children":5360},{"style":330},[5361],{"type":52,"value":5362},")]\"\n",{"type":41,"tag":298,"props":5364,"children":5365},{"class":300,"line":2705},[5366,5370,5374,5378,5382,5386,5390,5395,5400,5404,5408,5412],{"type":41,"tag":298,"props":5367,"children":5368},{"style":315},[5369],{"type":52,"value":5303},{"type":41,"tag":298,"props":5371,"children":5372},{"style":3648},[5373],{"type":52,"value":4843},{"type":41,"tag":298,"props":5375,"children":5376},{"style":305},[5377],{"type":52,"value":4908},{"type":41,"tag":298,"props":5379,"children":5380},{"style":737},[5381],{"type":52,"value":4913},{"type":41,"tag":298,"props":5383,"children":5384},{"style":1376},[5385],{"type":52,"value":4918},{"type":41,"tag":298,"props":5387,"children":5388},{"style":315},[5389],{"type":52,"value":4853},{"type":41,"tag":298,"props":5391,"children":5392},{"style":1376},[5393],{"type":52,"value":5394}," --generator=markdown",{"type":41,"tag":298,"props":5396,"children":5397},{"style":1376},[5398],{"type":52,"value":5399}," --sniffs=",{"type":41,"tag":298,"props":5401,"children":5402},{"style":330},[5403],{"type":52,"value":2510},{"type":41,"tag":298,"props":5405,"children":5406},{"style":315},[5407],{"type":52,"value":5095},{"type":41,"tag":298,"props":5409,"children":5410},{"style":330},[5411],{"type":52,"value":2510},{"type":41,"tag":298,"props":5413,"children":5414},{"style":305},[5415],{"type":52,"value":3620},{"type":41,"tag":298,"props":5417,"children":5418},{"class":300,"line":2727},[5419,5423,5427,5431,5435,5440,5444],{"type":41,"tag":298,"props":5420,"children":5421},{"style":315},[5422],{"type":52,"value":5303},{"type":41,"tag":298,"props":5424,"children":5425},{"style":3648},[5426],{"type":52,"value":4843},{"type":41,"tag":298,"props":5428,"children":5429},{"style":330},[5430],{"type":52,"value":4874},{"type":41,"tag":298,"props":5432,"children":5433},{"style":713},[5434],{"type":52,"value":4879},{"type":41,"tag":298,"props":5436,"children":5437},{"style":330},[5438],{"type":52,"value":5439},"---",{"type":41,"tag":298,"props":5441,"children":5442},{"style":713},[5443],{"type":52,"value":4879},{"type":41,"tag":298,"props":5445,"children":5446},{"style":330},[5447],{"type":52,"value":4884},{"type":41,"tag":298,"props":5449,"children":5450},{"class":300,"line":2745},[5451],{"type":41,"tag":298,"props":5452,"children":5453},{"style":3648},[5454],{"type":52,"value":5455},"  done\n",{"type":41,"tag":298,"props":5457,"children":5458},{"class":300,"line":2753},[5459],{"type":41,"tag":298,"props":5460,"children":5461},{"style":3648},[5462],{"type":52,"value":5463},"done\n",{"type":41,"tag":298,"props":5465,"children":5466},{"class":300,"line":2766},[5467],{"type":41,"tag":298,"props":5468,"children":5469},{"emptyLinePlaceholder":36},[5470],{"type":52,"value":2018},{"type":41,"tag":298,"props":5472,"children":5473},{"class":300,"line":2784},[5474,5478,5482,5486,5490,5494,5499,5503,5507,5511,5515,5520],{"type":41,"tag":298,"props":5475,"children":5476},{"style":315},[5477],{"type":52,"value":4762},{"type":41,"tag":298,"props":5479,"children":5480},{"style":713},[5481],{"type":52,"value":3710},{"type":41,"tag":298,"props":5483,"children":5484},{"style":305},[5485],{"type":52,"value":4908},{"type":41,"tag":298,"props":5487,"children":5488},{"style":713},[5489],{"type":52,"value":4952},{"type":41,"tag":298,"props":5491,"children":5492},{"style":330},[5493],{"type":52,"value":4957},{"type":41,"tag":298,"props":5495,"children":5496},{"style":315},[5497],{"type":52,"value":5498},"$output",{"type":41,"tag":298,"props":5500,"children":5501},{"style":330},[5502],{"type":52,"value":2510},{"type":41,"tag":298,"props":5504,"children":5505},{"style":305},[5506],{"type":52,"value":4971},{"type":41,"tag":298,"props":5508,"children":5509},{"style":737},[5510],{"type":52,"value":4995},{"type":41,"tag":298,"props":5512,"children":5513},{"style":1376},[5514],{"type":52,"value":4981},{"type":41,"tag":298,"props":5516,"children":5517},{"style":330},[5518],{"type":52,"value":5519}," \"s/Documentation generated on [[:alpha:]]+, [0-9]+ [[:alpha:]]+ [0-9]+ [0-9]+:[0-9]+:[0-9]+ \\+[0-9]+ by \\[PHP_CodeSniffer [0-9]+\\.[0-9]+\\.[0-9]+\\](.*)//\"",{"type":41,"tag":298,"props":5521,"children":5522},{"style":305},[5523],{"type":52,"value":3620},{"type":41,"tag":298,"props":5525,"children":5526},{"class":300,"line":2792},[5527,5531,5535,5539,5543,5547,5551,5555,5559,5563,5567,5572],{"type":41,"tag":298,"props":5528,"children":5529},{"style":315},[5530],{"type":52,"value":4762},{"type":41,"tag":298,"props":5532,"children":5533},{"style":713},[5534],{"type":52,"value":3710},{"type":41,"tag":298,"props":5536,"children":5537},{"style":305},[5538],{"type":52,"value":4908},{"type":41,"tag":298,"props":5540,"children":5541},{"style":713},[5542],{"type":52,"value":4952},{"type":41,"tag":298,"props":5544,"children":5545},{"style":330},[5546],{"type":52,"value":4957},{"type":41,"tag":298,"props":5548,"children":5549},{"style":315},[5550],{"type":52,"value":5498},{"type":41,"tag":298,"props":5552,"children":5553},{"style":330},[5554],{"type":52,"value":2510},{"type":41,"tag":298,"props":5556,"children":5557},{"style":305},[5558],{"type":52,"value":4971},{"type":41,"tag":298,"props":5560,"children":5561},{"style":737},[5562],{"type":52,"value":4995},{"type":41,"tag":298,"props":5564,"children":5565},{"style":1376},[5566],{"type":52,"value":4981},{"type":41,"tag":298,"props":5568,"children":5569},{"style":330},[5570],{"type":52,"value":5571}," \"s/# (Generic|Pear|PSR1|PSR12|PSR2|Squiz|Zend|WordPress) Coding Standard//\"",{"type":41,"tag":298,"props":5573,"children":5574},{"style":305},[5575],{"type":52,"value":3620},{"type":41,"tag":298,"props":5577,"children":5579},{"class":300,"line":5578},29,[5580,5584,5588,5592,5596,5600,5604,5608,5612,5616,5621],{"type":41,"tag":298,"props":5581,"children":5582},{"style":315},[5583],{"type":52,"value":4762},{"type":41,"tag":298,"props":5585,"children":5586},{"style":713},[5587],{"type":52,"value":3710},{"type":41,"tag":298,"props":5589,"children":5590},{"style":305},[5591],{"type":52,"value":4908},{"type":41,"tag":298,"props":5593,"children":5594},{"style":713},[5595],{"type":52,"value":4952},{"type":41,"tag":298,"props":5597,"children":5598},{"style":330},[5599],{"type":52,"value":4957},{"type":41,"tag":298,"props":5601,"children":5602},{"style":315},[5603],{"type":52,"value":5498},{"type":41,"tag":298,"props":5605,"children":5606},{"style":330},[5607],{"type":52,"value":2510},{"type":41,"tag":298,"props":5609,"children":5610},{"style":305},[5611],{"type":52,"value":4971},{"type":41,"tag":298,"props":5613,"children":5614},{"style":737},[5615],{"type":52,"value":4995},{"type":41,"tag":298,"props":5617,"children":5618},{"style":330},[5619],{"type":52,"value":5620}," '/^$/N;/^\\n$/D'",{"type":41,"tag":298,"props":5622,"children":5623},{"style":305},[5624],{"type":52,"value":3620},{"type":41,"tag":298,"props":5626,"children":5628},{"class":300,"line":5627},30,[5629,5633,5637,5641,5645,5649,5653,5657,5661,5665,5670],{"type":41,"tag":298,"props":5630,"children":5631},{"style":315},[5632],{"type":52,"value":4762},{"type":41,"tag":298,"props":5634,"children":5635},{"style":713},[5636],{"type":52,"value":3710},{"type":41,"tag":298,"props":5638,"children":5639},{"style":305},[5640],{"type":52,"value":4908},{"type":41,"tag":298,"props":5642,"children":5643},{"style":713},[5644],{"type":52,"value":4952},{"type":41,"tag":298,"props":5646,"children":5647},{"style":330},[5648],{"type":52,"value":4957},{"type":41,"tag":298,"props":5650,"children":5651},{"style":315},[5652],{"type":52,"value":5498},{"type":41,"tag":298,"props":5654,"children":5655},{"style":330},[5656],{"type":52,"value":2510},{"type":41,"tag":298,"props":5658,"children":5659},{"style":305},[5660],{"type":52,"value":4971},{"type":41,"tag":298,"props":5662,"children":5663},{"style":737},[5664],{"type":52,"value":4995},{"type":41,"tag":298,"props":5666,"children":5667},{"style":330},[5668],{"type":52,"value":5669}," '/^##/d'",{"type":41,"tag":298,"props":5671,"children":5672},{"style":305},[5673],{"type":52,"value":3620},{"type":41,"tag":298,"props":5675,"children":5677},{"class":300,"line":5676},31,[5678],{"type":41,"tag":298,"props":5679,"children":5680},{"emptyLinePlaceholder":36},[5681],{"type":52,"value":2018},{"type":41,"tag":298,"props":5683,"children":5685},{"class":300,"line":5684},32,[5686,5690,5694,5698],{"type":41,"tag":298,"props":5687,"children":5688},{"style":713},[5689],{"type":52,"value":4952},{"type":41,"tag":298,"props":5691,"children":5692},{"style":330},[5693],{"type":52,"value":4957},{"type":41,"tag":298,"props":5695,"children":5696},{"style":315},[5697],{"type":52,"value":5498},{"type":41,"tag":298,"props":5699,"children":5700},{"style":330},[5701],{"type":52,"value":4858},{"type":41,"tag":287,"props":5703,"children":5707},{"className":5704,"code":5705,"language":5706,"meta":7,"style":7},"language-shell shiki shiki-themes one-dark-pro","./docs.sh > docs.md\n","shell",[5708],{"type":41,"tag":278,"props":5709,"children":5710},{"__ignoreMap":7},[5711],{"type":41,"tag":298,"props":5712,"children":5713},{"class":300,"line":301},[5714,5719,5724],{"type":41,"tag":298,"props":5715,"children":5716},{"style":737},[5717],{"type":52,"value":5718},"./docs.sh",{"type":41,"tag":298,"props":5720,"children":5721},{"style":305},[5722],{"type":52,"value":5723}," > ",{"type":41,"tag":298,"props":5725,"children":5726},{"style":330},[5727],{"type":52,"value":5728},"docs.md\n",{"type":41,"tag":48,"props":5730,"children":5731},{},[5732],{"type":41,"tag":55,"props":5733,"children":5736},{"href":5734,"rel":5735},"https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/317",[59],[5737],{"type":52,"value":5734},{"type":41,"tag":111,"props":5739,"children":5741},{"url":5740},"/php/phpcs/generic",[],{"type":41,"tag":111,"props":5743,"children":5745},{"url":5744},"/php/phpcs/pear",[],{"type":41,"tag":111,"props":5747,"children":5749},{"url":5748},"/php/phpcs/psr1",[],{"type":41,"tag":111,"props":5751,"children":5753},{"url":5752},"/php/phpcs/psr2",[],{"type":41,"tag":111,"props":5755,"children":5757},{"url":5756},"/php/phpcs/psr12",[],{"type":41,"tag":111,"props":5759,"children":5761},{"url":5760},"/php/phpcs/squiz",[],{"type":41,"tag":111,"props":5763,"children":5765},{"url":5764},"/php/phpcs/zend",[],{"type":41,"tag":111,"props":5767,"children":5769},{"url":5768},"/php/phpcs/wordpress",[],{"type":41,"tag":79,"props":5771,"children":5772},{},[],{"type":41,"tag":83,"props":5774,"children":5776},{"id":5775},"how-to-install-php-code-sniffer",[5777],{"type":52,"value":5778},"How to install PHP Code Sniffer?",{"type":41,"tag":48,"props":5780,"children":5781},{},[5782,5784,5791,5793,5800,5802,5808,5810,5816,5818,5824],{"type":52,"value":5783},"We can install the tool globally using ",{"type":41,"tag":55,"props":5785,"children":5788},{"href":5786,"rel":5787},"https://github.com/squizlabs/PHP_CodeSniffer#installation",[59],[5789],{"type":52,"value":5790},"official instructions",{"type":52,"value":5792}," or ",{"type":41,"tag":55,"props":5794,"children":5797},{"href":5795,"rel":5796},"https://formulae.brew.sh/formula/php-code-sniffer#default",[59],[5798],{"type":52,"value":5799},"Homebrew",{"type":52,"value":5801},", but here, we’ll go with local installation using  ",{"type":41,"tag":278,"props":5803,"children":5805},{"className":5804},[],[5806],{"type":52,"value":5807},"composer",{"type":52,"value":5809},". Open the terminal, go to the theme or plugin directory, and add PHP Code Sniffer to your codebase with ",{"type":41,"tag":278,"props":5811,"children":5813},{"className":5812},[],[5814],{"type":52,"value":5815},"composer require",{"type":52,"value":5817}," command. Remember to do it with ",{"type":41,"tag":278,"props":5819,"children":5821},{"className":5820},[],[5822],{"type":52,"value":5823},"--dev",{"type":52,"value":5825}," flag to skip the package in the production release!",{"type":41,"tag":287,"props":5827,"children":5829},{"className":1996,"code":5828,"language":1998,"meta":7,"style":7},"composer require squizlabs/php_codesniffer --dev\n",[5830],{"type":41,"tag":278,"props":5831,"children":5832},{"__ignoreMap":7},[5833],{"type":41,"tag":298,"props":5834,"children":5835},{"class":300,"line":301},[5836],{"type":41,"tag":298,"props":5837,"children":5838},{"style":305},[5839],{"type":52,"value":5828},{"type":41,"tag":79,"props":5841,"children":5842},{},[],{"type":41,"tag":83,"props":5844,"children":5846},{"id":5845},"how-to-use-php-code-sniffer",[5847],{"type":52,"value":5848},"How to use PHP Code Sniffer?",{"type":41,"tag":48,"props":5850,"children":5851},{},[5852,5854,5859,5861,5866],{"type":52,"value":5853},"The simplest way to search for the violations in our code is to use the ",{"type":41,"tag":278,"props":5855,"children":5857},{"className":5856},[],[5858],{"type":52,"value":4913},{"type":52,"value":5860}," script, provide the location to check - the file or directory - and specify the coding rules. ",{"type":41,"tag":95,"props":5862,"children":5863},{},[5864],{"type":52,"value":5865},"The tool will check all the files there and list all the problems with their exact location.",{"type":52,"value":5867}," We can navigate through them and fix all the problems manually one by one.",{"type":41,"tag":287,"props":5869,"children":5872},{"className":1996,"code":5870,"highlights":5871,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs app/Core/Hooks.php --standard=PSR12\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n---------------------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES\n---------------------------------------------------------------------------------------------------------\n  1 | ERROR   | [x] Header blocks must be separated by a single blank line\n  6 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters\n  8 | ERROR   | [x] Opening brace should be on a new line\n---------------------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n---------------------------------------------------------------------------------------------------------\n",[380,389,398],[5873],{"type":41,"tag":278,"props":5874,"children":5875},{"__ignoreMap":7},[5876,5884,5891,5898,5906,5914,5921,5930,5939,5948,5955,5963],{"type":41,"tag":298,"props":5877,"children":5878},{"class":300,"line":301},[5879],{"type":41,"tag":298,"props":5880,"children":5881},{"style":305},[5882],{"type":52,"value":5883},"vendor/bin/phpcs app/Core/Hooks.php --standard=PSR12\n",{"type":41,"tag":298,"props":5885,"children":5886},{"class":300,"line":311},[5887],{"type":41,"tag":298,"props":5888,"children":5889},{"emptyLinePlaceholder":36},[5890],{"type":52,"value":2018},{"type":41,"tag":298,"props":5892,"children":5893},{"class":300,"line":326},[5894],{"type":41,"tag":298,"props":5895,"children":5896},{"style":305},[5897],{"type":52,"value":4227},{"type":41,"tag":298,"props":5899,"children":5900},{"class":300,"line":341},[5901],{"type":41,"tag":298,"props":5902,"children":5903},{"style":315},[5904],{"type":52,"value":5905},"---------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":5907,"children":5908},{"class":300,"line":354},[5909],{"type":41,"tag":298,"props":5910,"children":5911},{"style":305},[5912],{"type":52,"value":5913},"FOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES\n",{"type":41,"tag":298,"props":5915,"children":5916},{"class":300,"line":367},[5917],{"type":41,"tag":298,"props":5918,"children":5919},{"style":315},[5920],{"type":52,"value":5905},{"type":41,"tag":298,"props":5922,"children":5924},{"class":5923,"line":380},[300,728],[5925],{"type":41,"tag":298,"props":5926,"children":5927},{"style":305},[5928],{"type":52,"value":5929},"  1 | ERROR   | [x] Header blocks must be separated by a single blank line\n",{"type":41,"tag":298,"props":5931,"children":5933},{"class":5932,"line":389},[300,728],[5934],{"type":41,"tag":298,"props":5935,"children":5936},{"style":305},[5937],{"type":52,"value":5938},"  6 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters\n",{"type":41,"tag":298,"props":5940,"children":5942},{"class":5941,"line":398},[300,728],[5943],{"type":41,"tag":298,"props":5944,"children":5945},{"style":305},[5946],{"type":52,"value":5947},"  8 | ERROR   | [x] Opening brace should be on a new line\n",{"type":41,"tag":298,"props":5949,"children":5950},{"class":300,"line":411},[5951],{"type":41,"tag":298,"props":5952,"children":5953},{"style":315},[5954],{"type":52,"value":5905},{"type":41,"tag":298,"props":5956,"children":5957},{"class":300,"line":424},[5958],{"type":41,"tag":298,"props":5959,"children":5960},{"style":305},[5961],{"type":52,"value":5962},"PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":5964,"children":5965},{"class":300,"line":433},[5966],{"type":41,"tag":298,"props":5967,"children":5968},{"style":315},[5969],{"type":52,"value":5905},{"type":41,"tag":48,"props":5971,"children":5972},{},[5973,5975,5980,5982,5988,5990,5996],{"type":52,"value":5974},"I hope that you know I'm joking. I was seriously involved in weird discussions with developers about exceeding a task budget caused by reviewing files and making the violation fixes manually one by one. ",{"type":41,"tag":95,"props":5976,"children":5977},{},[5978],{"type":52,"value":5979},"And it wasn't a single situation so not everyone gets this",{"type":52,"value":5981}," 😒 The report that we get after using the linter presents two types of potential violations: the ones that can be automatically fixed ",{"type":41,"tag":278,"props":5983,"children":5985},{"className":5984},[],[5986],{"type":52,"value":5987},"[x]",{"type":52,"value":5989},", and the ones that can't ",{"type":41,"tag":278,"props":5991,"children":5993},{"className":5992},[],[5994],{"type":52,"value":5995},"[ ]",{"type":52,"value":140},{"type":41,"tag":1725,"props":5998,"children":6000},{":tabs":5999},"[\"Auto\", \"Manual\"]",[6001,6082],{"type":41,"tag":287,"props":6002,"children":6006},{"className":1996,"code":6003,"filename":6004,"highlights":6005,"language":1998,"meta":7,"style":7},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n---------------------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES\n---------------------------------------------------------------------------------------------------------\n  1 | ERROR   | [x] Header blocks must be separated by a single blank line\n  6 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters\n  8 | ERROR   | [x] Opening brace should be on a new line\n---------------------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n---------------------------------------------------------------------------------------------------------\n","Auto",[354,380],[6007],{"type":41,"tag":278,"props":6008,"children":6009},{"__ignoreMap":7},[6010,6017,6024,6031,6038,6046,6053,6061,6068,6075],{"type":41,"tag":298,"props":6011,"children":6012},{"class":300,"line":301},[6013],{"type":41,"tag":298,"props":6014,"children":6015},{"style":305},[6016],{"type":52,"value":4227},{"type":41,"tag":298,"props":6018,"children":6019},{"class":300,"line":311},[6020],{"type":41,"tag":298,"props":6021,"children":6022},{"style":315},[6023],{"type":52,"value":5905},{"type":41,"tag":298,"props":6025,"children":6026},{"class":300,"line":326},[6027],{"type":41,"tag":298,"props":6028,"children":6029},{"style":305},[6030],{"type":52,"value":5913},{"type":41,"tag":298,"props":6032,"children":6033},{"class":300,"line":341},[6034],{"type":41,"tag":298,"props":6035,"children":6036},{"style":315},[6037],{"type":52,"value":5905},{"type":41,"tag":298,"props":6039,"children":6041},{"class":6040,"line":354},[300,728],[6042],{"type":41,"tag":298,"props":6043,"children":6044},{"style":305},[6045],{"type":52,"value":5929},{"type":41,"tag":298,"props":6047,"children":6048},{"class":300,"line":367},[6049],{"type":41,"tag":298,"props":6050,"children":6051},{"style":305},[6052],{"type":52,"value":5938},{"type":41,"tag":298,"props":6054,"children":6056},{"class":6055,"line":380},[300,728],[6057],{"type":41,"tag":298,"props":6058,"children":6059},{"style":305},[6060],{"type":52,"value":5947},{"type":41,"tag":298,"props":6062,"children":6063},{"class":300,"line":389},[6064],{"type":41,"tag":298,"props":6065,"children":6066},{"style":315},[6067],{"type":52,"value":5905},{"type":41,"tag":298,"props":6069,"children":6070},{"class":300,"line":398},[6071],{"type":41,"tag":298,"props":6072,"children":6073},{"style":305},[6074],{"type":52,"value":5962},{"type":41,"tag":298,"props":6076,"children":6077},{"class":300,"line":411},[6078],{"type":41,"tag":298,"props":6079,"children":6080},{"style":315},[6081],{"type":52,"value":5905},{"type":41,"tag":287,"props":6083,"children":6086},{"className":1996,"code":6003,"filename":6084,"highlights":6085,"language":1998,"meta":7,"style":7},"Manual",[367],[6087],{"type":41,"tag":278,"props":6088,"children":6089},{"__ignoreMap":7},[6090,6097,6104,6111,6118,6125,6133,6140,6147,6154],{"type":41,"tag":298,"props":6091,"children":6092},{"class":300,"line":301},[6093],{"type":41,"tag":298,"props":6094,"children":6095},{"style":305},[6096],{"type":52,"value":4227},{"type":41,"tag":298,"props":6098,"children":6099},{"class":300,"line":311},[6100],{"type":41,"tag":298,"props":6101,"children":6102},{"style":315},[6103],{"type":52,"value":5905},{"type":41,"tag":298,"props":6105,"children":6106},{"class":300,"line":326},[6107],{"type":41,"tag":298,"props":6108,"children":6109},{"style":305},[6110],{"type":52,"value":5913},{"type":41,"tag":298,"props":6112,"children":6113},{"class":300,"line":341},[6114],{"type":41,"tag":298,"props":6115,"children":6116},{"style":315},[6117],{"type":52,"value":5905},{"type":41,"tag":298,"props":6119,"children":6120},{"class":300,"line":354},[6121],{"type":41,"tag":298,"props":6122,"children":6123},{"style":305},[6124],{"type":52,"value":5929},{"type":41,"tag":298,"props":6126,"children":6128},{"class":6127,"line":367},[300,728],[6129],{"type":41,"tag":298,"props":6130,"children":6131},{"style":305},[6132],{"type":52,"value":5938},{"type":41,"tag":298,"props":6134,"children":6135},{"class":300,"line":380},[6136],{"type":41,"tag":298,"props":6137,"children":6138},{"style":305},[6139],{"type":52,"value":5947},{"type":41,"tag":298,"props":6141,"children":6142},{"class":300,"line":389},[6143],{"type":41,"tag":298,"props":6144,"children":6145},{"style":315},[6146],{"type":52,"value":5905},{"type":41,"tag":298,"props":6148,"children":6149},{"class":300,"line":398},[6150],{"type":41,"tag":298,"props":6151,"children":6152},{"style":305},[6153],{"type":52,"value":5962},{"type":41,"tag":298,"props":6155,"children":6156},{"class":300,"line":411},[6157],{"type":41,"tag":298,"props":6158,"children":6159},{"style":315},[6160],{"type":52,"value":5905},{"type":41,"tag":48,"props":6162,"children":6163},{},[6164,6166,6171],{"type":52,"value":6165},"The first ones are mostly simple formatting problems that can be fixed only in one way, so the tool can simply handle them for us. The second ones need more attention since they require a well-thought-out decision or manual changes. So let's try to use ",{"type":41,"tag":278,"props":6167,"children":6169},{"className":6168},[],[6170],{"type":52,"value":4022},{"type":52,"value":6172}," script to format the code for us and reduce the time needed for fixes a million times.",{"type":41,"tag":287,"props":6174,"children":6176},{"className":1996,"code":6175,"language":1998,"meta":7,"style":7},"vendor/bin/phpcbf app/Core/Hooks.php --standard=PSR12\n\nPHPCBF RESULT SUMMARY\n------------------------------------------------------------------------------------------------------------------------\nFILE                                                                                                    FIXED  REMAINING\n------------------------------------------------------------------------------------------------------------------------\n/footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php     4      1\n------------------------------------------------------------------------------------------------------------------------\nA TOTAL OF 4 ERRORS WERE FIXED IN 1 FILE\n------------------------------------------------------------------------------------------------------------------------\n",[6177],{"type":41,"tag":278,"props":6178,"children":6179},{"__ignoreMap":7},[6180,6188,6195,6203,6211,6219,6226,6234,6241,6249],{"type":41,"tag":298,"props":6181,"children":6182},{"class":300,"line":301},[6183],{"type":41,"tag":298,"props":6184,"children":6185},{"style":305},[6186],{"type":52,"value":6187},"vendor/bin/phpcbf app/Core/Hooks.php --standard=PSR12\n",{"type":41,"tag":298,"props":6189,"children":6190},{"class":300,"line":311},[6191],{"type":41,"tag":298,"props":6192,"children":6193},{"emptyLinePlaceholder":36},[6194],{"type":52,"value":2018},{"type":41,"tag":298,"props":6196,"children":6197},{"class":300,"line":326},[6198],{"type":41,"tag":298,"props":6199,"children":6200},{"style":305},[6201],{"type":52,"value":6202},"PHPCBF RESULT SUMMARY\n",{"type":41,"tag":298,"props":6204,"children":6205},{"class":300,"line":341},[6206],{"type":41,"tag":298,"props":6207,"children":6208},{"style":315},[6209],{"type":52,"value":6210},"------------------------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":6212,"children":6213},{"class":300,"line":354},[6214],{"type":41,"tag":298,"props":6215,"children":6216},{"style":305},[6217],{"type":52,"value":6218},"FILE                                                                                                    FIXED  REMAINING\n",{"type":41,"tag":298,"props":6220,"children":6221},{"class":300,"line":367},[6222],{"type":41,"tag":298,"props":6223,"children":6224},{"style":315},[6225],{"type":52,"value":6210},{"type":41,"tag":298,"props":6227,"children":6228},{"class":300,"line":380},[6229],{"type":41,"tag":298,"props":6230,"children":6231},{"style":305},[6232],{"type":52,"value":6233},"/footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php     4      1\n",{"type":41,"tag":298,"props":6235,"children":6236},{"class":300,"line":389},[6237],{"type":41,"tag":298,"props":6238,"children":6239},{"style":315},[6240],{"type":52,"value":6210},{"type":41,"tag":298,"props":6242,"children":6243},{"class":300,"line":398},[6244],{"type":41,"tag":298,"props":6245,"children":6246},{"style":305},[6247],{"type":52,"value":6248},"A TOTAL OF 4 ERRORS WERE FIXED IN 1 FILE\n",{"type":41,"tag":298,"props":6250,"children":6251},{"class":300,"line":411},[6252],{"type":41,"tag":298,"props":6253,"children":6254},{"style":315},[6255],{"type":52,"value":6210},{"type":41,"tag":48,"props":6257,"children":6258},{},[6259,6261,6266,6268,6273],{"type":52,"value":6260},"The tool ",{"type":41,"tag":95,"props":6262,"children":6263},{},[6264],{"type":52,"value":6265},"handled all the fixable problems automatically",{"type":52,"value":6267}," and informed me that there was one problem that needed attention. Once fixed, we can fire ",{"type":41,"tag":278,"props":6269,"children":6271},{"className":6270},[],[6272],{"type":52,"value":1305},{"type":52,"value":6274}," to see that there are no more problems to solve, meaning that the code is compliant with the rules.",{"type":41,"tag":79,"props":6276,"children":6277},{},[],{"type":41,"tag":48,"props":6279,"children":6280},{},[6281],{"type":52,"value":1051},{"type":41,"tag":48,"props":6283,"children":6284},{},[6285],{"type":52,"value":1056},{"type":41,"tag":48,"props":6287,"children":6288},{},[6289],{"type":41,"tag":95,"props":6290,"children":6291},{},[6292],{"type":52,"value":1064},{"type":41,"tag":1066,"props":6294,"children":6295},{},[],{"type":41,"tag":79,"props":6297,"children":6298},{},[],{"type":41,"tag":83,"props":6300,"children":6302},{"id":6301},"how-to-ignore-php-code-sniffer-errors",[6303],{"type":52,"value":6304},"How to ignore PHP Code Sniffer errors?",{"type":41,"tag":48,"props":6306,"children":6307},{},[6308,6310],{"type":52,"value":6309},"Another important part of the tool usage is ignoring the errors in the code. Sometimes, we NEED to write the code in a specific way, even when it breaks some rules. In Poland we say ",{"type":41,"tag":95,"props":6311,"children":6312},{},[6313],{"type":52,"value":6314},"chodźby skały srały, to ma być tak i ch*j.",{"type":41,"tag":48,"props":6316,"children":6317},{},[6318,6320,6326,6328,6334,6335,6341,6343,6350],{"type":52,"value":6319},"We can simply ignore next-line errors with ",{"type":41,"tag":278,"props":6321,"children":6323},{"className":6322},[],[6324],{"type":52,"value":6325},"phpcs:ignore",{"type":52,"value":6327}," comments, code range with the ",{"type":41,"tag":278,"props":6329,"children":6331},{"className":6330},[],[6332],{"type":52,"value":6333},"phpcs:disable",{"type":52,"value":2206},{"type":41,"tag":278,"props":6336,"children":6338},{"className":6337},[],[6339],{"type":52,"value":6340},"phpcs:enable",{"type":52,"value":6342}," comments, or reduce ignoring just to specific sniffs or standards. Of course, there are many more possibilities so check out them ",{"type":41,"tag":55,"props":6344,"children":6347},{"href":6345,"rel":6346},"https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file",[59],[6348],{"type":52,"value":6349},"in the doc",{"type":52,"value":140},{"type":41,"tag":1725,"props":6352,"children":6354},{":tabs":6353},"[\"Before\", \"Line\", \"Block\", \"Rule\", \"Ruleset\", \"After\"]",[6355,6456,6580,6711,6833,6953],{"type":41,"tag":287,"props":6356,"children":6359},{"className":1996,"code":6357,"filename":1733,"highlights":6358,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs app/Core/Hooks.php\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n----------------------------------------------------------------------------------------------------------------------\nFOUND 5 ERRORS AFFECTING 4 LINES\n----------------------------------------------------------------------------------------------------------------------\n1 | ERROR | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n5 | ERROR | [x] Opening class brace must be on a line by itself (PSR2.Classes.ClassDeclaration.OpenBraceNotAlone)\n5 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n6 | ERROR | [x] Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)\n9 | ERROR | [x] Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound)\n----------------------------------------------------------------------------------------------------------------------\n",[389],[6360],{"type":41,"tag":278,"props":6361,"children":6362},{"__ignoreMap":7},[6363,6371,6378,6385,6393,6401,6408,6416,6425,6433,6441,6449],{"type":41,"tag":298,"props":6364,"children":6365},{"class":300,"line":301},[6366],{"type":41,"tag":298,"props":6367,"children":6368},{"style":305},[6369],{"type":52,"value":6370},"vendor/bin/phpcs app/Core/Hooks.php\n",{"type":41,"tag":298,"props":6372,"children":6373},{"class":300,"line":311},[6374],{"type":41,"tag":298,"props":6375,"children":6376},{"emptyLinePlaceholder":36},[6377],{"type":52,"value":2018},{"type":41,"tag":298,"props":6379,"children":6380},{"class":300,"line":326},[6381],{"type":41,"tag":298,"props":6382,"children":6383},{"style":305},[6384],{"type":52,"value":4227},{"type":41,"tag":298,"props":6386,"children":6387},{"class":300,"line":341},[6388],{"type":41,"tag":298,"props":6389,"children":6390},{"style":315},[6391],{"type":52,"value":6392},"----------------------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":6394,"children":6395},{"class":300,"line":354},[6396],{"type":41,"tag":298,"props":6397,"children":6398},{"style":305},[6399],{"type":52,"value":6400},"FOUND 5 ERRORS AFFECTING 4 LINES\n",{"type":41,"tag":298,"props":6402,"children":6403},{"class":300,"line":367},[6404],{"type":41,"tag":298,"props":6405,"children":6406},{"style":315},[6407],{"type":52,"value":6392},{"type":41,"tag":298,"props":6409,"children":6410},{"class":300,"line":380},[6411],{"type":41,"tag":298,"props":6412,"children":6413},{"style":305},[6414],{"type":52,"value":6415},"1 | ERROR | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n",{"type":41,"tag":298,"props":6417,"children":6419},{"class":6418,"line":389},[300,728],[6420],{"type":41,"tag":298,"props":6421,"children":6422},{"style":305},[6423],{"type":52,"value":6424},"5 | ERROR | [x] Opening class brace must be on a line by itself (PSR2.Classes.ClassDeclaration.OpenBraceNotAlone)\n",{"type":41,"tag":298,"props":6426,"children":6427},{"class":300,"line":398},[6428],{"type":41,"tag":298,"props":6429,"children":6430},{"style":305},[6431],{"type":52,"value":6432},"5 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":6434,"children":6435},{"class":300,"line":411},[6436],{"type":41,"tag":298,"props":6437,"children":6438},{"style":305},[6439],{"type":52,"value":6440},"6 | ERROR | [x] Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)\n",{"type":41,"tag":298,"props":6442,"children":6443},{"class":300,"line":424},[6444],{"type":41,"tag":298,"props":6445,"children":6446},{"style":305},[6447],{"type":52,"value":6448},"9 | ERROR | [x] Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound)\n",{"type":41,"tag":298,"props":6450,"children":6451},{"class":300,"line":433},[6452],{"type":41,"tag":298,"props":6453,"children":6454},{"style":315},[6455],{"type":52,"value":6392},{"type":41,"tag":287,"props":6457,"children":6461},{"className":4107,"code":6458,"filename":6459,"highlights":6460,"language":3941,"meta":7,"style":7},"namespace FM\\Core;\n\nclass Hooks\n{\n    // phpcs:ignore\n    public static function init(): void {\n        $foo = array();\n    }\n}\n","Line",[354],[6462],{"type":41,"tag":278,"props":6463,"children":6464},{"__ignoreMap":7},[6465,6482,6489,6500,6507,6516,6547,6566,6573],{"type":41,"tag":298,"props":6466,"children":6467},{"class":300,"line":301},[6468,6473,6478],{"type":41,"tag":298,"props":6469,"children":6470},{"style":3648},[6471],{"type":52,"value":6472},"namespace",{"type":41,"tag":298,"props":6474,"children":6475},{"style":4124},[6476],{"type":52,"value":6477}," FM\\Core",{"type":41,"tag":298,"props":6479,"children":6480},{"style":305},[6481],{"type":52,"value":4419},{"type":41,"tag":298,"props":6483,"children":6484},{"class":300,"line":311},[6485],{"type":41,"tag":298,"props":6486,"children":6487},{"emptyLinePlaceholder":36},[6488],{"type":52,"value":2018},{"type":41,"tag":298,"props":6490,"children":6491},{"class":300,"line":326},[6492,6496],{"type":41,"tag":298,"props":6493,"children":6494},{"style":3648},[6495],{"type":52,"value":674},{"type":41,"tag":298,"props":6497,"children":6498},{"style":4124},[6499],{"type":52,"value":4127},{"type":41,"tag":298,"props":6501,"children":6502},{"class":300,"line":341},[6503],{"type":41,"tag":298,"props":6504,"children":6505},{"style":305},[6506],{"type":52,"value":308},{"type":41,"tag":298,"props":6508,"children":6510},{"class":6509,"line":354},[300,728],[6511],{"type":41,"tag":298,"props":6512,"children":6513},{"style":3515},[6514],{"type":52,"value":6515},"    // phpcs:ignore\n",{"type":41,"tag":298,"props":6517,"children":6518},{"class":300,"line":367},[6519,6523,6527,6531,6535,6539,6543],{"type":41,"tag":298,"props":6520,"children":6521},{"style":3648},[6522],{"type":52,"value":4142},{"type":41,"tag":298,"props":6524,"children":6525},{"style":3648},[6526],{"type":52,"value":4147},{"type":41,"tag":298,"props":6528,"children":6529},{"style":3648},[6530],{"type":52,"value":4152},{"type":41,"tag":298,"props":6532,"children":6533},{"style":737},[6534],{"type":52,"value":4157},{"type":41,"tag":298,"props":6536,"children":6537},{"style":305},[6538],{"type":52,"value":4162},{"type":41,"tag":298,"props":6540,"children":6541},{"style":4124},[6542],{"type":52,"value":4167},{"type":41,"tag":298,"props":6544,"children":6545},{"style":305},[6546],{"type":52,"value":4172},{"type":41,"tag":298,"props":6548,"children":6549},{"class":300,"line":380},[6550,6554,6558,6562],{"type":41,"tag":298,"props":6551,"children":6552},{"style":315},[6553],{"type":52,"value":4181},{"type":41,"tag":298,"props":6555,"children":6556},{"style":713},[6557],{"type":52,"value":4186},{"type":41,"tag":298,"props":6559,"children":6560},{"style":713},[6561],{"type":52,"value":4191},{"type":41,"tag":298,"props":6563,"children":6564},{"style":305},[6565],{"type":52,"value":4196},{"type":41,"tag":298,"props":6567,"children":6568},{"class":300,"line":389},[6569],{"type":41,"tag":298,"props":6570,"children":6571},{"style":305},[6572],{"type":52,"value":1511},{"type":41,"tag":298,"props":6574,"children":6575},{"class":300,"line":398},[6576],{"type":41,"tag":298,"props":6577,"children":6578},{"style":305},[6579],{"type":52,"value":490},{"type":41,"tag":287,"props":6581,"children":6585},{"className":4107,"code":6582,"filename":6583,"highlights":6584,"language":3941,"meta":7,"style":7},"namespace FM\\Core;\n\nclass Hooks\n{\n    // phpcs:disable\n    public static function init(): void {\n        $foo = array();\n    }\n    // phpcs:enable\n}\n","Block",[354,398],[6586],{"type":41,"tag":278,"props":6587,"children":6588},{"__ignoreMap":7},[6589,6604,6611,6622,6629,6638,6669,6688,6695,6704],{"type":41,"tag":298,"props":6590,"children":6591},{"class":300,"line":301},[6592,6596,6600],{"type":41,"tag":298,"props":6593,"children":6594},{"style":3648},[6595],{"type":52,"value":6472},{"type":41,"tag":298,"props":6597,"children":6598},{"style":4124},[6599],{"type":52,"value":6477},{"type":41,"tag":298,"props":6601,"children":6602},{"style":305},[6603],{"type":52,"value":4419},{"type":41,"tag":298,"props":6605,"children":6606},{"class":300,"line":311},[6607],{"type":41,"tag":298,"props":6608,"children":6609},{"emptyLinePlaceholder":36},[6610],{"type":52,"value":2018},{"type":41,"tag":298,"props":6612,"children":6613},{"class":300,"line":326},[6614,6618],{"type":41,"tag":298,"props":6615,"children":6616},{"style":3648},[6617],{"type":52,"value":674},{"type":41,"tag":298,"props":6619,"children":6620},{"style":4124},[6621],{"type":52,"value":4127},{"type":41,"tag":298,"props":6623,"children":6624},{"class":300,"line":341},[6625],{"type":41,"tag":298,"props":6626,"children":6627},{"style":305},[6628],{"type":52,"value":308},{"type":41,"tag":298,"props":6630,"children":6632},{"class":6631,"line":354},[300,728],[6633],{"type":41,"tag":298,"props":6634,"children":6635},{"style":3515},[6636],{"type":52,"value":6637},"    // phpcs:disable\n",{"type":41,"tag":298,"props":6639,"children":6640},{"class":300,"line":367},[6641,6645,6649,6653,6657,6661,6665],{"type":41,"tag":298,"props":6642,"children":6643},{"style":3648},[6644],{"type":52,"value":4142},{"type":41,"tag":298,"props":6646,"children":6647},{"style":3648},[6648],{"type":52,"value":4147},{"type":41,"tag":298,"props":6650,"children":6651},{"style":3648},[6652],{"type":52,"value":4152},{"type":41,"tag":298,"props":6654,"children":6655},{"style":737},[6656],{"type":52,"value":4157},{"type":41,"tag":298,"props":6658,"children":6659},{"style":305},[6660],{"type":52,"value":4162},{"type":41,"tag":298,"props":6662,"children":6663},{"style":4124},[6664],{"type":52,"value":4167},{"type":41,"tag":298,"props":6666,"children":6667},{"style":305},[6668],{"type":52,"value":4172},{"type":41,"tag":298,"props":6670,"children":6671},{"class":300,"line":380},[6672,6676,6680,6684],{"type":41,"tag":298,"props":6673,"children":6674},{"style":315},[6675],{"type":52,"value":4181},{"type":41,"tag":298,"props":6677,"children":6678},{"style":713},[6679],{"type":52,"value":4186},{"type":41,"tag":298,"props":6681,"children":6682},{"style":713},[6683],{"type":52,"value":4191},{"type":41,"tag":298,"props":6685,"children":6686},{"style":305},[6687],{"type":52,"value":4196},{"type":41,"tag":298,"props":6689,"children":6690},{"class":300,"line":389},[6691],{"type":41,"tag":298,"props":6692,"children":6693},{"style":305},[6694],{"type":52,"value":1511},{"type":41,"tag":298,"props":6696,"children":6698},{"class":6697,"line":398},[300,728],[6699],{"type":41,"tag":298,"props":6700,"children":6701},{"style":3515},[6702],{"type":52,"value":6703},"    // phpcs:enable\n",{"type":41,"tag":298,"props":6705,"children":6706},{"class":300,"line":411},[6707],{"type":41,"tag":298,"props":6708,"children":6709},{"style":305},[6710],{"type":52,"value":490},{"type":41,"tag":287,"props":6712,"children":6716},{"className":4107,"code":6713,"filename":6714,"highlights":6715,"language":3941,"meta":7,"style":7},"namespace FM\\Core;\n\nclass Hooks\n{\n    // phpcs:ignore Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine\n    public static function init(): void {\n        $foo = array();\n    }\n}\n","Rule",[354],[6717],{"type":41,"tag":278,"props":6718,"children":6719},{"__ignoreMap":7},[6720,6735,6742,6753,6760,6769,6800,6819,6826],{"type":41,"tag":298,"props":6721,"children":6722},{"class":300,"line":301},[6723,6727,6731],{"type":41,"tag":298,"props":6724,"children":6725},{"style":3648},[6726],{"type":52,"value":6472},{"type":41,"tag":298,"props":6728,"children":6729},{"style":4124},[6730],{"type":52,"value":6477},{"type":41,"tag":298,"props":6732,"children":6733},{"style":305},[6734],{"type":52,"value":4419},{"type":41,"tag":298,"props":6736,"children":6737},{"class":300,"line":311},[6738],{"type":41,"tag":298,"props":6739,"children":6740},{"emptyLinePlaceholder":36},[6741],{"type":52,"value":2018},{"type":41,"tag":298,"props":6743,"children":6744},{"class":300,"line":326},[6745,6749],{"type":41,"tag":298,"props":6746,"children":6747},{"style":3648},[6748],{"type":52,"value":674},{"type":41,"tag":298,"props":6750,"children":6751},{"style":4124},[6752],{"type":52,"value":4127},{"type":41,"tag":298,"props":6754,"children":6755},{"class":300,"line":341},[6756],{"type":41,"tag":298,"props":6757,"children":6758},{"style":305},[6759],{"type":52,"value":308},{"type":41,"tag":298,"props":6761,"children":6763},{"class":6762,"line":354},[300,728],[6764],{"type":41,"tag":298,"props":6765,"children":6766},{"style":3515},[6767],{"type":52,"value":6768},"    // phpcs:ignore Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine\n",{"type":41,"tag":298,"props":6770,"children":6771},{"class":300,"line":367},[6772,6776,6780,6784,6788,6792,6796],{"type":41,"tag":298,"props":6773,"children":6774},{"style":3648},[6775],{"type":52,"value":4142},{"type":41,"tag":298,"props":6777,"children":6778},{"style":3648},[6779],{"type":52,"value":4147},{"type":41,"tag":298,"props":6781,"children":6782},{"style":3648},[6783],{"type":52,"value":4152},{"type":41,"tag":298,"props":6785,"children":6786},{"style":737},[6787],{"type":52,"value":4157},{"type":41,"tag":298,"props":6789,"children":6790},{"style":305},[6791],{"type":52,"value":4162},{"type":41,"tag":298,"props":6793,"children":6794},{"style":4124},[6795],{"type":52,"value":4167},{"type":41,"tag":298,"props":6797,"children":6798},{"style":305},[6799],{"type":52,"value":4172},{"type":41,"tag":298,"props":6801,"children":6802},{"class":300,"line":380},[6803,6807,6811,6815],{"type":41,"tag":298,"props":6804,"children":6805},{"style":315},[6806],{"type":52,"value":4181},{"type":41,"tag":298,"props":6808,"children":6809},{"style":713},[6810],{"type":52,"value":4186},{"type":41,"tag":298,"props":6812,"children":6813},{"style":713},[6814],{"type":52,"value":4191},{"type":41,"tag":298,"props":6816,"children":6817},{"style":305},[6818],{"type":52,"value":4196},{"type":41,"tag":298,"props":6820,"children":6821},{"class":300,"line":389},[6822],{"type":41,"tag":298,"props":6823,"children":6824},{"style":305},[6825],{"type":52,"value":1511},{"type":41,"tag":298,"props":6827,"children":6828},{"class":300,"line":398},[6829],{"type":41,"tag":298,"props":6830,"children":6831},{"style":305},[6832],{"type":52,"value":490},{"type":41,"tag":287,"props":6834,"children":6839},{"className":6835,"code":6836,"filename":6837,"language":6838,"meta":7,"style":7},"language-xml shiki shiki-themes one-dark-pro","\u003Cruleset>\n  \u003Crule ref=\"WordPress\">\n    \u003Cexclude name=\"WordPress.Files.FileName.NotHyphenatedLowercase\" />\n  \u003C/rule>\n\u003C/ruleset>\n","Ruleset","xml",[6840],{"type":41,"tag":278,"props":6841,"children":6842},{"__ignoreMap":7},[6843,6859,6890,6922,6938],{"type":41,"tag":298,"props":6844,"children":6845},{"class":300,"line":301},[6846,6850,6855],{"type":41,"tag":298,"props":6847,"children":6848},{"style":305},[6849],{"type":52,"value":702},{"type":41,"tag":298,"props":6851,"children":6852},{"style":315},[6853],{"type":52,"value":6854},"ruleset",{"type":41,"tag":298,"props":6856,"children":6857},{"style":305},[6858],{"type":52,"value":819},{"type":41,"tag":298,"props":6860,"children":6861},{"class":300,"line":311},[6862,6867,6872,6877,6881,6886],{"type":41,"tag":298,"props":6863,"children":6864},{"style":305},[6865],{"type":52,"value":6866},"  \u003C",{"type":41,"tag":298,"props":6868,"children":6869},{"style":315},[6870],{"type":52,"value":6871},"rule",{"type":41,"tag":298,"props":6873,"children":6874},{"style":1376},[6875],{"type":52,"value":6876}," ref",{"type":41,"tag":298,"props":6878,"children":6879},{"style":305},[6880],{"type":52,"value":3710},{"type":41,"tag":298,"props":6882,"children":6883},{"style":330},[6884],{"type":52,"value":6885},"\"WordPress\"",{"type":41,"tag":298,"props":6887,"children":6888},{"style":305},[6889],{"type":52,"value":819},{"type":41,"tag":298,"props":6891,"children":6892},{"class":300,"line":326},[6893,6898,6903,6908,6912,6917],{"type":41,"tag":298,"props":6894,"children":6895},{"style":305},[6896],{"type":52,"value":6897},"    \u003C",{"type":41,"tag":298,"props":6899,"children":6900},{"style":315},[6901],{"type":52,"value":6902},"exclude",{"type":41,"tag":298,"props":6904,"children":6905},{"style":1376},[6906],{"type":52,"value":6907}," name",{"type":41,"tag":298,"props":6909,"children":6910},{"style":305},[6911],{"type":52,"value":3710},{"type":41,"tag":298,"props":6913,"children":6914},{"style":330},[6915],{"type":52,"value":6916},"\"WordPress.Files.FileName.NotHyphenatedLowercase\"",{"type":41,"tag":298,"props":6918,"children":6919},{"style":305},[6920],{"type":52,"value":6921}," />\n",{"type":41,"tag":298,"props":6923,"children":6924},{"class":300,"line":341},[6925,6930,6934],{"type":41,"tag":298,"props":6926,"children":6927},{"style":305},[6928],{"type":52,"value":6929},"  \u003C/",{"type":41,"tag":298,"props":6931,"children":6932},{"style":315},[6933],{"type":52,"value":6871},{"type":41,"tag":298,"props":6935,"children":6936},{"style":305},[6937],{"type":52,"value":819},{"type":41,"tag":298,"props":6939,"children":6940},{"class":300,"line":354},[6941,6945,6949],{"type":41,"tag":298,"props":6942,"children":6943},{"style":305},[6944],{"type":52,"value":835},{"type":41,"tag":298,"props":6946,"children":6947},{"style":315},[6948],{"type":52,"value":6854},{"type":41,"tag":298,"props":6950,"children":6951},{"style":305},[6952],{"type":52,"value":819},{"type":41,"tag":287,"props":6954,"children":6956},{"className":1996,"code":6955,"filename":1793,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs app/Core/Hooks.php\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n--------------------------------------------------------------------------------------------------------------------\nFOUND 5 ERRORS AFFECTING 3 LINES\n--------------------------------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n 5 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n10 | ERROR | [x] Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound)\n10 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n--------------------------------------------------------------------------------------------------------------------\n",[6957],{"type":41,"tag":278,"props":6958,"children":6959},{"__ignoreMap":7},[6960,6967,6974,6981,6989,6997,7004,7012,7020,7028,7036],{"type":41,"tag":298,"props":6961,"children":6962},{"class":300,"line":301},[6963],{"type":41,"tag":298,"props":6964,"children":6965},{"style":305},[6966],{"type":52,"value":6370},{"type":41,"tag":298,"props":6968,"children":6969},{"class":300,"line":311},[6970],{"type":41,"tag":298,"props":6971,"children":6972},{"emptyLinePlaceholder":36},[6973],{"type":52,"value":2018},{"type":41,"tag":298,"props":6975,"children":6976},{"class":300,"line":326},[6977],{"type":41,"tag":298,"props":6978,"children":6979},{"style":305},[6980],{"type":52,"value":4227},{"type":41,"tag":298,"props":6982,"children":6983},{"class":300,"line":341},[6984],{"type":41,"tag":298,"props":6985,"children":6986},{"style":315},[6987],{"type":52,"value":6988},"--------------------------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":6990,"children":6991},{"class":300,"line":354},[6992],{"type":41,"tag":298,"props":6993,"children":6994},{"style":305},[6995],{"type":52,"value":6996},"FOUND 5 ERRORS AFFECTING 3 LINES\n",{"type":41,"tag":298,"props":6998,"children":6999},{"class":300,"line":367},[7000],{"type":41,"tag":298,"props":7001,"children":7002},{"style":315},[7003],{"type":52,"value":6988},{"type":41,"tag":298,"props":7005,"children":7006},{"class":300,"line":380},[7007],{"type":41,"tag":298,"props":7008,"children":7009},{"style":305},[7010],{"type":52,"value":7011}," 1 | ERROR | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n",{"type":41,"tag":298,"props":7013,"children":7014},{"class":300,"line":389},[7015],{"type":41,"tag":298,"props":7016,"children":7017},{"style":305},[7018],{"type":52,"value":7019}," 5 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":7021,"children":7022},{"class":300,"line":398},[7023],{"type":41,"tag":298,"props":7024,"children":7025},{"style":305},[7026],{"type":52,"value":7027},"10 | ERROR | [x] Expected 1 newline at end of file; 0 found (PSR2.Files.EndFileNewline.NoneFound)\n",{"type":41,"tag":298,"props":7029,"children":7030},{"class":300,"line":411},[7031],{"type":41,"tag":298,"props":7032,"children":7033},{"style":305},[7034],{"type":52,"value":7035},"10 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":7037,"children":7038},{"class":300,"line":424},[7039],{"type":41,"tag":298,"props":7040,"children":7041},{"style":315},[7042],{"type":52,"value":6988},{"type":41,"tag":48,"props":7044,"children":7045},{},[7046,7048,7053,7055,7060,7062,7067],{"type":52,"value":7047},"Of course, by saying \"",{"type":41,"tag":238,"props":7049,"children":7050},{},[7051],{"type":52,"value":7052},"We can use it",{"type":52,"value":7054},"\" I don't mean \"",{"type":41,"tag":238,"props":7056,"children":7057},{},[7058],{"type":52,"value":7059},"We can ignore the whole codebase",{"type":52,"value":7061},"\". ",{"type":41,"tag":95,"props":7063,"children":7064},{},[7065],{"type":52,"value":7066},"It requires a delicate balance between adherence to standards and pragmatic coding need.",{"type":52,"value":7068}," So please, be careful because the project leader might not be happy 😅",{"type":41,"tag":79,"props":7070,"children":7071},{},[],{"type":41,"tag":83,"props":7073,"children":7075},{"id":7074},"how-to-configure-php-code-sniffer",[7076],{"type":52,"value":7077},"How to configure PHP Code Sniffer?",{"type":41,"tag":48,"props":7079,"children":7080},{},[7081,7083,7095,7097,7102,7104,7110],{"type":52,"value":7082},"Let's say that, we want to have a more personalized approach to checking the PHP code for potential problems. PHP Code Sniffer ",{"type":41,"tag":95,"props":7084,"children":7085},{},[7086,7088],{"type":52,"value":7087},"allows modifying its default behavior with a wide set of ",{"type":41,"tag":55,"props":7089,"children":7092},{"href":7090,"rel":7091},"https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Usage#getting-help-from-the-command-line",[59],[7093],{"type":52,"value":7094},"command line arguments",{"type":52,"value":7096}," so we can use them to define custom workflow. We want to use ",{"type":41,"tag":278,"props":7098,"children":7100},{"className":7099},[],[7101],{"type":52,"value":4559},{"type":52,"value":7103}," coding standards, check only files located within the ",{"type":41,"tag":278,"props":7105,"children":7107},{"className":7106},[],[7108],{"type":52,"value":7109},"app",{"type":52,"value":7111}," folder, and print color output. We can use the following command.",{"type":41,"tag":287,"props":7113,"children":7115},{"className":5704,"code":7114,"language":5706,"meta":7,"style":7},"vendor/bin/phpcs app --standard=PSR12 --colors\n",[7116],{"type":41,"tag":278,"props":7117,"children":7118},{"__ignoreMap":7},[7119],{"type":41,"tag":298,"props":7120,"children":7121},{"class":300,"line":301},[7122,7126,7131,7136],{"type":41,"tag":298,"props":7123,"children":7124},{"style":737},[7125],{"type":52,"value":4913},{"type":41,"tag":298,"props":7127,"children":7128},{"style":330},[7129],{"type":52,"value":7130}," app",{"type":41,"tag":298,"props":7132,"children":7133},{"style":1376},[7134],{"type":52,"value":7135}," --standard=PSR12",{"type":41,"tag":298,"props":7137,"children":7138},{"style":1376},[7139],{"type":52,"value":7140}," --colors\n",{"type":41,"tag":48,"props":7142,"children":7143},{},[7144,7146,7153,7154,7160],{"type":52,"value":7145},"We can simplify it and reduce the number of arguments we need to pass in the terminal by defining ",{"type":41,"tag":55,"props":7147,"children":7150},{"href":7148,"rel":7149},"https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file",[59],[7151],{"type":52,"value":7152},"the configuration file",{"type":52,"value":1977},{"type":41,"tag":278,"props":7155,"children":7157},{"className":7156},[],[7158],{"type":52,"value":7159},"phpcs.xml.dist",{"type":52,"value":7161}," in the theme or the plugin directory. Tool will search for this file in the current and parent directories - when no standard is specified in the command line - and use the configuration defined there.",{"type":41,"tag":287,"props":7163,"children":7165},{"className":6835,"code":7164,"filename":7159,"language":6838,"meta":7,"style":7},"\u003C?xml version=\"1.0\"?>\n\n\u003Cruleset name=\"pragmatedev\">\n  \u003Carg name=\"colors\" />\n\n  \u003Cfile>app\u003C/file>\n\n  \u003Crule ref=\"PSR12\" />\n\u003C/ruleset>\n",[7166],{"type":41,"tag":278,"props":7167,"children":7168},{"__ignoreMap":7},[7169,7200,7207,7235,7264,7271,7296,7303,7331],{"type":41,"tag":298,"props":7170,"children":7171},{"class":300,"line":301},[7172,7177,7181,7186,7190,7195],{"type":41,"tag":298,"props":7173,"children":7174},{"style":305},[7175],{"type":52,"value":7176},"\u003C?",{"type":41,"tag":298,"props":7178,"children":7179},{"style":315},[7180],{"type":52,"value":6838},{"type":41,"tag":298,"props":7182,"children":7183},{"style":1376},[7184],{"type":52,"value":7185}," version",{"type":41,"tag":298,"props":7187,"children":7188},{"style":305},[7189],{"type":52,"value":3710},{"type":41,"tag":298,"props":7191,"children":7192},{"style":330},[7193],{"type":52,"value":7194},"\"1.0\"",{"type":41,"tag":298,"props":7196,"children":7197},{"style":305},[7198],{"type":52,"value":7199},"?>\n",{"type":41,"tag":298,"props":7201,"children":7202},{"class":300,"line":311},[7203],{"type":41,"tag":298,"props":7204,"children":7205},{"emptyLinePlaceholder":36},[7206],{"type":52,"value":2018},{"type":41,"tag":298,"props":7208,"children":7209},{"class":300,"line":326},[7210,7214,7218,7222,7226,7231],{"type":41,"tag":298,"props":7211,"children":7212},{"style":305},[7213],{"type":52,"value":702},{"type":41,"tag":298,"props":7215,"children":7216},{"style":315},[7217],{"type":52,"value":6854},{"type":41,"tag":298,"props":7219,"children":7220},{"style":1376},[7221],{"type":52,"value":6907},{"type":41,"tag":298,"props":7223,"children":7224},{"style":305},[7225],{"type":52,"value":3710},{"type":41,"tag":298,"props":7227,"children":7228},{"style":330},[7229],{"type":52,"value":7230},"\"pragmatedev\"",{"type":41,"tag":298,"props":7232,"children":7233},{"style":305},[7234],{"type":52,"value":819},{"type":41,"tag":298,"props":7236,"children":7237},{"class":300,"line":341},[7238,7242,7247,7251,7255,7260],{"type":41,"tag":298,"props":7239,"children":7240},{"style":305},[7241],{"type":52,"value":6866},{"type":41,"tag":298,"props":7243,"children":7244},{"style":315},[7245],{"type":52,"value":7246},"arg",{"type":41,"tag":298,"props":7248,"children":7249},{"style":1376},[7250],{"type":52,"value":6907},{"type":41,"tag":298,"props":7252,"children":7253},{"style":305},[7254],{"type":52,"value":3710},{"type":41,"tag":298,"props":7256,"children":7257},{"style":330},[7258],{"type":52,"value":7259},"\"colors\"",{"type":41,"tag":298,"props":7261,"children":7262},{"style":305},[7263],{"type":52,"value":6921},{"type":41,"tag":298,"props":7265,"children":7266},{"class":300,"line":354},[7267],{"type":41,"tag":298,"props":7268,"children":7269},{"emptyLinePlaceholder":36},[7270],{"type":52,"value":2018},{"type":41,"tag":298,"props":7272,"children":7273},{"class":300,"line":367},[7274,7278,7283,7288,7292],{"type":41,"tag":298,"props":7275,"children":7276},{"style":305},[7277],{"type":52,"value":6866},{"type":41,"tag":298,"props":7279,"children":7280},{"style":315},[7281],{"type":52,"value":7282},"file",{"type":41,"tag":298,"props":7284,"children":7285},{"style":305},[7286],{"type":52,"value":7287},">app\u003C/",{"type":41,"tag":298,"props":7289,"children":7290},{"style":315},[7291],{"type":52,"value":7282},{"type":41,"tag":298,"props":7293,"children":7294},{"style":305},[7295],{"type":52,"value":819},{"type":41,"tag":298,"props":7297,"children":7298},{"class":300,"line":380},[7299],{"type":41,"tag":298,"props":7300,"children":7301},{"emptyLinePlaceholder":36},[7302],{"type":52,"value":2018},{"type":41,"tag":298,"props":7304,"children":7305},{"class":300,"line":389},[7306,7310,7314,7318,7322,7327],{"type":41,"tag":298,"props":7307,"children":7308},{"style":305},[7309],{"type":52,"value":6866},{"type":41,"tag":298,"props":7311,"children":7312},{"style":315},[7313],{"type":52,"value":6871},{"type":41,"tag":298,"props":7315,"children":7316},{"style":1376},[7317],{"type":52,"value":6876},{"type":41,"tag":298,"props":7319,"children":7320},{"style":305},[7321],{"type":52,"value":3710},{"type":41,"tag":298,"props":7323,"children":7324},{"style":330},[7325],{"type":52,"value":7326},"\"PSR12\"",{"type":41,"tag":298,"props":7328,"children":7329},{"style":305},[7330],{"type":52,"value":6921},{"type":41,"tag":298,"props":7332,"children":7333},{"class":300,"line":398},[7334,7338,7342],{"type":41,"tag":298,"props":7335,"children":7336},{"style":305},[7337],{"type":52,"value":835},{"type":41,"tag":298,"props":7339,"children":7340},{"style":315},[7341],{"type":52,"value":6854},{"type":41,"tag":298,"props":7343,"children":7344},{"style":305},[7345],{"type":52,"value":819},{"type":41,"tag":48,"props":7347,"children":7348},{},[7349,7351,7356],{"type":52,"value":7350},"Now, we can use the ",{"type":41,"tag":278,"props":7352,"children":7354},{"className":7353},[],[7355],{"type":52,"value":4913},{"type":52,"value":7357}," command without specifying any arguments and everything works as earlier when we used CLI arguments 🎉",{"type":41,"tag":287,"props":7359,"children":7361},{"className":5704,"code":7360,"language":5706,"meta":7,"style":7},"vendor/bin/phpcs\n",[7362],{"type":41,"tag":278,"props":7363,"children":7364},{"__ignoreMap":7},[7365],{"type":41,"tag":298,"props":7366,"children":7367},{"class":300,"line":301},[7368],{"type":41,"tag":298,"props":7369,"children":7370},{"style":737},[7371],{"type":52,"value":7360},{"type":41,"tag":48,"props":7373,"children":7374},{},[7375,7377,7384,7386,7392],{"type":52,"value":7376},"The config file might be used also to make even more ",{"type":41,"tag":55,"props":7378,"children":7381},{"href":7379,"rel":7380},"https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/FAQ#i-dont-agree-with-your-coding-standards-can-i-make-php_codesniffer-enforce-my-own",[59],[7382],{"type":52,"value":7383},"personalized choices",{"type":52,"value":7385}," related to the code formatting. Let's say that we don't want to follow the ",{"type":41,"tag":55,"props":7387,"children":7390},{"href":7388,"rel":7389},"https://www.php-fig.org/psr/psr-12/#44-methods-and-functions",[59],[7391],{"type":52,"value":6871},{"type":52,"value":7393}," applied by the PSR12 standard stating that the function opening brace should be in the new line.",{"type":41,"tag":1725,"props":7395,"children":7396},{":tabs":4103},[7397,7510],{"type":41,"tag":287,"props":7398,"children":7401},{"className":4107,"code":7399,"filename":4109,"highlights":7400,"language":3941,"meta":7,"style":7},"namespace FM\\Core;\n\nclass Hooks\n{\n    public static function init(): void {\n        $foo = array();\n    }\n}\n",[354],[7402],{"type":41,"tag":278,"props":7403,"children":7404},{"__ignoreMap":7},[7405,7420,7427,7438,7445,7477,7496,7503],{"type":41,"tag":298,"props":7406,"children":7407},{"class":300,"line":301},[7408,7412,7416],{"type":41,"tag":298,"props":7409,"children":7410},{"style":3648},[7411],{"type":52,"value":6472},{"type":41,"tag":298,"props":7413,"children":7414},{"style":4124},[7415],{"type":52,"value":6477},{"type":41,"tag":298,"props":7417,"children":7418},{"style":305},[7419],{"type":52,"value":4419},{"type":41,"tag":298,"props":7421,"children":7422},{"class":300,"line":311},[7423],{"type":41,"tag":298,"props":7424,"children":7425},{"emptyLinePlaceholder":36},[7426],{"type":52,"value":2018},{"type":41,"tag":298,"props":7428,"children":7429},{"class":300,"line":326},[7430,7434],{"type":41,"tag":298,"props":7431,"children":7432},{"style":3648},[7433],{"type":52,"value":674},{"type":41,"tag":298,"props":7435,"children":7436},{"style":4124},[7437],{"type":52,"value":4127},{"type":41,"tag":298,"props":7439,"children":7440},{"class":300,"line":341},[7441],{"type":41,"tag":298,"props":7442,"children":7443},{"style":305},[7444],{"type":52,"value":308},{"type":41,"tag":298,"props":7446,"children":7448},{"class":7447,"line":354},[300,728],[7449,7453,7457,7461,7465,7469,7473],{"type":41,"tag":298,"props":7450,"children":7451},{"style":3648},[7452],{"type":52,"value":4142},{"type":41,"tag":298,"props":7454,"children":7455},{"style":3648},[7456],{"type":52,"value":4147},{"type":41,"tag":298,"props":7458,"children":7459},{"style":3648},[7460],{"type":52,"value":4152},{"type":41,"tag":298,"props":7462,"children":7463},{"style":737},[7464],{"type":52,"value":4157},{"type":41,"tag":298,"props":7466,"children":7467},{"style":305},[7468],{"type":52,"value":4162},{"type":41,"tag":298,"props":7470,"children":7471},{"style":4124},[7472],{"type":52,"value":4167},{"type":41,"tag":298,"props":7474,"children":7475},{"style":305},[7476],{"type":52,"value":4172},{"type":41,"tag":298,"props":7478,"children":7479},{"class":300,"line":367},[7480,7484,7488,7492],{"type":41,"tag":298,"props":7481,"children":7482},{"style":315},[7483],{"type":52,"value":4181},{"type":41,"tag":298,"props":7485,"children":7486},{"style":713},[7487],{"type":52,"value":4186},{"type":41,"tag":298,"props":7489,"children":7490},{"style":713},[7491],{"type":52,"value":4191},{"type":41,"tag":298,"props":7493,"children":7494},{"style":305},[7495],{"type":52,"value":4196},{"type":41,"tag":298,"props":7497,"children":7498},{"class":300,"line":380},[7499],{"type":41,"tag":298,"props":7500,"children":7501},{"style":305},[7502],{"type":52,"value":1511},{"type":41,"tag":298,"props":7504,"children":7505},{"class":300,"line":389},[7506],{"type":41,"tag":298,"props":7507,"children":7508},{"style":305},[7509],{"type":52,"value":490},{"type":41,"tag":287,"props":7511,"children":7514},{"className":1996,"code":7512,"filename":4214,"highlights":7513,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs app/Core/Hooks.php\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n----------------------------------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n----------------------------------------------------------------------------------------------------------------------\n7 | ERROR | [x] Opening brace should be on a new line\n----------------------------------------------------------------------------------------------------------------------\n",[380],[7515],{"type":41,"tag":278,"props":7516,"children":7517},{"__ignoreMap":7},[7518,7525,7532,7539,7546,7553,7560,7569],{"type":41,"tag":298,"props":7519,"children":7520},{"class":300,"line":301},[7521],{"type":41,"tag":298,"props":7522,"children":7523},{"style":305},[7524],{"type":52,"value":6370},{"type":41,"tag":298,"props":7526,"children":7527},{"class":300,"line":311},[7528],{"type":41,"tag":298,"props":7529,"children":7530},{"emptyLinePlaceholder":36},[7531],{"type":52,"value":2018},{"type":41,"tag":298,"props":7533,"children":7534},{"class":300,"line":326},[7535],{"type":41,"tag":298,"props":7536,"children":7537},{"style":305},[7538],{"type":52,"value":4227},{"type":41,"tag":298,"props":7540,"children":7541},{"class":300,"line":341},[7542],{"type":41,"tag":298,"props":7543,"children":7544},{"style":315},[7545],{"type":52,"value":6392},{"type":41,"tag":298,"props":7547,"children":7548},{"class":300,"line":354},[7549],{"type":41,"tag":298,"props":7550,"children":7551},{"style":305},[7552],{"type":52,"value":4243},{"type":41,"tag":298,"props":7554,"children":7555},{"class":300,"line":367},[7556],{"type":41,"tag":298,"props":7557,"children":7558},{"style":315},[7559],{"type":52,"value":6392},{"type":41,"tag":298,"props":7561,"children":7563},{"class":7562,"line":380},[300,728],[7564],{"type":41,"tag":298,"props":7565,"children":7566},{"style":305},[7567],{"type":52,"value":7568},"7 | ERROR | [x] Opening brace should be on a new line\n",{"type":41,"tag":298,"props":7570,"children":7571},{"class":300,"line":389},[7572],{"type":41,"tag":298,"props":7573,"children":7574},{"style":315},[7575],{"type":52,"value":6392},{"type":41,"tag":48,"props":7577,"children":7578},{},[7579,7581,7586,7588],{"type":52,"value":7580},"To reflect this in the ",{"type":41,"tag":278,"props":7582,"children":7584},{"className":7583},[],[7585],{"type":52,"value":1305},{"type":52,"value":7587}," config, we need to know the unique identifier of the rule that checks this first. ",{"type":41,"tag":95,"props":7589,"children":7590},{},[7591,7593,7599,7601,7606],{"type":52,"value":7592},"We can find it out by adding the ",{"type":41,"tag":278,"props":7594,"children":7596},{"className":7595},[],[7597],{"type":52,"value":7598},"-s",{"type":52,"value":7600}," attribute to the ",{"type":41,"tag":278,"props":7602,"children":7604},{"className":7603},[],[7605],{"type":52,"value":1305},{"type":52,"value":7607}," command.",{"type":41,"tag":287,"props":7609,"children":7612},{"className":1996,"code":7610,"highlights":7611,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs app/Core/Hooks.php -s\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n----------------------------------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n----------------------------------------------------------------------------------------------------------------------\n 7 | ERROR | [x] Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)\n----------------------------------------------------------------------------------------------------------------------\n",[301,380],[7613],{"type":41,"tag":278,"props":7614,"children":7615},{"__ignoreMap":7},[7616,7625,7632,7639,7646,7653,7660,7669],{"type":41,"tag":298,"props":7617,"children":7619},{"class":7618,"line":301},[300,728],[7620],{"type":41,"tag":298,"props":7621,"children":7622},{"style":305},[7623],{"type":52,"value":7624},"vendor/bin/phpcs app/Core/Hooks.php -s\n",{"type":41,"tag":298,"props":7626,"children":7627},{"class":300,"line":311},[7628],{"type":41,"tag":298,"props":7629,"children":7630},{"emptyLinePlaceholder":36},[7631],{"type":52,"value":2018},{"type":41,"tag":298,"props":7633,"children":7634},{"class":300,"line":326},[7635],{"type":41,"tag":298,"props":7636,"children":7637},{"style":305},[7638],{"type":52,"value":4227},{"type":41,"tag":298,"props":7640,"children":7641},{"class":300,"line":341},[7642],{"type":41,"tag":298,"props":7643,"children":7644},{"style":315},[7645],{"type":52,"value":6392},{"type":41,"tag":298,"props":7647,"children":7648},{"class":300,"line":354},[7649],{"type":41,"tag":298,"props":7650,"children":7651},{"style":305},[7652],{"type":52,"value":4243},{"type":41,"tag":298,"props":7654,"children":7655},{"class":300,"line":367},[7656],{"type":41,"tag":298,"props":7657,"children":7658},{"style":315},[7659],{"type":52,"value":6392},{"type":41,"tag":298,"props":7661,"children":7663},{"class":7662,"line":380},[300,728],[7664],{"type":41,"tag":298,"props":7665,"children":7666},{"style":305},[7667],{"type":52,"value":7668}," 7 | ERROR | [x] Opening brace should be on a new line (Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine)\n",{"type":41,"tag":298,"props":7670,"children":7671},{"class":300,"line":389},[7672],{"type":41,"tag":298,"props":7673,"children":7674},{"style":315},[7675],{"type":52,"value":6392},{"type":41,"tag":48,"props":7677,"children":7678},{},[7679,7681,7687,7689,7695,7697,7702,7704,7709,7711,7716],{"type":52,"value":7680},"This specific rule has an ",{"type":41,"tag":278,"props":7682,"children":7684},{"className":7683},[],[7685],{"type":52,"value":7686},"Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine",{"type":52,"value":7688}," identifier, so we can take it and set it in the ",{"type":41,"tag":278,"props":7690,"children":7692},{"className":7691},[],[7693],{"type":52,"value":7694},"name",{"type":52,"value":7696}," attribute of the ",{"type":41,"tag":278,"props":7698,"children":7700},{"className":7699},[],[7701],{"type":52,"value":6902},{"type":52,"value":7703}," tag within the ruleset that implements this rule. Please notice that we added ",{"type":41,"tag":278,"props":7705,"children":7707},{"className":7706},[],[7708],{"type":52,"value":7598},{"type":52,"value":7710}," argument too! Now, when we lint the files with ",{"type":41,"tag":278,"props":7712,"children":7714},{"className":7713},[],[7715],{"type":52,"value":4913},{"type":52,"value":7717},", we won't see this problem anymore.",{"type":41,"tag":287,"props":7719,"children":7722},{"className":6835,"code":7720,"highlights":7721,"language":6838,"meta":7,"style":7},"\u003C?xml version=\"1.0\"?>\n\n\u003Cruleset name=\"pragmatedev\">\n  \u003Carg name=\"colors\" />\n  \u003Carg value=\"s\" />\n\n  \u003Cfile>app\u003C/file>\n\n  \u003Crule ref=\"PSR12\">\n    \u003Cexclude name=\"Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine\" />\n  \u003C/rule>\n\u003C/ruleset>\n",[354,411],[7723],{"type":41,"tag":278,"props":7724,"children":7725},{"__ignoreMap":7},[7726,7753,7760,7787,7814,7844,7851,7874,7881,7908,7937,7952],{"type":41,"tag":298,"props":7727,"children":7728},{"class":300,"line":301},[7729,7733,7737,7741,7745,7749],{"type":41,"tag":298,"props":7730,"children":7731},{"style":305},[7732],{"type":52,"value":7176},{"type":41,"tag":298,"props":7734,"children":7735},{"style":315},[7736],{"type":52,"value":6838},{"type":41,"tag":298,"props":7738,"children":7739},{"style":1376},[7740],{"type":52,"value":7185},{"type":41,"tag":298,"props":7742,"children":7743},{"style":305},[7744],{"type":52,"value":3710},{"type":41,"tag":298,"props":7746,"children":7747},{"style":330},[7748],{"type":52,"value":7194},{"type":41,"tag":298,"props":7750,"children":7751},{"style":305},[7752],{"type":52,"value":7199},{"type":41,"tag":298,"props":7754,"children":7755},{"class":300,"line":311},[7756],{"type":41,"tag":298,"props":7757,"children":7758},{"emptyLinePlaceholder":36},[7759],{"type":52,"value":2018},{"type":41,"tag":298,"props":7761,"children":7762},{"class":300,"line":326},[7763,7767,7771,7775,7779,7783],{"type":41,"tag":298,"props":7764,"children":7765},{"style":305},[7766],{"type":52,"value":702},{"type":41,"tag":298,"props":7768,"children":7769},{"style":315},[7770],{"type":52,"value":6854},{"type":41,"tag":298,"props":7772,"children":7773},{"style":1376},[7774],{"type":52,"value":6907},{"type":41,"tag":298,"props":7776,"children":7777},{"style":305},[7778],{"type":52,"value":3710},{"type":41,"tag":298,"props":7780,"children":7781},{"style":330},[7782],{"type":52,"value":7230},{"type":41,"tag":298,"props":7784,"children":7785},{"style":305},[7786],{"type":52,"value":819},{"type":41,"tag":298,"props":7788,"children":7789},{"class":300,"line":341},[7790,7794,7798,7802,7806,7810],{"type":41,"tag":298,"props":7791,"children":7792},{"style":305},[7793],{"type":52,"value":6866},{"type":41,"tag":298,"props":7795,"children":7796},{"style":315},[7797],{"type":52,"value":7246},{"type":41,"tag":298,"props":7799,"children":7800},{"style":1376},[7801],{"type":52,"value":6907},{"type":41,"tag":298,"props":7803,"children":7804},{"style":305},[7805],{"type":52,"value":3710},{"type":41,"tag":298,"props":7807,"children":7808},{"style":330},[7809],{"type":52,"value":7259},{"type":41,"tag":298,"props":7811,"children":7812},{"style":305},[7813],{"type":52,"value":6921},{"type":41,"tag":298,"props":7815,"children":7817},{"class":7816,"line":354},[300,728],[7818,7822,7826,7831,7835,7840],{"type":41,"tag":298,"props":7819,"children":7820},{"style":305},[7821],{"type":52,"value":6866},{"type":41,"tag":298,"props":7823,"children":7824},{"style":315},[7825],{"type":52,"value":7246},{"type":41,"tag":298,"props":7827,"children":7828},{"style":1376},[7829],{"type":52,"value":7830}," value",{"type":41,"tag":298,"props":7832,"children":7833},{"style":305},[7834],{"type":52,"value":3710},{"type":41,"tag":298,"props":7836,"children":7837},{"style":330},[7838],{"type":52,"value":7839},"\"s\"",{"type":41,"tag":298,"props":7841,"children":7842},{"style":305},[7843],{"type":52,"value":6921},{"type":41,"tag":298,"props":7845,"children":7846},{"class":300,"line":367},[7847],{"type":41,"tag":298,"props":7848,"children":7849},{"emptyLinePlaceholder":36},[7850],{"type":52,"value":2018},{"type":41,"tag":298,"props":7852,"children":7853},{"class":300,"line":380},[7854,7858,7862,7866,7870],{"type":41,"tag":298,"props":7855,"children":7856},{"style":305},[7857],{"type":52,"value":6866},{"type":41,"tag":298,"props":7859,"children":7860},{"style":315},[7861],{"type":52,"value":7282},{"type":41,"tag":298,"props":7863,"children":7864},{"style":305},[7865],{"type":52,"value":7287},{"type":41,"tag":298,"props":7867,"children":7868},{"style":315},[7869],{"type":52,"value":7282},{"type":41,"tag":298,"props":7871,"children":7872},{"style":305},[7873],{"type":52,"value":819},{"type":41,"tag":298,"props":7875,"children":7876},{"class":300,"line":389},[7877],{"type":41,"tag":298,"props":7878,"children":7879},{"emptyLinePlaceholder":36},[7880],{"type":52,"value":2018},{"type":41,"tag":298,"props":7882,"children":7883},{"class":300,"line":398},[7884,7888,7892,7896,7900,7904],{"type":41,"tag":298,"props":7885,"children":7886},{"style":305},[7887],{"type":52,"value":6866},{"type":41,"tag":298,"props":7889,"children":7890},{"style":315},[7891],{"type":52,"value":6871},{"type":41,"tag":298,"props":7893,"children":7894},{"style":1376},[7895],{"type":52,"value":6876},{"type":41,"tag":298,"props":7897,"children":7898},{"style":305},[7899],{"type":52,"value":3710},{"type":41,"tag":298,"props":7901,"children":7902},{"style":330},[7903],{"type":52,"value":7326},{"type":41,"tag":298,"props":7905,"children":7906},{"style":305},[7907],{"type":52,"value":819},{"type":41,"tag":298,"props":7909,"children":7911},{"class":7910,"line":411},[300,728],[7912,7916,7920,7924,7928,7933],{"type":41,"tag":298,"props":7913,"children":7914},{"style":305},[7915],{"type":52,"value":6897},{"type":41,"tag":298,"props":7917,"children":7918},{"style":315},[7919],{"type":52,"value":6902},{"type":41,"tag":298,"props":7921,"children":7922},{"style":1376},[7923],{"type":52,"value":6907},{"type":41,"tag":298,"props":7925,"children":7926},{"style":305},[7927],{"type":52,"value":3710},{"type":41,"tag":298,"props":7929,"children":7930},{"style":330},[7931],{"type":52,"value":7932},"\"Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine\"",{"type":41,"tag":298,"props":7934,"children":7935},{"style":305},[7936],{"type":52,"value":6921},{"type":41,"tag":298,"props":7938,"children":7939},{"class":300,"line":424},[7940,7944,7948],{"type":41,"tag":298,"props":7941,"children":7942},{"style":305},[7943],{"type":52,"value":6929},{"type":41,"tag":298,"props":7945,"children":7946},{"style":315},[7947],{"type":52,"value":6871},{"type":41,"tag":298,"props":7949,"children":7950},{"style":305},[7951],{"type":52,"value":819},{"type":41,"tag":298,"props":7953,"children":7954},{"class":300,"line":433},[7955,7959,7963],{"type":41,"tag":298,"props":7956,"children":7957},{"style":305},[7958],{"type":52,"value":835},{"type":41,"tag":298,"props":7960,"children":7961},{"style":315},[7962],{"type":52,"value":6854},{"type":41,"tag":298,"props":7964,"children":7965},{"style":305},[7966],{"type":52,"value":819},{"type":41,"tag":48,"props":7968,"children":7969},{},[7970,7972,7977,7979,7985],{"type":52,"value":7971},"This change opens up freedom in braces placement across the codebase. The users can put them as they wish now, without any consistency which seems to be risky. ",{"type":41,"tag":95,"props":7973,"children":7974},{},[7975],{"type":52,"value":7976},"The code should be consistent as much as possible!",{"type":52,"value":7978}," So if we don't want to put them in the new line, we should allow putting it only in the same line. Let's define it to our ruleset. It can be done by including the ",{"type":41,"tag":278,"props":7980,"children":7982},{"className":7981},[],[7983],{"type":52,"value":7984},"Generic.Functions.OpeningFunctionBraceKernighanRitchie",{"type":52,"value":7986}," rule.",{"type":41,"tag":1725,"props":7988,"children":7990},{":tabs":7989},"[\"phpcs.dist.xml\", \"Results\"]",[7991,8272],{"type":41,"tag":287,"props":7992,"children":7996},{"className":6835,"code":7993,"filename":7994,"highlights":7995,"language":6838,"meta":7,"style":7},"\u003C?xml version=\"1.0\"?>\n\n\u003Cruleset name=\"pragmatedev\">\n  \u003Carg name=\"colors\" />\n  \u003Carg value=\"s\" />\n\n  \u003Cfile>app\u003C/file>\n\n  \u003Crule ref=\"PSR12\">\n    \u003Cexclude name=\"Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine\" />\n  \u003C/rule>\n\n  \u003Crule ref=\"Generic.Functions.OpeningFunctionBraceKernighanRitchie\" />\n\u003C/ruleset>\n","phpcs.dist.xml",[441],[7997],{"type":41,"tag":278,"props":7998,"children":7999},{"__ignoreMap":7},[8000,8027,8034,8061,8088,8115,8122,8145,8152,8179,8206,8221,8228,8257],{"type":41,"tag":298,"props":8001,"children":8002},{"class":300,"line":301},[8003,8007,8011,8015,8019,8023],{"type":41,"tag":298,"props":8004,"children":8005},{"style":305},[8006],{"type":52,"value":7176},{"type":41,"tag":298,"props":8008,"children":8009},{"style":315},[8010],{"type":52,"value":6838},{"type":41,"tag":298,"props":8012,"children":8013},{"style":1376},[8014],{"type":52,"value":7185},{"type":41,"tag":298,"props":8016,"children":8017},{"style":305},[8018],{"type":52,"value":3710},{"type":41,"tag":298,"props":8020,"children":8021},{"style":330},[8022],{"type":52,"value":7194},{"type":41,"tag":298,"props":8024,"children":8025},{"style":305},[8026],{"type":52,"value":7199},{"type":41,"tag":298,"props":8028,"children":8029},{"class":300,"line":311},[8030],{"type":41,"tag":298,"props":8031,"children":8032},{"emptyLinePlaceholder":36},[8033],{"type":52,"value":2018},{"type":41,"tag":298,"props":8035,"children":8036},{"class":300,"line":326},[8037,8041,8045,8049,8053,8057],{"type":41,"tag":298,"props":8038,"children":8039},{"style":305},[8040],{"type":52,"value":702},{"type":41,"tag":298,"props":8042,"children":8043},{"style":315},[8044],{"type":52,"value":6854},{"type":41,"tag":298,"props":8046,"children":8047},{"style":1376},[8048],{"type":52,"value":6907},{"type":41,"tag":298,"props":8050,"children":8051},{"style":305},[8052],{"type":52,"value":3710},{"type":41,"tag":298,"props":8054,"children":8055},{"style":330},[8056],{"type":52,"value":7230},{"type":41,"tag":298,"props":8058,"children":8059},{"style":305},[8060],{"type":52,"value":819},{"type":41,"tag":298,"props":8062,"children":8063},{"class":300,"line":341},[8064,8068,8072,8076,8080,8084],{"type":41,"tag":298,"props":8065,"children":8066},{"style":305},[8067],{"type":52,"value":6866},{"type":41,"tag":298,"props":8069,"children":8070},{"style":315},[8071],{"type":52,"value":7246},{"type":41,"tag":298,"props":8073,"children":8074},{"style":1376},[8075],{"type":52,"value":6907},{"type":41,"tag":298,"props":8077,"children":8078},{"style":305},[8079],{"type":52,"value":3710},{"type":41,"tag":298,"props":8081,"children":8082},{"style":330},[8083],{"type":52,"value":7259},{"type":41,"tag":298,"props":8085,"children":8086},{"style":305},[8087],{"type":52,"value":6921},{"type":41,"tag":298,"props":8089,"children":8090},{"class":300,"line":354},[8091,8095,8099,8103,8107,8111],{"type":41,"tag":298,"props":8092,"children":8093},{"style":305},[8094],{"type":52,"value":6866},{"type":41,"tag":298,"props":8096,"children":8097},{"style":315},[8098],{"type":52,"value":7246},{"type":41,"tag":298,"props":8100,"children":8101},{"style":1376},[8102],{"type":52,"value":7830},{"type":41,"tag":298,"props":8104,"children":8105},{"style":305},[8106],{"type":52,"value":3710},{"type":41,"tag":298,"props":8108,"children":8109},{"style":330},[8110],{"type":52,"value":7839},{"type":41,"tag":298,"props":8112,"children":8113},{"style":305},[8114],{"type":52,"value":6921},{"type":41,"tag":298,"props":8116,"children":8117},{"class":300,"line":367},[8118],{"type":41,"tag":298,"props":8119,"children":8120},{"emptyLinePlaceholder":36},[8121],{"type":52,"value":2018},{"type":41,"tag":298,"props":8123,"children":8124},{"class":300,"line":380},[8125,8129,8133,8137,8141],{"type":41,"tag":298,"props":8126,"children":8127},{"style":305},[8128],{"type":52,"value":6866},{"type":41,"tag":298,"props":8130,"children":8131},{"style":315},[8132],{"type":52,"value":7282},{"type":41,"tag":298,"props":8134,"children":8135},{"style":305},[8136],{"type":52,"value":7287},{"type":41,"tag":298,"props":8138,"children":8139},{"style":315},[8140],{"type":52,"value":7282},{"type":41,"tag":298,"props":8142,"children":8143},{"style":305},[8144],{"type":52,"value":819},{"type":41,"tag":298,"props":8146,"children":8147},{"class":300,"line":389},[8148],{"type":41,"tag":298,"props":8149,"children":8150},{"emptyLinePlaceholder":36},[8151],{"type":52,"value":2018},{"type":41,"tag":298,"props":8153,"children":8154},{"class":300,"line":398},[8155,8159,8163,8167,8171,8175],{"type":41,"tag":298,"props":8156,"children":8157},{"style":305},[8158],{"type":52,"value":6866},{"type":41,"tag":298,"props":8160,"children":8161},{"style":315},[8162],{"type":52,"value":6871},{"type":41,"tag":298,"props":8164,"children":8165},{"style":1376},[8166],{"type":52,"value":6876},{"type":41,"tag":298,"props":8168,"children":8169},{"style":305},[8170],{"type":52,"value":3710},{"type":41,"tag":298,"props":8172,"children":8173},{"style":330},[8174],{"type":52,"value":7326},{"type":41,"tag":298,"props":8176,"children":8177},{"style":305},[8178],{"type":52,"value":819},{"type":41,"tag":298,"props":8180,"children":8181},{"class":300,"line":411},[8182,8186,8190,8194,8198,8202],{"type":41,"tag":298,"props":8183,"children":8184},{"style":305},[8185],{"type":52,"value":6897},{"type":41,"tag":298,"props":8187,"children":8188},{"style":315},[8189],{"type":52,"value":6902},{"type":41,"tag":298,"props":8191,"children":8192},{"style":1376},[8193],{"type":52,"value":6907},{"type":41,"tag":298,"props":8195,"children":8196},{"style":305},[8197],{"type":52,"value":3710},{"type":41,"tag":298,"props":8199,"children":8200},{"style":330},[8201],{"type":52,"value":7932},{"type":41,"tag":298,"props":8203,"children":8204},{"style":305},[8205],{"type":52,"value":6921},{"type":41,"tag":298,"props":8207,"children":8208},{"class":300,"line":424},[8209,8213,8217],{"type":41,"tag":298,"props":8210,"children":8211},{"style":305},[8212],{"type":52,"value":6929},{"type":41,"tag":298,"props":8214,"children":8215},{"style":315},[8216],{"type":52,"value":6871},{"type":41,"tag":298,"props":8218,"children":8219},{"style":305},[8220],{"type":52,"value":819},{"type":41,"tag":298,"props":8222,"children":8223},{"class":300,"line":433},[8224],{"type":41,"tag":298,"props":8225,"children":8226},{"emptyLinePlaceholder":36},[8227],{"type":52,"value":2018},{"type":41,"tag":298,"props":8229,"children":8231},{"class":8230,"line":441},[300,728],[8232,8236,8240,8244,8248,8253],{"type":41,"tag":298,"props":8233,"children":8234},{"style":305},[8235],{"type":52,"value":6866},{"type":41,"tag":298,"props":8237,"children":8238},{"style":315},[8239],{"type":52,"value":6871},{"type":41,"tag":298,"props":8241,"children":8242},{"style":1376},[8243],{"type":52,"value":6876},{"type":41,"tag":298,"props":8245,"children":8246},{"style":305},[8247],{"type":52,"value":3710},{"type":41,"tag":298,"props":8249,"children":8250},{"style":330},[8251],{"type":52,"value":8252},"\"Generic.Functions.OpeningFunctionBraceKernighanRitchie\"",{"type":41,"tag":298,"props":8254,"children":8255},{"style":305},[8256],{"type":52,"value":6921},{"type":41,"tag":298,"props":8258,"children":8259},{"class":300,"line":454},[8260,8264,8268],{"type":41,"tag":298,"props":8261,"children":8262},{"style":305},[8263],{"type":52,"value":835},{"type":41,"tag":298,"props":8265,"children":8266},{"style":315},[8267],{"type":52,"value":6854},{"type":41,"tag":298,"props":8269,"children":8270},{"style":305},[8271],{"type":52,"value":819},{"type":41,"tag":287,"props":8273,"children":8276},{"className":1996,"code":8274,"filename":8275,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Posts/Posts.php\n------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n------------------------------------------------------------------------------------------\n11 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/App.php\n------------------------------------------------------------------------------------------\nFOUND 13 ERRORS AFFECTING 13 LINES\n------------------------------------------------------------------------------------------\n 36 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 48 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 53 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 58 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 63 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 68 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 73 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 78 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 83 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 88 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 92 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n 97 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n106 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Widgets.php\n------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n------------------------------------------------------------------------------------------\n11 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Hooks.php\n------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR   | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n 6 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters (Generic.Files.LineLength.TooLong)\n 8 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n17 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n23 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Core/Config.php\n------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AFFECTING 4 LINES\n------------------------------------------------------------------------------------------\n10 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n38 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n53 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n58 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/Vite.php\n------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AFFECTING 4 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n11 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n14 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n19 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/Integrations.php\n------------------------------------------------------------------------------------------\nFOUND 2 ERRORS AFFECTING 2 LINES\n------------------------------------------------------------------------------------------\n16 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n25 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/ESPN.php\n------------------------------------------------------------------------------------------\nFOUND 3 ERRORS AFFECTING 3 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n13 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n26 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Teams/Teams.php\n------------------------------------------------------------------------------------------\nFOUND 1 ERROR AFFECTING 1 LINE\n------------------------------------------------------------------------------------------\n11 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Resolver.php\n------------------------------------------------------------------------------------------\nFOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n26 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n30 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n36 | WARNING | [ ] Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong)\n45 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n49 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Templates.php\n------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AFFECTING 4 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n15 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n21 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n26 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Provider.php\n------------------------------------------------------------------------------------------\nFOUND 10 ERRORS AFFECTING 9 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n17 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n22 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n22 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n27 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n28 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n29 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n32 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n34 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n39 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Assets/Resolver.php\n------------------------------------------------------------------------------------------\nFOUND 4 ERRORS AFFECTING 4 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n13 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n27 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n36 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n\n\nFILE: /footmate.pro/wp-content/themes/footmate/app/Assets/Assets.php\n------------------------------------------------------------------------------------------\nFOUND 2 ERRORS AFFECTING 2 LINES\n------------------------------------------------------------------------------------------\n 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n15 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n------------------------------------------------------------------------------------------\nPHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n------------------------------------------------------------------------------------------\n","Results",[8277],{"type":41,"tag":278,"props":8278,"children":8279},{"__ignoreMap":7},[8280,8287,8294,8302,8310,8317,8324,8332,8339,8347,8354,8361,8368,8376,8383,8391,8398,8406,8414,8422,8430,8438,8446,8454,8462,8470,8478,8486,8494,8502,8509,8517,8524,8532,8540,8549,8557,8565,8573,8581,8589,8597,8605,8613,8621,8629,8637,8646,8654,8663,8672,8681,8690,8699,8707,8715,8723,8731,8739,8748,8756,8765,8773,8782,8791,8800,8809,8817,8825,8833,8841,8849,8858,8866,8874,8881,8890,8898,8907,8916,8924,8932,8940,8948,8956,8965,8973,8982,8990,8999,9008,9016,9025,9033,9041,9049,9058,9066,9075,9083,9091,9100,9109,9117,9126,9134,9142,9150,9159,9167,9175,9183,9191,9199,9207,9215,9223,9231,9240,9248,9257,9265,9274,9283,9292,9301,9310,9319,9327,9336,9344,9352,9360,9369,9377,9385,9393,9401,9410,9419,9427,9435,9443,9451,9459,9467,9476,9484,9493,9501,9509,9518,9527,9536,9545,9554,9563,9572,9581,9590,9598,9607,9615,9623,9631,9640,9648,9656,9664,9672,9680,9688,9697,9705,9713,9721,9729,9737,9746,9754,9762,9770,9778,9786,9794,9802],{"type":41,"tag":298,"props":8281,"children":8282},{"class":300,"line":301},[8283],{"type":41,"tag":298,"props":8284,"children":8285},{"style":305},[8286],{"type":52,"value":7360},{"type":41,"tag":298,"props":8288,"children":8289},{"class":300,"line":311},[8290],{"type":41,"tag":298,"props":8291,"children":8292},{"emptyLinePlaceholder":36},[8293],{"type":52,"value":2018},{"type":41,"tag":298,"props":8295,"children":8296},{"class":300,"line":326},[8297],{"type":41,"tag":298,"props":8298,"children":8299},{"style":305},[8300],{"type":52,"value":8301},"FILE: /footmate.pro/wp-content/themes/footmate/app/Posts/Posts.php\n",{"type":41,"tag":298,"props":8303,"children":8304},{"class":300,"line":341},[8305],{"type":41,"tag":298,"props":8306,"children":8307},{"style":315},[8308],{"type":52,"value":8309},"------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":8311,"children":8312},{"class":300,"line":354},[8313],{"type":41,"tag":298,"props":8314,"children":8315},{"style":305},[8316],{"type":52,"value":4243},{"type":41,"tag":298,"props":8318,"children":8319},{"class":300,"line":367},[8320],{"type":41,"tag":298,"props":8321,"children":8322},{"style":315},[8323],{"type":52,"value":8309},{"type":41,"tag":298,"props":8325,"children":8326},{"class":300,"line":380},[8327],{"type":41,"tag":298,"props":8328,"children":8329},{"style":305},[8330],{"type":52,"value":8331},"11 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8333,"children":8334},{"class":300,"line":389},[8335],{"type":41,"tag":298,"props":8336,"children":8337},{"style":315},[8338],{"type":52,"value":8309},{"type":41,"tag":298,"props":8340,"children":8341},{"class":300,"line":398},[8342],{"type":41,"tag":298,"props":8343,"children":8344},{"style":305},[8345],{"type":52,"value":8346},"PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":8348,"children":8349},{"class":300,"line":411},[8350],{"type":41,"tag":298,"props":8351,"children":8352},{"style":315},[8353],{"type":52,"value":8309},{"type":41,"tag":298,"props":8355,"children":8356},{"class":300,"line":424},[8357],{"type":41,"tag":298,"props":8358,"children":8359},{"emptyLinePlaceholder":36},[8360],{"type":52,"value":2018},{"type":41,"tag":298,"props":8362,"children":8363},{"class":300,"line":433},[8364],{"type":41,"tag":298,"props":8365,"children":8366},{"emptyLinePlaceholder":36},[8367],{"type":52,"value":2018},{"type":41,"tag":298,"props":8369,"children":8370},{"class":300,"line":441},[8371],{"type":41,"tag":298,"props":8372,"children":8373},{"style":305},[8374],{"type":52,"value":8375},"FILE: /footmate.pro/wp-content/themes/footmate/app/App.php\n",{"type":41,"tag":298,"props":8377,"children":8378},{"class":300,"line":454},[8379],{"type":41,"tag":298,"props":8380,"children":8381},{"style":315},[8382],{"type":52,"value":8309},{"type":41,"tag":298,"props":8384,"children":8385},{"class":300,"line":467},[8386],{"type":41,"tag":298,"props":8387,"children":8388},{"style":305},[8389],{"type":52,"value":8390},"FOUND 13 ERRORS AFFECTING 13 LINES\n",{"type":41,"tag":298,"props":8392,"children":8393},{"class":300,"line":476},[8394],{"type":41,"tag":298,"props":8395,"children":8396},{"style":315},[8397],{"type":52,"value":8309},{"type":41,"tag":298,"props":8399,"children":8400},{"class":300,"line":484},[8401],{"type":41,"tag":298,"props":8402,"children":8403},{"style":305},[8404],{"type":52,"value":8405}," 36 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8407,"children":8408},{"class":300,"line":2644},[8409],{"type":41,"tag":298,"props":8410,"children":8411},{"style":305},[8412],{"type":52,"value":8413}," 48 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8415,"children":8416},{"class":300,"line":2666},[8417],{"type":41,"tag":298,"props":8418,"children":8419},{"style":305},[8420],{"type":52,"value":8421}," 53 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8423,"children":8424},{"class":300,"line":2684},[8425],{"type":41,"tag":298,"props":8426,"children":8427},{"style":305},[8428],{"type":52,"value":8429}," 58 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8431,"children":8432},{"class":300,"line":2692},[8433],{"type":41,"tag":298,"props":8434,"children":8435},{"style":305},[8436],{"type":52,"value":8437}," 63 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8439,"children":8440},{"class":300,"line":2705},[8441],{"type":41,"tag":298,"props":8442,"children":8443},{"style":305},[8444],{"type":52,"value":8445}," 68 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8447,"children":8448},{"class":300,"line":2727},[8449],{"type":41,"tag":298,"props":8450,"children":8451},{"style":305},[8452],{"type":52,"value":8453}," 73 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8455,"children":8456},{"class":300,"line":2745},[8457],{"type":41,"tag":298,"props":8458,"children":8459},{"style":305},[8460],{"type":52,"value":8461}," 78 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8463,"children":8464},{"class":300,"line":2753},[8465],{"type":41,"tag":298,"props":8466,"children":8467},{"style":305},[8468],{"type":52,"value":8469}," 83 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8471,"children":8472},{"class":300,"line":2766},[8473],{"type":41,"tag":298,"props":8474,"children":8475},{"style":305},[8476],{"type":52,"value":8477}," 88 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8479,"children":8480},{"class":300,"line":2784},[8481],{"type":41,"tag":298,"props":8482,"children":8483},{"style":305},[8484],{"type":52,"value":8485}," 92 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8487,"children":8488},{"class":300,"line":2792},[8489],{"type":41,"tag":298,"props":8490,"children":8491},{"style":305},[8492],{"type":52,"value":8493}," 97 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8495,"children":8496},{"class":300,"line":5578},[8497],{"type":41,"tag":298,"props":8498,"children":8499},{"style":305},[8500],{"type":52,"value":8501},"106 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8503,"children":8504},{"class":300,"line":5627},[8505],{"type":41,"tag":298,"props":8506,"children":8507},{"style":315},[8508],{"type":52,"value":8309},{"type":41,"tag":298,"props":8510,"children":8511},{"class":300,"line":5676},[8512],{"type":41,"tag":298,"props":8513,"children":8514},{"style":305},[8515],{"type":52,"value":8516},"PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":8518,"children":8519},{"class":300,"line":5684},[8520],{"type":41,"tag":298,"props":8521,"children":8522},{"style":315},[8523],{"type":52,"value":8309},{"type":41,"tag":298,"props":8525,"children":8527},{"class":300,"line":8526},33,[8528],{"type":41,"tag":298,"props":8529,"children":8530},{"emptyLinePlaceholder":36},[8531],{"type":52,"value":2018},{"type":41,"tag":298,"props":8533,"children":8535},{"class":300,"line":8534},34,[8536],{"type":41,"tag":298,"props":8537,"children":8538},{"emptyLinePlaceholder":36},[8539],{"type":52,"value":2018},{"type":41,"tag":298,"props":8541,"children":8543},{"class":300,"line":8542},35,[8544],{"type":41,"tag":298,"props":8545,"children":8546},{"style":305},[8547],{"type":52,"value":8548},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Widgets.php\n",{"type":41,"tag":298,"props":8550,"children":8552},{"class":300,"line":8551},36,[8553],{"type":41,"tag":298,"props":8554,"children":8555},{"style":315},[8556],{"type":52,"value":8309},{"type":41,"tag":298,"props":8558,"children":8560},{"class":300,"line":8559},37,[8561],{"type":41,"tag":298,"props":8562,"children":8563},{"style":305},[8564],{"type":52,"value":4243},{"type":41,"tag":298,"props":8566,"children":8568},{"class":300,"line":8567},38,[8569],{"type":41,"tag":298,"props":8570,"children":8571},{"style":315},[8572],{"type":52,"value":8309},{"type":41,"tag":298,"props":8574,"children":8576},{"class":300,"line":8575},39,[8577],{"type":41,"tag":298,"props":8578,"children":8579},{"style":305},[8580],{"type":52,"value":8331},{"type":41,"tag":298,"props":8582,"children":8584},{"class":300,"line":8583},40,[8585],{"type":41,"tag":298,"props":8586,"children":8587},{"style":315},[8588],{"type":52,"value":8309},{"type":41,"tag":298,"props":8590,"children":8592},{"class":300,"line":8591},41,[8593],{"type":41,"tag":298,"props":8594,"children":8595},{"style":305},[8596],{"type":52,"value":8346},{"type":41,"tag":298,"props":8598,"children":8600},{"class":300,"line":8599},42,[8601],{"type":41,"tag":298,"props":8602,"children":8603},{"style":315},[8604],{"type":52,"value":8309},{"type":41,"tag":298,"props":8606,"children":8608},{"class":300,"line":8607},43,[8609],{"type":41,"tag":298,"props":8610,"children":8611},{"emptyLinePlaceholder":36},[8612],{"type":52,"value":2018},{"type":41,"tag":298,"props":8614,"children":8616},{"class":300,"line":8615},44,[8617],{"type":41,"tag":298,"props":8618,"children":8619},{"emptyLinePlaceholder":36},[8620],{"type":52,"value":2018},{"type":41,"tag":298,"props":8622,"children":8624},{"class":300,"line":8623},45,[8625],{"type":41,"tag":298,"props":8626,"children":8627},{"style":305},[8628],{"type":52,"value":4227},{"type":41,"tag":298,"props":8630,"children":8632},{"class":300,"line":8631},46,[8633],{"type":41,"tag":298,"props":8634,"children":8635},{"style":315},[8636],{"type":52,"value":8309},{"type":41,"tag":298,"props":8638,"children":8640},{"class":300,"line":8639},47,[8641],{"type":41,"tag":298,"props":8642,"children":8643},{"style":305},[8644],{"type":52,"value":8645},"FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES\n",{"type":41,"tag":298,"props":8647,"children":8649},{"class":300,"line":8648},48,[8650],{"type":41,"tag":298,"props":8651,"children":8652},{"style":315},[8653],{"type":52,"value":8309},{"type":41,"tag":298,"props":8655,"children":8657},{"class":300,"line":8656},49,[8658],{"type":41,"tag":298,"props":8659,"children":8660},{"style":305},[8661],{"type":52,"value":8662}," 1 | ERROR   | [x] Header blocks must be separated by a single blank line (PSR12.Files.FileHeader.SpacingAfterBlock)\n",{"type":41,"tag":298,"props":8664,"children":8666},{"class":300,"line":8665},50,[8667],{"type":41,"tag":298,"props":8668,"children":8669},{"style":305},[8670],{"type":52,"value":8671}," 6 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters (Generic.Files.LineLength.TooLong)\n",{"type":41,"tag":298,"props":8673,"children":8675},{"class":300,"line":8674},51,[8676],{"type":41,"tag":298,"props":8677,"children":8678},{"style":305},[8679],{"type":52,"value":8680}," 8 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":8682,"children":8684},{"class":300,"line":8683},52,[8685],{"type":41,"tag":298,"props":8686,"children":8687},{"style":305},[8688],{"type":52,"value":8689},"17 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8691,"children":8693},{"class":300,"line":8692},53,[8694],{"type":41,"tag":298,"props":8695,"children":8696},{"style":305},[8697],{"type":52,"value":8698},"23 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":8700,"children":8702},{"class":300,"line":8701},54,[8703],{"type":41,"tag":298,"props":8704,"children":8705},{"style":315},[8706],{"type":52,"value":8309},{"type":41,"tag":298,"props":8708,"children":8710},{"class":300,"line":8709},55,[8711],{"type":41,"tag":298,"props":8712,"children":8713},{"style":305},[8714],{"type":52,"value":5962},{"type":41,"tag":298,"props":8716,"children":8718},{"class":300,"line":8717},56,[8719],{"type":41,"tag":298,"props":8720,"children":8721},{"style":315},[8722],{"type":52,"value":8309},{"type":41,"tag":298,"props":8724,"children":8726},{"class":300,"line":8725},57,[8727],{"type":41,"tag":298,"props":8728,"children":8729},{"emptyLinePlaceholder":36},[8730],{"type":52,"value":2018},{"type":41,"tag":298,"props":8732,"children":8734},{"class":300,"line":8733},58,[8735],{"type":41,"tag":298,"props":8736,"children":8737},{"emptyLinePlaceholder":36},[8738],{"type":52,"value":2018},{"type":41,"tag":298,"props":8740,"children":8742},{"class":300,"line":8741},59,[8743],{"type":41,"tag":298,"props":8744,"children":8745},{"style":305},[8746],{"type":52,"value":8747},"FILE: /footmate.pro/wp-content/themes/footmate/app/Core/Config.php\n",{"type":41,"tag":298,"props":8749,"children":8751},{"class":300,"line":8750},60,[8752],{"type":41,"tag":298,"props":8753,"children":8754},{"style":315},[8755],{"type":52,"value":8309},{"type":41,"tag":298,"props":8757,"children":8759},{"class":300,"line":8758},61,[8760],{"type":41,"tag":298,"props":8761,"children":8762},{"style":305},[8763],{"type":52,"value":8764},"FOUND 4 ERRORS AFFECTING 4 LINES\n",{"type":41,"tag":298,"props":8766,"children":8768},{"class":300,"line":8767},62,[8769],{"type":41,"tag":298,"props":8770,"children":8771},{"style":315},[8772],{"type":52,"value":8309},{"type":41,"tag":298,"props":8774,"children":8776},{"class":300,"line":8775},63,[8777],{"type":41,"tag":298,"props":8778,"children":8779},{"style":305},[8780],{"type":52,"value":8781},"10 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8783,"children":8785},{"class":300,"line":8784},64,[8786],{"type":41,"tag":298,"props":8787,"children":8788},{"style":305},[8789],{"type":52,"value":8790},"38 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8792,"children":8794},{"class":300,"line":8793},65,[8795],{"type":41,"tag":298,"props":8796,"children":8797},{"style":305},[8798],{"type":52,"value":8799},"53 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8801,"children":8803},{"class":300,"line":8802},66,[8804],{"type":41,"tag":298,"props":8805,"children":8806},{"style":305},[8807],{"type":52,"value":8808},"58 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8810,"children":8812},{"class":300,"line":8811},67,[8813],{"type":41,"tag":298,"props":8814,"children":8815},{"style":315},[8816],{"type":52,"value":8309},{"type":41,"tag":298,"props":8818,"children":8820},{"class":300,"line":8819},68,[8821],{"type":41,"tag":298,"props":8822,"children":8823},{"style":305},[8824],{"type":52,"value":5962},{"type":41,"tag":298,"props":8826,"children":8828},{"class":300,"line":8827},69,[8829],{"type":41,"tag":298,"props":8830,"children":8831},{"style":315},[8832],{"type":52,"value":8309},{"type":41,"tag":298,"props":8834,"children":8836},{"class":300,"line":8835},70,[8837],{"type":41,"tag":298,"props":8838,"children":8839},{"emptyLinePlaceholder":36},[8840],{"type":52,"value":2018},{"type":41,"tag":298,"props":8842,"children":8844},{"class":300,"line":8843},71,[8845],{"type":41,"tag":298,"props":8846,"children":8847},{"emptyLinePlaceholder":36},[8848],{"type":52,"value":2018},{"type":41,"tag":298,"props":8850,"children":8852},{"class":300,"line":8851},72,[8853],{"type":41,"tag":298,"props":8854,"children":8855},{"style":305},[8856],{"type":52,"value":8857},"FILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/Vite.php\n",{"type":41,"tag":298,"props":8859,"children":8861},{"class":300,"line":8860},73,[8862],{"type":41,"tag":298,"props":8863,"children":8864},{"style":315},[8865],{"type":52,"value":8309},{"type":41,"tag":298,"props":8867,"children":8869},{"class":300,"line":8868},74,[8870],{"type":41,"tag":298,"props":8871,"children":8872},{"style":305},[8873],{"type":52,"value":8764},{"type":41,"tag":298,"props":8875,"children":8876},{"class":300,"line":146},[8877],{"type":41,"tag":298,"props":8878,"children":8879},{"style":315},[8880],{"type":52,"value":8309},{"type":41,"tag":298,"props":8882,"children":8884},{"class":300,"line":8883},76,[8885],{"type":41,"tag":298,"props":8886,"children":8887},{"style":305},[8888],{"type":52,"value":8889}," 1 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":8891,"children":8893},{"class":300,"line":8892},77,[8894],{"type":41,"tag":298,"props":8895,"children":8896},{"style":305},[8897],{"type":52,"value":8331},{"type":41,"tag":298,"props":8899,"children":8901},{"class":300,"line":8900},78,[8902],{"type":41,"tag":298,"props":8903,"children":8904},{"style":305},[8905],{"type":52,"value":8906},"14 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":8908,"children":8910},{"class":300,"line":8909},79,[8911],{"type":41,"tag":298,"props":8912,"children":8913},{"style":305},[8914],{"type":52,"value":8915},"19 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":8917,"children":8919},{"class":300,"line":8918},80,[8920],{"type":41,"tag":298,"props":8921,"children":8922},{"style":315},[8923],{"type":52,"value":8309},{"type":41,"tag":298,"props":8925,"children":8927},{"class":300,"line":8926},81,[8928],{"type":41,"tag":298,"props":8929,"children":8930},{"style":305},[8931],{"type":52,"value":5962},{"type":41,"tag":298,"props":8933,"children":8935},{"class":300,"line":8934},82,[8936],{"type":41,"tag":298,"props":8937,"children":8938},{"style":315},[8939],{"type":52,"value":8309},{"type":41,"tag":298,"props":8941,"children":8943},{"class":300,"line":8942},83,[8944],{"type":41,"tag":298,"props":8945,"children":8946},{"emptyLinePlaceholder":36},[8947],{"type":52,"value":2018},{"type":41,"tag":298,"props":8949,"children":8951},{"class":300,"line":8950},84,[8952],{"type":41,"tag":298,"props":8953,"children":8954},{"emptyLinePlaceholder":36},[8955],{"type":52,"value":2018},{"type":41,"tag":298,"props":8957,"children":8959},{"class":300,"line":8958},85,[8960],{"type":41,"tag":298,"props":8961,"children":8962},{"style":305},[8963],{"type":52,"value":8964},"FILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/Integrations.php\n",{"type":41,"tag":298,"props":8966,"children":8968},{"class":300,"line":8967},86,[8969],{"type":41,"tag":298,"props":8970,"children":8971},{"style":315},[8972],{"type":52,"value":8309},{"type":41,"tag":298,"props":8974,"children":8976},{"class":300,"line":8975},87,[8977],{"type":41,"tag":298,"props":8978,"children":8979},{"style":305},[8980],{"type":52,"value":8981},"FOUND 2 ERRORS AFFECTING 2 LINES\n",{"type":41,"tag":298,"props":8983,"children":8985},{"class":300,"line":8984},88,[8986],{"type":41,"tag":298,"props":8987,"children":8988},{"style":315},[8989],{"type":52,"value":8309},{"type":41,"tag":298,"props":8991,"children":8993},{"class":300,"line":8992},89,[8994],{"type":41,"tag":298,"props":8995,"children":8996},{"style":305},[8997],{"type":52,"value":8998},"16 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9000,"children":9002},{"class":300,"line":9001},90,[9003],{"type":41,"tag":298,"props":9004,"children":9005},{"style":305},[9006],{"type":52,"value":9007},"25 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9009,"children":9011},{"class":300,"line":9010},91,[9012],{"type":41,"tag":298,"props":9013,"children":9014},{"style":315},[9015],{"type":52,"value":8309},{"type":41,"tag":298,"props":9017,"children":9019},{"class":300,"line":9018},92,[9020],{"type":41,"tag":298,"props":9021,"children":9022},{"style":305},[9023],{"type":52,"value":9024},"PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":9026,"children":9028},{"class":300,"line":9027},93,[9029],{"type":41,"tag":298,"props":9030,"children":9031},{"style":315},[9032],{"type":52,"value":8309},{"type":41,"tag":298,"props":9034,"children":9036},{"class":300,"line":9035},94,[9037],{"type":41,"tag":298,"props":9038,"children":9039},{"emptyLinePlaceholder":36},[9040],{"type":52,"value":2018},{"type":41,"tag":298,"props":9042,"children":9044},{"class":300,"line":9043},95,[9045],{"type":41,"tag":298,"props":9046,"children":9047},{"emptyLinePlaceholder":36},[9048],{"type":52,"value":2018},{"type":41,"tag":298,"props":9050,"children":9052},{"class":300,"line":9051},96,[9053],{"type":41,"tag":298,"props":9054,"children":9055},{"style":305},[9056],{"type":52,"value":9057},"FILE: /footmate.pro/wp-content/themes/footmate/app/Integrations/ESPN.php\n",{"type":41,"tag":298,"props":9059,"children":9061},{"class":300,"line":9060},97,[9062],{"type":41,"tag":298,"props":9063,"children":9064},{"style":315},[9065],{"type":52,"value":8309},{"type":41,"tag":298,"props":9067,"children":9069},{"class":300,"line":9068},98,[9070],{"type":41,"tag":298,"props":9071,"children":9072},{"style":305},[9073],{"type":52,"value":9074},"FOUND 3 ERRORS AFFECTING 3 LINES\n",{"type":41,"tag":298,"props":9076,"children":9078},{"class":300,"line":9077},99,[9079],{"type":41,"tag":298,"props":9080,"children":9081},{"style":315},[9082],{"type":52,"value":8309},{"type":41,"tag":298,"props":9084,"children":9086},{"class":300,"line":9085},100,[9087],{"type":41,"tag":298,"props":9088,"children":9089},{"style":305},[9090],{"type":52,"value":8889},{"type":41,"tag":298,"props":9092,"children":9094},{"class":300,"line":9093},101,[9095],{"type":41,"tag":298,"props":9096,"children":9097},{"style":305},[9098],{"type":52,"value":9099},"13 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9101,"children":9103},{"class":300,"line":9102},102,[9104],{"type":41,"tag":298,"props":9105,"children":9106},{"style":305},[9107],{"type":52,"value":9108},"26 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9110,"children":9112},{"class":300,"line":9111},103,[9113],{"type":41,"tag":298,"props":9114,"children":9115},{"style":315},[9116],{"type":52,"value":8309},{"type":41,"tag":298,"props":9118,"children":9120},{"class":300,"line":9119},104,[9121],{"type":41,"tag":298,"props":9122,"children":9123},{"style":305},[9124],{"type":52,"value":9125},"PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":9127,"children":9129},{"class":300,"line":9128},105,[9130],{"type":41,"tag":298,"props":9131,"children":9132},{"style":315},[9133],{"type":52,"value":8309},{"type":41,"tag":298,"props":9135,"children":9137},{"class":300,"line":9136},106,[9138],{"type":41,"tag":298,"props":9139,"children":9140},{"emptyLinePlaceholder":36},[9141],{"type":52,"value":2018},{"type":41,"tag":298,"props":9143,"children":9145},{"class":300,"line":9144},107,[9146],{"type":41,"tag":298,"props":9147,"children":9148},{"emptyLinePlaceholder":36},[9149],{"type":52,"value":2018},{"type":41,"tag":298,"props":9151,"children":9153},{"class":300,"line":9152},108,[9154],{"type":41,"tag":298,"props":9155,"children":9156},{"style":305},[9157],{"type":52,"value":9158},"FILE: /footmate.pro/wp-content/themes/footmate/app/Teams/Teams.php\n",{"type":41,"tag":298,"props":9160,"children":9162},{"class":300,"line":9161},109,[9163],{"type":41,"tag":298,"props":9164,"children":9165},{"style":315},[9166],{"type":52,"value":8309},{"type":41,"tag":298,"props":9168,"children":9170},{"class":300,"line":9169},110,[9171],{"type":41,"tag":298,"props":9172,"children":9173},{"style":305},[9174],{"type":52,"value":4243},{"type":41,"tag":298,"props":9176,"children":9178},{"class":300,"line":9177},111,[9179],{"type":41,"tag":298,"props":9180,"children":9181},{"style":315},[9182],{"type":52,"value":8309},{"type":41,"tag":298,"props":9184,"children":9186},{"class":300,"line":9185},112,[9187],{"type":41,"tag":298,"props":9188,"children":9189},{"style":305},[9190],{"type":52,"value":8331},{"type":41,"tag":298,"props":9192,"children":9194},{"class":300,"line":9193},113,[9195],{"type":41,"tag":298,"props":9196,"children":9197},{"style":315},[9198],{"type":52,"value":8309},{"type":41,"tag":298,"props":9200,"children":9202},{"class":300,"line":9201},114,[9203],{"type":41,"tag":298,"props":9204,"children":9205},{"style":305},[9206],{"type":52,"value":8346},{"type":41,"tag":298,"props":9208,"children":9210},{"class":300,"line":9209},115,[9211],{"type":41,"tag":298,"props":9212,"children":9213},{"style":315},[9214],{"type":52,"value":8309},{"type":41,"tag":298,"props":9216,"children":9218},{"class":300,"line":9217},116,[9219],{"type":41,"tag":298,"props":9220,"children":9221},{"emptyLinePlaceholder":36},[9222],{"type":52,"value":2018},{"type":41,"tag":298,"props":9224,"children":9226},{"class":300,"line":9225},117,[9227],{"type":41,"tag":298,"props":9228,"children":9229},{"emptyLinePlaceholder":36},[9230],{"type":52,"value":2018},{"type":41,"tag":298,"props":9232,"children":9234},{"class":300,"line":9233},118,[9235],{"type":41,"tag":298,"props":9236,"children":9237},{"style":305},[9238],{"type":52,"value":9239},"FILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Resolver.php\n",{"type":41,"tag":298,"props":9241,"children":9243},{"class":300,"line":9242},119,[9244],{"type":41,"tag":298,"props":9245,"children":9246},{"style":315},[9247],{"type":52,"value":8309},{"type":41,"tag":298,"props":9249,"children":9251},{"class":300,"line":9250},120,[9252],{"type":41,"tag":298,"props":9253,"children":9254},{"style":305},[9255],{"type":52,"value":9256},"FOUND 5 ERRORS AND 1 WARNING AFFECTING 6 LINES\n",{"type":41,"tag":298,"props":9258,"children":9260},{"class":300,"line":9259},121,[9261],{"type":41,"tag":298,"props":9262,"children":9263},{"style":315},[9264],{"type":52,"value":8309},{"type":41,"tag":298,"props":9266,"children":9268},{"class":300,"line":9267},122,[9269],{"type":41,"tag":298,"props":9270,"children":9271},{"style":305},[9272],{"type":52,"value":9273}," 1 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9275,"children":9277},{"class":300,"line":9276},123,[9278],{"type":41,"tag":298,"props":9279,"children":9280},{"style":305},[9281],{"type":52,"value":9282},"26 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9284,"children":9286},{"class":300,"line":9285},124,[9287],{"type":41,"tag":298,"props":9288,"children":9289},{"style":305},[9290],{"type":52,"value":9291},"30 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9293,"children":9295},{"class":300,"line":9294},125,[9296],{"type":41,"tag":298,"props":9297,"children":9298},{"style":305},[9299],{"type":52,"value":9300},"36 | WARNING | [ ] Line exceeds 120 characters; contains 121 characters (Generic.Files.LineLength.TooLong)\n",{"type":41,"tag":298,"props":9302,"children":9304},{"class":300,"line":9303},126,[9305],{"type":41,"tag":298,"props":9306,"children":9307},{"style":305},[9308],{"type":52,"value":9309},"45 | ERROR   | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9311,"children":9313},{"class":300,"line":9312},127,[9314],{"type":41,"tag":298,"props":9315,"children":9316},{"style":305},[9317],{"type":52,"value":9318},"49 | ERROR   | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9320,"children":9322},{"class":300,"line":9321},128,[9323],{"type":41,"tag":298,"props":9324,"children":9325},{"style":315},[9326],{"type":52,"value":8309},{"type":41,"tag":298,"props":9328,"children":9330},{"class":300,"line":9329},129,[9331],{"type":41,"tag":298,"props":9332,"children":9333},{"style":305},[9334],{"type":52,"value":9335},"PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":9337,"children":9339},{"class":300,"line":9338},130,[9340],{"type":41,"tag":298,"props":9341,"children":9342},{"style":315},[9343],{"type":52,"value":8309},{"type":41,"tag":298,"props":9345,"children":9347},{"class":300,"line":9346},131,[9348],{"type":41,"tag":298,"props":9349,"children":9350},{"emptyLinePlaceholder":36},[9351],{"type":52,"value":2018},{"type":41,"tag":298,"props":9353,"children":9355},{"class":300,"line":9354},132,[9356],{"type":41,"tag":298,"props":9357,"children":9358},{"emptyLinePlaceholder":36},[9359],{"type":52,"value":2018},{"type":41,"tag":298,"props":9361,"children":9363},{"class":300,"line":9362},133,[9364],{"type":41,"tag":298,"props":9365,"children":9366},{"style":305},[9367],{"type":52,"value":9368},"FILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Templates.php\n",{"type":41,"tag":298,"props":9370,"children":9372},{"class":300,"line":9371},134,[9373],{"type":41,"tag":298,"props":9374,"children":9375},{"style":315},[9376],{"type":52,"value":8309},{"type":41,"tag":298,"props":9378,"children":9380},{"class":300,"line":9379},135,[9381],{"type":41,"tag":298,"props":9382,"children":9383},{"style":305},[9384],{"type":52,"value":8764},{"type":41,"tag":298,"props":9386,"children":9388},{"class":300,"line":9387},136,[9389],{"type":41,"tag":298,"props":9390,"children":9391},{"style":315},[9392],{"type":52,"value":8309},{"type":41,"tag":298,"props":9394,"children":9396},{"class":300,"line":9395},137,[9397],{"type":41,"tag":298,"props":9398,"children":9399},{"style":305},[9400],{"type":52,"value":8889},{"type":41,"tag":298,"props":9402,"children":9404},{"class":300,"line":9403},138,[9405],{"type":41,"tag":298,"props":9406,"children":9407},{"style":305},[9408],{"type":52,"value":9409},"15 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9411,"children":9413},{"class":300,"line":9412},139,[9414],{"type":41,"tag":298,"props":9415,"children":9416},{"style":305},[9417],{"type":52,"value":9418},"21 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9420,"children":9422},{"class":300,"line":9421},140,[9423],{"type":41,"tag":298,"props":9424,"children":9425},{"style":305},[9426],{"type":52,"value":9108},{"type":41,"tag":298,"props":9428,"children":9430},{"class":300,"line":9429},141,[9431],{"type":41,"tag":298,"props":9432,"children":9433},{"style":315},[9434],{"type":52,"value":8309},{"type":41,"tag":298,"props":9436,"children":9438},{"class":300,"line":9437},142,[9439],{"type":41,"tag":298,"props":9440,"children":9441},{"style":305},[9442],{"type":52,"value":5962},{"type":41,"tag":298,"props":9444,"children":9446},{"class":300,"line":9445},143,[9447],{"type":41,"tag":298,"props":9448,"children":9449},{"style":315},[9450],{"type":52,"value":8309},{"type":41,"tag":298,"props":9452,"children":9454},{"class":300,"line":9453},144,[9455],{"type":41,"tag":298,"props":9456,"children":9457},{"emptyLinePlaceholder":36},[9458],{"type":52,"value":2018},{"type":41,"tag":298,"props":9460,"children":9462},{"class":300,"line":9461},145,[9463],{"type":41,"tag":298,"props":9464,"children":9465},{"emptyLinePlaceholder":36},[9466],{"type":52,"value":2018},{"type":41,"tag":298,"props":9468,"children":9470},{"class":300,"line":9469},146,[9471],{"type":41,"tag":298,"props":9472,"children":9473},{"style":305},[9474],{"type":52,"value":9475},"FILE: /footmate.pro/wp-content/themes/footmate/app/Templates/Provider.php\n",{"type":41,"tag":298,"props":9477,"children":9479},{"class":300,"line":9478},147,[9480],{"type":41,"tag":298,"props":9481,"children":9482},{"style":315},[9483],{"type":52,"value":8309},{"type":41,"tag":298,"props":9485,"children":9487},{"class":300,"line":9486},148,[9488],{"type":41,"tag":298,"props":9489,"children":9490},{"style":305},[9491],{"type":52,"value":9492},"FOUND 10 ERRORS AFFECTING 9 LINES\n",{"type":41,"tag":298,"props":9494,"children":9496},{"class":300,"line":9495},149,[9497],{"type":41,"tag":298,"props":9498,"children":9499},{"style":315},[9500],{"type":52,"value":8309},{"type":41,"tag":298,"props":9502,"children":9504},{"class":300,"line":9503},150,[9505],{"type":41,"tag":298,"props":9506,"children":9507},{"style":305},[9508],{"type":52,"value":8889},{"type":41,"tag":298,"props":9510,"children":9512},{"class":300,"line":9511},151,[9513],{"type":41,"tag":298,"props":9514,"children":9515},{"style":305},[9516],{"type":52,"value":9517},"17 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9519,"children":9521},{"class":300,"line":9520},152,[9522],{"type":41,"tag":298,"props":9523,"children":9524},{"style":305},[9525],{"type":52,"value":9526},"22 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9528,"children":9530},{"class":300,"line":9529},153,[9531],{"type":41,"tag":298,"props":9532,"children":9533},{"style":305},[9534],{"type":52,"value":9535},"22 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9537,"children":9539},{"class":300,"line":9538},154,[9540],{"type":41,"tag":298,"props":9541,"children":9542},{"style":305},[9543],{"type":52,"value":9544},"27 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9546,"children":9548},{"class":300,"line":9547},155,[9549],{"type":41,"tag":298,"props":9550,"children":9551},{"style":305},[9552],{"type":52,"value":9553},"28 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9555,"children":9557},{"class":300,"line":9556},156,[9558],{"type":41,"tag":298,"props":9559,"children":9560},{"style":305},[9561],{"type":52,"value":9562},"29 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9564,"children":9566},{"class":300,"line":9565},157,[9567],{"type":41,"tag":298,"props":9568,"children":9569},{"style":305},[9570],{"type":52,"value":9571},"32 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9573,"children":9575},{"class":300,"line":9574},158,[9576],{"type":41,"tag":298,"props":9577,"children":9578},{"style":305},[9579],{"type":52,"value":9580},"34 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9582,"children":9584},{"class":300,"line":9583},159,[9585],{"type":41,"tag":298,"props":9586,"children":9587},{"style":305},[9588],{"type":52,"value":9589},"39 | ERROR | [x] Whitespace found at end of line (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine)\n",{"type":41,"tag":298,"props":9591,"children":9593},{"class":300,"line":9592},160,[9594],{"type":41,"tag":298,"props":9595,"children":9596},{"style":315},[9597],{"type":52,"value":8309},{"type":41,"tag":298,"props":9599,"children":9601},{"class":300,"line":9600},161,[9602],{"type":41,"tag":298,"props":9603,"children":9604},{"style":305},[9605],{"type":52,"value":9606},"PHPCBF CAN FIX THE 10 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n",{"type":41,"tag":298,"props":9608,"children":9610},{"class":300,"line":9609},162,[9611],{"type":41,"tag":298,"props":9612,"children":9613},{"style":315},[9614],{"type":52,"value":8309},{"type":41,"tag":298,"props":9616,"children":9618},{"class":300,"line":9617},163,[9619],{"type":41,"tag":298,"props":9620,"children":9621},{"emptyLinePlaceholder":36},[9622],{"type":52,"value":2018},{"type":41,"tag":298,"props":9624,"children":9626},{"class":300,"line":9625},164,[9627],{"type":41,"tag":298,"props":9628,"children":9629},{"emptyLinePlaceholder":36},[9630],{"type":52,"value":2018},{"type":41,"tag":298,"props":9632,"children":9634},{"class":300,"line":9633},165,[9635],{"type":41,"tag":298,"props":9636,"children":9637},{"style":305},[9638],{"type":52,"value":9639},"FILE: /footmate.pro/wp-content/themes/footmate/app/Assets/Resolver.php\n",{"type":41,"tag":298,"props":9641,"children":9643},{"class":300,"line":9642},166,[9644],{"type":41,"tag":298,"props":9645,"children":9646},{"style":315},[9647],{"type":52,"value":8309},{"type":41,"tag":298,"props":9649,"children":9651},{"class":300,"line":9650},167,[9652],{"type":41,"tag":298,"props":9653,"children":9654},{"style":305},[9655],{"type":52,"value":8764},{"type":41,"tag":298,"props":9657,"children":9659},{"class":300,"line":9658},168,[9660],{"type":41,"tag":298,"props":9661,"children":9662},{"style":315},[9663],{"type":52,"value":8309},{"type":41,"tag":298,"props":9665,"children":9667},{"class":300,"line":9666},169,[9668],{"type":41,"tag":298,"props":9669,"children":9670},{"style":305},[9671],{"type":52,"value":8889},{"type":41,"tag":298,"props":9673,"children":9675},{"class":300,"line":9674},170,[9676],{"type":41,"tag":298,"props":9677,"children":9678},{"style":305},[9679],{"type":52,"value":9099},{"type":41,"tag":298,"props":9681,"children":9683},{"class":300,"line":9682},171,[9684],{"type":41,"tag":298,"props":9685,"children":9686},{"style":305},[9687],{"type":52,"value":9544},{"type":41,"tag":298,"props":9689,"children":9691},{"class":300,"line":9690},172,[9692],{"type":41,"tag":298,"props":9693,"children":9694},{"style":305},[9695],{"type":52,"value":9696},"36 | ERROR | [x] Opening brace should be on the same line as the declaration (Generic.Functions.OpeningFunctionBraceKernighanRitchie.BraceOnNewLine)\n",{"type":41,"tag":298,"props":9698,"children":9700},{"class":300,"line":9699},173,[9701],{"type":41,"tag":298,"props":9702,"children":9703},{"style":315},[9704],{"type":52,"value":8309},{"type":41,"tag":298,"props":9706,"children":9708},{"class":300,"line":9707},174,[9709],{"type":41,"tag":298,"props":9710,"children":9711},{"style":305},[9712],{"type":52,"value":5962},{"type":41,"tag":298,"props":9714,"children":9716},{"class":300,"line":9715},175,[9717],{"type":41,"tag":298,"props":9718,"children":9719},{"style":315},[9720],{"type":52,"value":8309},{"type":41,"tag":298,"props":9722,"children":9724},{"class":300,"line":9723},176,[9725],{"type":41,"tag":298,"props":9726,"children":9727},{"emptyLinePlaceholder":36},[9728],{"type":52,"value":2018},{"type":41,"tag":298,"props":9730,"children":9732},{"class":300,"line":9731},177,[9733],{"type":41,"tag":298,"props":9734,"children":9735},{"emptyLinePlaceholder":36},[9736],{"type":52,"value":2018},{"type":41,"tag":298,"props":9738,"children":9740},{"class":300,"line":9739},178,[9741],{"type":41,"tag":298,"props":9742,"children":9743},{"style":305},[9744],{"type":52,"value":9745},"FILE: /footmate.pro/wp-content/themes/footmate/app/Assets/Assets.php\n",{"type":41,"tag":298,"props":9747,"children":9749},{"class":300,"line":9748},179,[9750],{"type":41,"tag":298,"props":9751,"children":9752},{"style":315},[9753],{"type":52,"value":8309},{"type":41,"tag":298,"props":9755,"children":9757},{"class":300,"line":9756},180,[9758],{"type":41,"tag":298,"props":9759,"children":9760},{"style":305},[9761],{"type":52,"value":8981},{"type":41,"tag":298,"props":9763,"children":9765},{"class":300,"line":9764},181,[9766],{"type":41,"tag":298,"props":9767,"children":9768},{"style":315},[9769],{"type":52,"value":8309},{"type":41,"tag":298,"props":9771,"children":9773},{"class":300,"line":9772},182,[9774],{"type":41,"tag":298,"props":9775,"children":9776},{"style":305},[9777],{"type":52,"value":8889},{"type":41,"tag":298,"props":9779,"children":9781},{"class":300,"line":9780},183,[9782],{"type":41,"tag":298,"props":9783,"children":9784},{"style":305},[9785],{"type":52,"value":9409},{"type":41,"tag":298,"props":9787,"children":9789},{"class":300,"line":9788},184,[9790],{"type":41,"tag":298,"props":9791,"children":9792},{"style":315},[9793],{"type":52,"value":8309},{"type":41,"tag":298,"props":9795,"children":9797},{"class":300,"line":9796},185,[9798],{"type":41,"tag":298,"props":9799,"children":9800},{"style":305},[9801],{"type":52,"value":9024},{"type":41,"tag":298,"props":9803,"children":9805},{"class":300,"line":9804},186,[9806],{"type":41,"tag":298,"props":9807,"children":9808},{"style":315},[9809],{"type":52,"value":8309},{"type":41,"tag":48,"props":9811,"children":9812},{},[9813,9815,9820],{"type":52,"value":9814},"Now, our code looks like shit 😅 There are tons of errors across all the PHP files because we used a different approach earlier. But no worry! Just run the ",{"type":41,"tag":278,"props":9816,"children":9818},{"className":9817},[],[9819],{"type":52,"value":4022},{"type":52,"value":9821}," and your whole codebase will be formatted automatically.",{"type":41,"tag":79,"props":9823,"children":9824},{},[],{"type":41,"tag":83,"props":9826,"children":9828},{"id":9827},"how-to-use-php-code-sniffer-with-vs-code",[9829],{"type":52,"value":9830},"How to use PHP Code Sniffer with VS Code?",{"type":41,"tag":48,"props":9832,"children":9833},{},[9834,9836,9843],{"type":52,"value":9835},"Let's face it. CLI usage is great, but I'm lazy, so I don't want to run linter whenever I want to check the code for potential problems. As you remember from the previous article I like to see the problems just while writing! That's where extensions come in handy. I use VS Code editor which provides a ",{"type":41,"tag":55,"props":9837,"children":9840},{"href":9838,"rel":9839},"https://marketplace.visualstudio.com/items?itemName=obliviousharmony.vscode-php-codesniffer",[59],[9841],{"type":52,"value":9842},"plugin",{"type":52,"value":9844}," for adding PHP Code Sniffer support.",{"type":41,"tag":48,"props":9846,"children":9847},{},[9848,9850,9856],{"type":52,"value":9849},"At first install the ",{"type":41,"tag":55,"props":9851,"children":9853},{"href":9838,"rel":9852},[59],[9854],{"type":52,"value":9855},"extension",{"type":52,"value":9857},". Then go to the plugin settings and set the following items:",{"type":41,"tag":9859,"props":9860,"children":9861},"ul",{},[9862,9881],{"type":41,"tag":9863,"props":9864,"children":9865},"li",{},[9866,9872,9874,9879],{"type":41,"tag":278,"props":9867,"children":9869},{"className":9868},[],[9870],{"type":52,"value":9871},"PHP Code Sniffer: Auto Executable",{"type":52,"value":9873}," This setting enables searching for the ",{"type":41,"tag":278,"props":9875,"children":9877},{"className":9876},[],[9878],{"type":52,"value":1305},{"type":52,"value":9880}," script in the current and the parent directories.",{"type":41,"tag":9863,"props":9882,"children":9883},{},[9884,9890],{"type":41,"tag":278,"props":9885,"children":9887},{"className":9886},[],[9888],{"type":52,"value":9889},"PHP Code Sniffer: Standard",{"type":52,"value":9891}," This setting defines that the plugin should search for the configuration file in the current and parent directories.",{"type":41,"tag":48,"props":9893,"children":9894},{},[9895],{"type":41,"tag":164,"props":9896,"children":9898},{"alt":166,"src":9897},"https://cdn.pragmate.dev/wp-content/uploads/2024/03/03f2b391-aefc-4fe7-b39a-8710922fab89.png",[],{"type":41,"tag":48,"props":9900,"children":9901},{},[9902],{"type":52,"value":9903},"Now, if you open the PHP file, you'll see all the problems immediately as you write. So skipping the violations \"because you haven't noticed them\" is impossible now. Any red highlight means that the code is not compliant with the rules and needs to be fixed, before pushing the results to the repository. That's a great boost for you and the team.",{"type":41,"tag":48,"props":9905,"children":9906},{},[9907],{"type":52,"value":9908},"You can write code that is clean by default, but now you can also write code that looks like shit and then run the command to format a code for you. I use this often.",{"type":41,"tag":48,"props":9910,"children":9911},{},[9912],{"type":41,"tag":164,"props":9913,"children":9915},{"alt":166,"src":9914},"https://cdn.pragmate.dev/wp-content/uploads/2024/03/aa188281-9899-488f-a8e7-8832428e4f7c.png",[],{"type":41,"tag":79,"props":9917,"children":9918},{},[],{"type":41,"tag":83,"props":9920,"children":9922},{"id":9921},"how-to-work-with-php-code-sniffer-docs",[9923],{"type":52,"value":9924},"How to work with PHP Code Sniffer docs?",{"type":41,"tag":48,"props":9926,"children":9927},{},[9928,9930,9935,9937,9944],{"type":52,"value":9929},"There is one big problem that has always bothered me. ",{"type":41,"tag":95,"props":9931,"children":9932},{},[9933],{"type":52,"value":9934},"How do I know which rule to use for my needs?",{"type":52,"value":9936}," Here, things become more complicated, because of the docs that are still in progress. I have problems finding the rules I could use to build my standards or their explanations, and I know ",{"type":41,"tag":55,"props":9938,"children":9941},{"href":9939,"rel":9940},"https://github.com/squizlabs/PHP_CodeSniffer/issues/1752#issuecomment-750927206",[59],[9942],{"type":52,"value":9943},"I'm not the only one",{"type":52,"value":140},{"type":41,"tag":48,"props":9946,"children":9947},{},[9948,9950,9955,9957,9962],{"type":52,"value":9949},"We can list all the sniffs in the specific coding standard by adding the ",{"type":41,"tag":278,"props":9951,"children":9953},{"className":9952},[],[9954],{"type":52,"value":4670},{"type":52,"value":9956}," attribute with ",{"type":41,"tag":278,"props":9958,"children":9960},{"className":9959},[],[9961],{"type":52,"value":1305},{"type":52,"value":9963}," command, but there are no explanations so we need to check them manually.",{"type":41,"tag":287,"props":9965,"children":9967},{"className":1996,"code":9966,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs --standard=PEAR -e\n\nThe PEAR standard contains 28 sniffs\n\nGeneric (9 sniffs)\n------------------\n  Generic.Commenting.DocComment\n  Generic.ControlStructures.InlineControlStructure\n  Generic.Files.LineEndings\n  Generic.Files.LineLength\n  Generic.Functions.FunctionCallArgumentSpacing\n  Generic.NamingConventions.UpperCaseConstantName\n  Generic.PHP.DisallowShortOpenTag\n  Generic.PHP.LowerCaseConstant\n  Generic.WhiteSpace.DisallowTabIndent\n\n...\n",[9968],{"type":41,"tag":278,"props":9969,"children":9970},{"__ignoreMap":7},[9971,9979,9986,9994,10001,10009,10017,10025,10033,10041,10049,10057,10065,10073,10081,10089,10096],{"type":41,"tag":298,"props":9972,"children":9973},{"class":300,"line":301},[9974],{"type":41,"tag":298,"props":9975,"children":9976},{"style":305},[9977],{"type":52,"value":9978},"vendor/bin/phpcs --standard=PEAR -e\n",{"type":41,"tag":298,"props":9980,"children":9981},{"class":300,"line":311},[9982],{"type":41,"tag":298,"props":9983,"children":9984},{"emptyLinePlaceholder":36},[9985],{"type":52,"value":2018},{"type":41,"tag":298,"props":9987,"children":9988},{"class":300,"line":326},[9989],{"type":41,"tag":298,"props":9990,"children":9991},{"style":305},[9992],{"type":52,"value":9993},"The PEAR standard contains 28 sniffs\n",{"type":41,"tag":298,"props":9995,"children":9996},{"class":300,"line":341},[9997],{"type":41,"tag":298,"props":9998,"children":9999},{"emptyLinePlaceholder":36},[10000],{"type":52,"value":2018},{"type":41,"tag":298,"props":10002,"children":10003},{"class":300,"line":354},[10004],{"type":41,"tag":298,"props":10005,"children":10006},{"style":305},[10007],{"type":52,"value":10008},"Generic (9 sniffs)\n",{"type":41,"tag":298,"props":10010,"children":10011},{"class":300,"line":367},[10012],{"type":41,"tag":298,"props":10013,"children":10014},{"style":315},[10015],{"type":52,"value":10016},"------------------\n",{"type":41,"tag":298,"props":10018,"children":10019},{"class":300,"line":380},[10020],{"type":41,"tag":298,"props":10021,"children":10022},{"style":305},[10023],{"type":52,"value":10024},"  Generic.Commenting.DocComment\n",{"type":41,"tag":298,"props":10026,"children":10027},{"class":300,"line":389},[10028],{"type":41,"tag":298,"props":10029,"children":10030},{"style":305},[10031],{"type":52,"value":10032},"  Generic.ControlStructures.InlineControlStructure\n",{"type":41,"tag":298,"props":10034,"children":10035},{"class":300,"line":398},[10036],{"type":41,"tag":298,"props":10037,"children":10038},{"style":305},[10039],{"type":52,"value":10040},"  Generic.Files.LineEndings\n",{"type":41,"tag":298,"props":10042,"children":10043},{"class":300,"line":411},[10044],{"type":41,"tag":298,"props":10045,"children":10046},{"style":305},[10047],{"type":52,"value":10048},"  Generic.Files.LineLength\n",{"type":41,"tag":298,"props":10050,"children":10051},{"class":300,"line":424},[10052],{"type":41,"tag":298,"props":10053,"children":10054},{"style":305},[10055],{"type":52,"value":10056},"  Generic.Functions.FunctionCallArgumentSpacing\n",{"type":41,"tag":298,"props":10058,"children":10059},{"class":300,"line":433},[10060],{"type":41,"tag":298,"props":10061,"children":10062},{"style":305},[10063],{"type":52,"value":10064},"  Generic.NamingConventions.UpperCaseConstantName\n",{"type":41,"tag":298,"props":10066,"children":10067},{"class":300,"line":441},[10068],{"type":41,"tag":298,"props":10069,"children":10070},{"style":305},[10071],{"type":52,"value":10072},"  Generic.PHP.DisallowShortOpenTag\n",{"type":41,"tag":298,"props":10074,"children":10075},{"class":300,"line":454},[10076],{"type":41,"tag":298,"props":10077,"children":10078},{"style":305},[10079],{"type":52,"value":10080},"  Generic.PHP.LowerCaseConstant\n",{"type":41,"tag":298,"props":10082,"children":10083},{"class":300,"line":467},[10084],{"type":41,"tag":298,"props":10085,"children":10086},{"style":305},[10087],{"type":52,"value":10088},"  Generic.WhiteSpace.DisallowTabIndent\n",{"type":41,"tag":298,"props":10090,"children":10091},{"class":300,"line":476},[10092],{"type":41,"tag":298,"props":10093,"children":10094},{"emptyLinePlaceholder":36},[10095],{"type":52,"value":2018},{"type":41,"tag":298,"props":10097,"children":10098},{"class":300,"line":484},[10099],{"type":41,"tag":298,"props":10100,"children":10101},{"style":305},[10102],{"type":52,"value":10103},"...\n",{"type":41,"tag":48,"props":10105,"children":10106},{},[10107,10109,10115],{"type":52,"value":10108},"We can show more docs by using the ",{"type":41,"tag":278,"props":10110,"children":10112},{"className":10111},[],[10113],{"type":52,"value":10114},"vendor/bin/phpcs --standard=PEAR --generator=text",{"type":52,"value":10116}," command which provides more useful info but the sniff codes are not available there. If we find a useful pattern, we need to spend time and search for the sniff code again.",{"type":41,"tag":287,"props":10118,"children":10120},{"className":1996,"code":10119,"language":1998,"meta":7,"style":7},"vendor/bin/phpcs --standard=PEAR --generator=text\n\n---------------------------------------------\n| GENERIC CODING STANDARD: CONSTRUCTOR NAME |\n---------------------------------------------\n\nConstructors should be named __construct, not after the class.\n\n----------------------------------------- CODE COMPARISON ------------------------------------------\n| Valid: The constructor is named __construct.   | Invalid: The old style class name constructor   |\n|                                                | is used.                                        |\n----------------------------------------------------------------------------------------------------\n| class Foo                                      | class Foo                                       |\n| {                                              | {                                               |\n|     function __construct()                     |     function Foo()                              |\n|     {                                          |     {                                           |\n|     }                                          |     }                                           |\n| }                                              | }                                               |\n----------------------------------------------------------------------------------------------------\n",[10121],{"type":41,"tag":278,"props":10122,"children":10123},{"__ignoreMap":7},[10124,10132,10139,10147,10155,10162,10169,10177,10184,10192,10200,10208,10216,10224,10232,10240,10248,10256,10264],{"type":41,"tag":298,"props":10125,"children":10126},{"class":300,"line":301},[10127],{"type":41,"tag":298,"props":10128,"children":10129},{"style":305},[10130],{"type":52,"value":10131},"vendor/bin/phpcs --standard=PEAR --generator=text\n",{"type":41,"tag":298,"props":10133,"children":10134},{"class":300,"line":311},[10135],{"type":41,"tag":298,"props":10136,"children":10137},{"emptyLinePlaceholder":36},[10138],{"type":52,"value":2018},{"type":41,"tag":298,"props":10140,"children":10141},{"class":300,"line":326},[10142],{"type":41,"tag":298,"props":10143,"children":10144},{"style":315},[10145],{"type":52,"value":10146},"---------------------------------------------\n",{"type":41,"tag":298,"props":10148,"children":10149},{"class":300,"line":341},[10150],{"type":41,"tag":298,"props":10151,"children":10152},{"style":305},[10153],{"type":52,"value":10154},"| GENERIC CODING STANDARD: CONSTRUCTOR NAME |\n",{"type":41,"tag":298,"props":10156,"children":10157},{"class":300,"line":354},[10158],{"type":41,"tag":298,"props":10159,"children":10160},{"style":315},[10161],{"type":52,"value":10146},{"type":41,"tag":298,"props":10163,"children":10164},{"class":300,"line":367},[10165],{"type":41,"tag":298,"props":10166,"children":10167},{"emptyLinePlaceholder":36},[10168],{"type":52,"value":2018},{"type":41,"tag":298,"props":10170,"children":10171},{"class":300,"line":380},[10172],{"type":41,"tag":298,"props":10173,"children":10174},{"style":305},[10175],{"type":52,"value":10176},"Constructors should be named __construct, not after the class.\n",{"type":41,"tag":298,"props":10178,"children":10179},{"class":300,"line":389},[10180],{"type":41,"tag":298,"props":10181,"children":10182},{"emptyLinePlaceholder":36},[10183],{"type":52,"value":2018},{"type":41,"tag":298,"props":10185,"children":10186},{"class":300,"line":398},[10187],{"type":41,"tag":298,"props":10188,"children":10189},{"style":315},[10190],{"type":52,"value":10191},"----------------------------------------- CODE COMPARISON ------------------------------------------\n",{"type":41,"tag":298,"props":10193,"children":10194},{"class":300,"line":411},[10195],{"type":41,"tag":298,"props":10196,"children":10197},{"style":305},[10198],{"type":52,"value":10199},"| Valid: The constructor is named __construct.   | Invalid: The old style class name constructor   |\n",{"type":41,"tag":298,"props":10201,"children":10202},{"class":300,"line":424},[10203],{"type":41,"tag":298,"props":10204,"children":10205},{"style":305},[10206],{"type":52,"value":10207},"|                                                | is used.                                        |\n",{"type":41,"tag":298,"props":10209,"children":10210},{"class":300,"line":433},[10211],{"type":41,"tag":298,"props":10212,"children":10213},{"style":315},[10214],{"type":52,"value":10215},"----------------------------------------------------------------------------------------------------\n",{"type":41,"tag":298,"props":10217,"children":10218},{"class":300,"line":441},[10219],{"type":41,"tag":298,"props":10220,"children":10221},{"style":305},[10222],{"type":52,"value":10223},"| class Foo                                      | class Foo                                       |\n",{"type":41,"tag":298,"props":10225,"children":10226},{"class":300,"line":454},[10227],{"type":41,"tag":298,"props":10228,"children":10229},{"style":305},[10230],{"type":52,"value":10231},"| {                                              | {                                               |\n",{"type":41,"tag":298,"props":10233,"children":10234},{"class":300,"line":467},[10235],{"type":41,"tag":298,"props":10236,"children":10237},{"style":305},[10238],{"type":52,"value":10239},"|     function __construct()                     |     function Foo()                              |\n",{"type":41,"tag":298,"props":10241,"children":10242},{"class":300,"line":476},[10243],{"type":41,"tag":298,"props":10244,"children":10245},{"style":305},[10246],{"type":52,"value":10247},"|     {                                          |     {                                           |\n",{"type":41,"tag":298,"props":10249,"children":10250},{"class":300,"line":484},[10251],{"type":41,"tag":298,"props":10252,"children":10253},{"style":305},[10254],{"type":52,"value":10255},"|     }                                          |     }                                           |\n",{"type":41,"tag":298,"props":10257,"children":10258},{"class":300,"line":2644},[10259],{"type":41,"tag":298,"props":10260,"children":10261},{"style":305},[10262],{"type":52,"value":10263},"| }                                              | }                                               |\n",{"type":41,"tag":298,"props":10265,"children":10266},{"class":300,"line":2666},[10267],{"type":41,"tag":298,"props":10268,"children":10269},{"style":315},[10270],{"type":52,"value":10215},{"type":41,"tag":48,"props":10272,"children":10273},{},[10274,10276,10282],{"type":52,"value":10275},"We can merge both and use available sniff codes to generate docs just for them with ",{"type":41,"tag":278,"props":10277,"children":10279},{"className":10278},[],[10280],{"type":52,"value":10281},"bin/phpcs --standard=PEAR --generator=text --sniffs=PEAR.Files.IncludingFile",{"type":52,"value":10283}," command. But let's face it - that's far away from being intuitive.",{"type":41,"tag":149,"props":10285,"children":10287},{"id":10286},"proposition",[10288],{"type":52,"value":10289},"Proposition",{"type":41,"tag":48,"props":10291,"children":10292},{},[10293,10295,10301,10303,10309,10311,10318],{"type":52,"value":10294},"I've decided to give it a try and ",{"type":41,"tag":55,"props":10296,"children":10298},{"href":5734,"rel":10297},[59],[10299],{"type":52,"value":10300},"propose a solution",{"type":52,"value":10302}," that includes sniff codes also in the documentation generated with ",{"type":41,"tag":278,"props":10304,"children":10306},{"className":10305},[],[10307],{"type":52,"value":10308},"--generator",{"type":52,"value":10310}," attribute to make the search process easier, but after discussion with ",{"type":41,"tag":55,"props":10312,"children":10315},{"href":10313,"rel":10314},"https://github.com/jrfnl",[59],[10316],{"type":52,"value":10317},"@jrfnl",{"type":52,"value":10319}," - the head of the PHP Code Sniffer project - we agreed that there are also other important concerns related to docs that need to be2 handled together, so we need to think about this wider and find a more global solution.",{"type":41,"tag":48,"props":10321,"children":10322},{},[10323],{"type":41,"tag":164,"props":10324,"children":10326},{"alt":166,"src":10325},"https://cdn.pragmate.dev/wp-content/uploads/2024/02/4dac69db-7382-4c8a-b67d-92242b434414.png",[],{"type":41,"tag":48,"props":10328,"children":10329},{},[10330,10332,10344,10346,10351],{"type":52,"value":10331},"I need it now, so ",{"type":41,"tag":95,"props":10333,"children":10334},{},[10335,10337],{"type":52,"value":10336},"I've decided to create ",{"type":41,"tag":55,"props":10338,"children":10341},{"href":10339,"rel":10340},"https://pragmate.dev/php/phpcs/#what-are-available-coding-standards",[59],[10342],{"type":52,"value":10343},"a simple tool",{"type":52,"value":10345}," - a bash script that iterates through all the default coding standards, gets all the sniffs available there, generates the docs for each of them, and adds more things not available by default like sniff codes, or links to sniff files in GitHub. ",{"type":41,"tag":95,"props":10347,"children":10348},{},[10349],{"type":52,"value":10350},"It simply generates all the things I wished to have when starting my journey with the tool.",{"type":52,"value":10352}," I use it to generate markdown file which I use as a doc.",{"type":41,"tag":48,"props":10354,"children":10355},{},[10356],{"type":52,"value":10357},"Thanks to this, I'm able to check a lot of available rules in one place one by one and search for some I want to have in my codebase - what I've done for this project. I can also find error explanations more easily and that's a huge improvement.",{"type":41,"tag":48,"props":10359,"children":10360},{},[10361],{"type":52,"value":10362},"It's not ideal, because not all the sniffs have docs, and for sure, that's something that should be available within the official project, but that's where I want to ask you for help!",{"type":41,"tag":149,"props":10364,"children":10366},{"id":10365},"contributions",[10367],{"type":52,"value":10368},"Contributions",{"type":41,"tag":48,"props":10370,"children":10371},{},[10372,10374,10381,10383,10388,10390,10397,10399,10413],{"type":52,"value":10373},"To make the rules discoverage better and have documentation like ",{"type":41,"tag":55,"props":10375,"children":10378},{"href":10376,"rel":10377},"https://eslint.org/docs/latest/rules/",[59],[10379],{"type":52,"value":10380},"other popular linters",{"type":52,"value":10382}," which helps rather than rejects, ",{"type":41,"tag":95,"props":10384,"children":10385},{},[10386],{"type":52,"value":10387},"we need to work together!",{"type":52,"value":10389}," @jrfnl already ",{"type":41,"tag":55,"props":10391,"children":10394},{"href":10392,"rel":10393},"https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/317#issuecomment-1915719380",[59],[10395],{"type":52,"value":10396},"has a lot of good ideas",{"type":52,"value":10398}," for handling the docs, but they are nothing without the docs themselves. The docs coverage is already nice, but ",{"type":41,"tag":95,"props":10400,"children":10401},{},[10402,10404,10411],{"type":52,"value":10403},"there are still ",{"type":41,"tag":55,"props":10405,"children":10408},{"href":10406,"rel":10407},"https://github.com/PHPCSStandards/PHP_CodeSniffer/issues/148",[59],[10409],{"type":52,"value":10410},"many of them",{"type":52,"value":10412}," missing",{"type":52,"value":140},{"type":41,"tag":48,"props":10415,"children":10416},{},[10417],{"type":41,"tag":164,"props":10418,"children":10420},{"alt":166,"src":10419},"https://cdn.pragmate.dev/wp-content/uploads/2024/02/4910a3f9-b57c-4f34-a535-59e92ac42bc9.png",[],{"type":41,"tag":48,"props":10422,"children":10423},{},[10424],{"type":52,"value":10425},"PHP Code Sniffer is installed approximately 150,000 times per day! So, if we can find 56 eager devs from this group who appreciate this tool (which isn't that many), it would address the most needed thing right now - the missing documentation for some sniffs - and open the way to make the tool better and easier to use, especially for newcomers.",{"type":41,"tag":48,"props":10427,"children":10428},{},[10429,10431,10436,10437,10448],{"type":52,"value":10430},"Consider the tool I created as a preview of what the documentation could look like and how helpful it might be with a small group of people contributing. Your help makes the difference! ",{"type":41,"tag":95,"props":10432,"children":10433},{},[10434],{"type":52,"value":10435},"If you're interested, just check out the link to the",{"type":52,"value":2082},{"type":41,"tag":55,"props":10438,"children":10440},{"href":10406,"rel":10439},[59],[10441,10446],{"type":41,"tag":95,"props":10442,"children":10443},{},[10444],{"type":52,"value":10445},"proper issue on GitHub",{"type":52,"value":10447},",",{"type":52,"value":10449}," choose the sniffs you want to create docs for, and help make the tool better!",{"type":41,"tag":79,"props":10451,"children":10452},{},[],{"type":41,"tag":48,"props":10454,"children":10455},{},[10456,10457,10462,10463,10469,10470,10475],{"type":52,"value":1598},{"type":41,"tag":55,"props":10458,"children":10460},{"href":1601,"rel":10459},[59],[10461],{"type":52,"value":1605},{"type":52,"value":3874},{"type":41,"tag":55,"props":10464,"children":10467},{"href":10465,"rel":10466},"https://www.youtube.com/watch?v=0OelE2c4wVs",[59],[10468],{"type":52,"value":3914},{"type":52,"value":3916},{"type":41,"tag":55,"props":10471,"children":10473},{"href":1610,"rel":10472},[59],[10474],{"type":52,"value":1614},{"type":52,"value":1616},{"type":41,"tag":1618,"props":10477,"children":10478},{},[10479],{"type":52,"value":1622},{"title":7,"searchDepth":311,"depth":311,"links":10481},[10482,10483,10484,10485,10486,10487,10488,10489],{"id":3994,"depth":311,"text":3997},{"id":4623,"depth":311,"text":4626},{"id":5775,"depth":311,"text":5778},{"id":5845,"depth":311,"text":5848},{"id":6301,"depth":311,"text":6304},{"id":7074,"depth":311,"text":7077},{"id":9827,"depth":311,"text":9830},{"id":9921,"depth":311,"text":9924,"children":10490},[10491,10492],{"id":10286,"depth":326,"text":10289},{"id":10365,"depth":326,"text":10368},"content:php:phpcs:index.md","php/phpcs/index.md","php/phpcs/index",{"_path":10497,"_dir":1734,"_draft":6,"_partial":6,"_locale":7,"title":10498,"description":10499,"head":10500,"tags":10511,"links":10512,"chapters":10515,"created":10508,"thumb":278,"body":10517,"_type":1638,"_id":12975,"_source":1640,"_file":12976,"_stem":12977,"_extension":1643},"/js/eslint","ESLint: Setting Up From Start to Finish","In this article, I'll discuss ESLint, the tool that ensures your JavaScript code remains consistent and clean. I'll guide you through setting it up, customizing its behavior, and integrating it with Prettier and VS Code. ",{"title":10501,"link":10502,"meta":10504},"ESLint: Setting Up From Start to Finish | pragmate.dev",[10503],{"rel":14,"href":1106},[10505,10506,10507,10509],{"name":18,"content":19},{"name":21,"content":22},{"name":24,"content":10508},"2024-06-06",{"name":27,"content":10510},"https://cdn.pragmate.dev/wp-content/uploads/2024/06/a5ade8cc-cd63-4bdf-ac24-f1e0745fc2fc.jpg",{"time":1659,"level":31},{"github":10513,"solution":10514},"https://github.com/pragmatedev/vilare/pull/21/files","#how-to-use-eslint",[1585,10516],"/js/eslint-standards/",{"type":38,"children":10518,"toc":12966},[10519,10523,10533,10538,10541,10544,10550,10560,10584,10597,10778,10781,10787,10800,11074,11103,11358,11376,11444,11454,11466,11582,11585,11591,11641,11758,11776,12099,12102,12108,12134,12317,12330,12333,12337,12341,12348,12351,12354,12360,12396,12399,12402,12408,12422,12429,12442,12445,12451,12461,12580,12592,12599,12634,12936,12939,12962],{"type":41,"tag":42,"props":10520,"children":10522},{"thumbnail":10510,"url":10521},"https://www.youtube-nocookie.com/embed/uOcJqRGAWAA",[],{"type":41,"tag":48,"props":10524,"children":10525},{},[10526,10528],{"type":52,"value":10527},"ESLint is a powerful tool designed to keep your JavaScript code clean, error-free, and consistent. Its value of ESLint lies in its ability to enhance code quality, readability, and maintainability. ",{"type":41,"tag":95,"props":10529,"children":10530},{},[10531],{"type":52,"value":10532},"By catching errors early and promoting best project's practices, ESLint can save you time and help maintain high standards in your JavaScript development.",{"type":41,"tag":48,"props":10534,"children":10535},{},[10536],{"type":52,"value":10537},"In this article, I'll discuss ESLint, the tool that ensures your JavaScript code remains consistent and clean. I'll guide you through setting it up, customizing its behavior, and integrating it with Prettier and VS Code.",{"type":41,"tag":75,"props":10539,"children":10540},{},[],{"type":41,"tag":79,"props":10542,"children":10543},{},[],{"type":41,"tag":83,"props":10545,"children":10547},{"id":10546},"how-to-install-eslint",[10548],{"type":52,"value":10549},"How to Install ESLint?",{"type":41,"tag":48,"props":10551,"children":10552},{},[10553,10558],{"type":41,"tag":95,"props":10554,"children":10555},{},[10556],{"type":52,"value":10557},"You can install and configure ESLint by running the following command",{"type":52,"value":10559}," that fires the setup process and prompts you with a few questions about the required config.",{"type":41,"tag":287,"props":10561,"children":10563},{"className":1921,"code":10562,"language":1923,"meta":7,"style":7},"npm init @eslint/config@latest\n",[10564],{"type":41,"tag":278,"props":10565,"children":10566},{"__ignoreMap":7},[10567],{"type":41,"tag":298,"props":10568,"children":10569},{"class":300,"line":301},[10570,10575,10579],{"type":41,"tag":298,"props":10571,"children":10572},{"style":737},[10573],{"type":52,"value":10574},"npm",{"type":41,"tag":298,"props":10576,"children":10577},{"style":330},[10578],{"type":52,"value":4157},{"type":41,"tag":298,"props":10580,"children":10581},{"style":330},[10582],{"type":52,"value":10583}," @eslint/config@latest\n",{"type":41,"tag":48,"props":10585,"children":10586},{},[10587,10589,10595],{"type":52,"value":10588},"We are developing a classic browser app using ESM modules (you might want to ",{"type":41,"tag":55,"props":10590,"children":10592},{"href":3752,"rel":10591},[59],[10593],{"type":52,"value":10594},"check out our Vite setup guide",{"type":52,"value":10596},") so we select those options and the tool will install the required packages and create a basic configuration file which looks like here.",{"type":41,"tag":287,"props":10598,"children":10600},{"className":1731,"code":10599,"filename":1184,"language":1734,"meta":7,"style":7},"import globals from \"globals\";\nimport standard from \"@eslint/js\";\n\nexport default [\n  standard.configs.recommended,\n  {\n    languageOptions: {\n      globals: globals.browser\n    },\n  },\n];\n\n",[10601],{"type":41,"tag":278,"props":10602,"children":10603},{"__ignoreMap":7},[10604,10631,10655,10662,10680,10710,10718,10730,10756,10763,10770],{"type":41,"tag":298,"props":10605,"children":10606},{"class":300,"line":301},[10607,10612,10617,10622,10627],{"type":41,"tag":298,"props":10608,"children":10609},{"style":3648},[10610],{"type":52,"value":10611},"import",{"type":41,"tag":298,"props":10613,"children":10614},{"style":315},[10615],{"type":52,"value":10616}," globals",{"type":41,"tag":298,"props":10618,"children":10619},{"style":3648},[10620],{"type":52,"value":10621}," from",{"type":41,"tag":298,"props":10623,"children":10624},{"style":330},[10625],{"type":52,"value":10626}," \"globals\"",{"type":41,"tag":298,"props":10628,"children":10629},{"style":305},[10630],{"type":52,"value":4419},{"type":41,"tag":298,"props":10632,"children":10633},{"class":300,"line":311},[10634,10638,10642,10646,10651],{"type":41,"tag":298,"props":10635,"children":10636},{"style":3648},[10637],{"type":52,"value":10611},{"type":41,"tag":298,"props":10639,"children":10640},{"style":315},[10641],{"type":52,"value":4791},{"type":41,"tag":298,"props":10643,"children":10644},{"style":3648},[10645],{"type":52,"value":10621},{"type":41,"tag":298,"props":10647,"children":10648},{"style":330},[10649],{"type":52,"value":10650}," \"@eslint/js\"",{"type":41,"tag":298,"props":10652,"children":10653},{"style":305},[10654],{"type":52,"value":4419},{"type":41,"tag":298,"props":10656,"children":10657},{"class":300,"line":326},[10658],{"type":41,"tag":298,"props":10659,"children":10660},{"emptyLinePlaceholder":36},[10661],{"type":52,"value":2018},{"type":41,"tag":298,"props":10663,"children":10664},{"class":300,"line":341},[10665,10670,10675],{"type":41,"tag":298,"props":10666,"children":10667},{"style":3648},[10668],{"type":52,"value":10669},"export",{"type":41,"tag":298,"props":10671,"children":10672},{"style":3648},[10673],{"type":52,"value":10674}," default",{"type":41,"tag":298,"props":10676,"children":10677},{"style":305},[10678],{"type":52,"value":10679}," [\n",{"type":41,"tag":298,"props":10681,"children":10682},{"class":300,"line":354},[10683,10688,10692,10697,10701,10706],{"type":41,"tag":298,"props":10684,"children":10685},{"style":4124},[10686],{"type":52,"value":10687},"  standard",{"type":41,"tag":298,"props":10689,"children":10690},{"style":305},[10691],{"type":52,"value":140},{"type":41,"tag":298,"props":10693,"children":10694},{"style":4124},[10695],{"type":52,"value":10696},"configs",{"type":41,"tag":298,"props":10698,"children":10699},{"style":305},[10700],{"type":52,"value":140},{"type":41,"tag":298,"props":10702,"children":10703},{"style":315},[10704],{"type":52,"value":10705},"recommended",{"type":41,"tag":298,"props":10707,"children":10708},{"style":305},[10709],{"type":52,"value":338},{"type":41,"tag":298,"props":10711,"children":10712},{"class":300,"line":367},[10713],{"type":41,"tag":298,"props":10714,"children":10715},{"style":305},[10716],{"type":52,"value":10717},"  {\n",{"type":41,"tag":298,"props":10719,"children":10720},{"class":300,"line":380},[10721,10726],{"type":41,"tag":298,"props":10722,"children":10723},{"style":315},[10724],{"type":52,"value":10725},"    languageOptions",{"type":41,"tag":298,"props":10727,"children":10728},{"style":305},[10729],{"type":52,"value":1478},{"type":41,"tag":298,"props":10731,"children":10732},{"class":300,"line":389},[10733,10738,10742,10747,10751],{"type":41,"tag":298,"props":10734,"children":10735},{"style":315},[10736],{"type":52,"value":10737},"      globals",{"type":41,"tag":298,"props":10739,"children":10740},{"style":305},[10741],{"type":52,"value":1373},{"type":41,"tag":298,"props":10743,"children":10744},{"style":4124},[10745],{"type":52,"value":10746},"globals",{"type":41,"tag":298,"props":10748,"children":10749},{"style":305},[10750],{"type":52,"value":140},{"type":41,"tag":298,"props":10752,"children":10753},{"style":315},[10754],{"type":52,"value":10755},"browser\n",{"type":41,"tag":298,"props":10757,"children":10758},{"class":300,"line":398},[10759],{"type":41,"tag":298,"props":10760,"children":10761},{"style":305},[10762],{"type":52,"value":2535},{"type":41,"tag":298,"props":10764,"children":10765},{"class":300,"line":411},[10766],{"type":41,"tag":298,"props":10767,"children":10768},{"style":305},[10769],{"type":52,"value":2328},{"type":41,"tag":298,"props":10771,"children":10772},{"class":300,"line":424},[10773],{"type":41,"tag":298,"props":10774,"children":10775},{"style":305},[10776],{"type":52,"value":10777},"];\n",{"type":41,"tag":79,"props":10779,"children":10780},{},[],{"type":41,"tag":83,"props":10782,"children":10784},{"id":10783},"how-to-use-eslint",[10785],{"type":52,"value":10786},"How to Use ESLint?",{"type":41,"tag":48,"props":10788,"children":10789},{},[10790,10792,10798],{"type":52,"value":10791},"By default, ESLint applies ",{"type":41,"tag":55,"props":10793,"children":10795},{"href":10376,"rel":10794},[59],[10796],{"type":52,"value":10797},"its recommended rules",{"type":52,"value":10799}," to check the code for violations, so let’s choose a few of these rules to break and see how the tool flags the issues.",{"type":41,"tag":1725,"props":10801,"children":10803},{":tabs":10802},"[\"block.js\", \"eslint.config.js\"]",[10804,10883],{"type":41,"tag":287,"props":10805,"children":10808},{"className":1731,"code":10806,"filename":10807,"language":1734,"meta":7,"style":7},"class Test {\n  constructor() {\n    if (false) debugger\n  }\n}\n","block.js",[10809],{"type":41,"tag":278,"props":10810,"children":10811},{"__ignoreMap":7},[10812,10828,10841,10869,10876],{"type":41,"tag":298,"props":10813,"children":10814},{"class":300,"line":301},[10815,10819,10824],{"type":41,"tag":298,"props":10816,"children":10817},{"style":3648},[10818],{"type":52,"value":674},{"type":41,"tag":298,"props":10820,"children":10821},{"style":4124},[10822],{"type":52,"value":10823}," Test",{"type":41,"tag":298,"props":10825,"children":10826},{"style":305},[10827],{"type":52,"value":4172},{"type":41,"tag":298,"props":10829,"children":10830},{"class":300,"line":311},[10831,10836],{"type":41,"tag":298,"props":10832,"children":10833},{"style":3648},[10834],{"type":52,"value":10835},"  constructor",{"type":41,"tag":298,"props":10837,"children":10838},{"style":305},[10839],{"type":52,"value":10840},"() {\n",{"type":41,"tag":298,"props":10842,"children":10843},{"class":300,"line":326},[10844,10849,10854,10859,10864],{"type":41,"tag":298,"props":10845,"children":10846},{"style":3648},[10847],{"type":52,"value":10848},"    if",{"type":41,"tag":298,"props":10850,"children":10851},{"style":305},[10852],{"type":52,"value":10853}," (",{"type":41,"tag":298,"props":10855,"children":10856},{"style":1376},[10857],{"type":52,"value":10858},"false",{"type":41,"tag":298,"props":10860,"children":10861},{"style":305},[10862],{"type":52,"value":10863},") ",{"type":41,"tag":298,"props":10865,"children":10866},{"style":3648},[10867],{"type":52,"value":10868},"debugger\n",{"type":41,"tag":298,"props":10870,"children":10871},{"class":300,"line":341},[10872],{"type":41,"tag":298,"props":10873,"children":10874},{"style":305},[10875],{"type":52,"value":3165},{"type":41,"tag":298,"props":10877,"children":10878},{"class":300,"line":354},[10879],{"type":41,"tag":298,"props":10880,"children":10881},{"style":305},[10882],{"type":52,"value":490},{"type":41,"tag":287,"props":10884,"children":10886},{"className":1731,"code":10885,"filename":1184,"language":1734,"meta":7,"style":7},"import standard from \"@eslint/js\";\n\nexport default [\n  standard.configs.recommended,\n  {\n    ignores: [\n      'dist',\n      'vendor',\n      'node_modules'\n    ],\n    rules: {\n      curly: 'error',\n    }\n  },\n];\n",[10887],{"type":41,"tag":278,"props":10888,"children":10889},{"__ignoreMap":7},[10890,10913,10920,10935,10962,10969,10981,10993,11005,11013,11020,11032,11053,11060,11067],{"type":41,"tag":298,"props":10891,"children":10892},{"class":300,"line":301},[10893,10897,10901,10905,10909],{"type":41,"tag":298,"props":10894,"children":10895},{"style":3648},[10896],{"type":52,"value":10611},{"type":41,"tag":298,"props":10898,"children":10899},{"style":315},[10900],{"type":52,"value":4791},{"type":41,"tag":298,"props":10902,"children":10903},{"style":3648},[10904],{"type":52,"value":10621},{"type":41,"tag":298,"props":10906,"children":10907},{"style":330},[10908],{"type":52,"value":10650},{"type":41,"tag":298,"props":10910,"children":10911},{"style":305},[10912],{"type":52,"value":4419},{"type":41,"tag":298,"props":10914,"children":10915},{"class":300,"line":311},[10916],{"type":41,"tag":298,"props":10917,"children":10918},{"emptyLinePlaceholder":36},[10919],{"type":52,"value":2018},{"type":41,"tag":298,"props":10921,"children":10922},{"class":300,"line":326},[10923,10927,10931],{"type":41,"tag":298,"props":10924,"children":10925},{"style":3648},[10926],{"type":52,"value":10669},{"type":41,"tag":298,"props":10928,"children":10929},{"style":3648},[10930],{"type":52,"value":10674},{"type":41,"tag":298,"props":10932,"children":10933},{"style":305},[10934],{"type":52,"value":10679},{"type":41,"tag":298,"props":10936,"children":10937},{"class":300,"line":341},[10938,10942,10946,10950,10954,10958],{"type":41,"tag":298,"props":10939,"children":10940},{"style":4124},[10941],{"type":52,"value":10687},{"type":41,"tag":298,"props":10943,"children":10944},{"style":305},[10945],{"type":52,"value":140},{"type":41,"tag":298,"props":10947,"children":10948},{"style":4124},[10949],{"type":52,"value":10696},{"type":41,"tag":298,"props":10951,"children":10952},{"style":305},[10953],{"type":52,"value":140},{"type":41,"tag":298,"props":10955,"children":10956},{"style":315},[10957],{"type":52,"value":10705},{"type":41,"tag":298,"props":10959,"children":10960},{"style":305},[10961],{"type":52,"value":338},{"type":41,"tag":298,"props":10963,"children":10964},{"class":300,"line":354},[10965],{"type":41,"tag":298,"props":10966,"children":10967},{"style":305},[10968],{"type":52,"value":10717},{"type":41,"tag":298,"props":10970,"children":10971},{"class":300,"line":367},[10972,10977],{"type":41,"tag":298,"props":10973,"children":10974},{"style":315},[10975],{"type":52,"value":10976},"    ignores",{"type":41,"tag":298,"props":10978,"children":10979},{"style":305},[10980],{"type":52,"value":323},{"type":41,"tag":298,"props":10982,"children":10983},{"class":300,"line":380},[10984,10989],{"type":41,"tag":298,"props":10985,"children":10986},{"style":330},[10987],{"type":52,"value":10988},"      'dist'",{"type":41,"tag":298,"props":10990,"children":10991},{"style":305},[10992],{"type":52,"value":338},{"type":41,"tag":298,"props":10994,"children":10995},{"class":300,"line":389},[10996,11001],{"type":41,"tag":298,"props":10997,"children":10998},{"style":330},[10999],{"type":52,"value":11000},"      'vendor'",{"type":41,"tag":298,"props":11002,"children":11003},{"style":305},[11004],{"type":52,"value":338},{"type":41,"tag":298,"props":11006,"children":11007},{"class":300,"line":398},[11008],{"type":41,"tag":298,"props":11009,"children":11010},{"style":330},[11011],{"type":52,"value":11012},"      'node_modules'\n",{"type":41,"tag":298,"props":11014,"children":11015},{"class":300,"line":411},[11016],{"type":41,"tag":298,"props":11017,"children":11018},{"style":305},[11019],{"type":52,"value":2608},{"type":41,"tag":298,"props":11021,"children":11022},{"class":300,"line":424},[11023,11028],{"type":41,"tag":298,"props":11024,"children":11025},{"style":315},[11026],{"type":52,"value":11027},"    rules",{"type":41,"tag":298,"props":11029,"children":11030},{"style":305},[11031],{"type":52,"value":1478},{"type":41,"tag":298,"props":11033,"children":11034},{"class":300,"line":433},[11035,11040,11044,11049],{"type":41,"tag":298,"props":11036,"children":11037},{"style":315},[11038],{"type":52,"value":11039},"      curly",{"type":41,"tag":298,"props":11041,"children":11042},{"style":305},[11043],{"type":52,"value":1373},{"type":41,"tag":298,"props":11045,"children":11046},{"style":330},[11047],{"type":52,"value":11048},"'error'",{"type":41,"tag":298,"props":11050,"children":11051},{"style":305},[11052],{"type":52,"value":338},{"type":41,"tag":298,"props":11054,"children":11055},{"class":300,"line":441},[11056],{"type":41,"tag":298,"props":11057,"children":11058},{"style":305},[11059],{"type":52,"value":1511},{"type":41,"tag":298,"props":11061,"children":11062},{"class":300,"line":454},[11063],{"type":41,"tag":298,"props":11064,"children":11065},{"style":305},[11066],{"type":52,"value":2328},{"type":41,"tag":298,"props":11068,"children":11069},{"class":300,"line":467},[11070],{"type":41,"tag":298,"props":11071,"children":11072},{"style":305},[11073],{"type":52,"value":10777},{"type":41,"tag":48,"props":11075,"children":11076},{},[11077,11088,11089,11095,11096,11101],{"type":41,"tag":95,"props":11078,"children":11079},{},[11080,11082],{"type":52,"value":11081},"You can check the code for violations by running the ",{"type":41,"tag":278,"props":11083,"children":11085},{"className":11084},[],[11086],{"type":52,"value":11087},"eslint",{"type":52,"value":2082},{"type":41,"tag":55,"props":11090,"children":11093},{"href":11091,"rel":11092},"https://eslint.org/docs/latest/use/command-line-interface",[59],[11094],{"type":52,"value":1984},{"type":52,"value":2082},{"type":41,"tag":95,"props":11097,"children":11098},{},[11099],{"type":52,"value":11100},"and specifying a file, directory, or glob pattern to check.",{"type":52,"value":11102}," If you skip this, the tool will search all the JS files relative to the current directory. We can use one of the following commands:",{"type":41,"tag":1725,"props":11104,"children":11106},{":tabs":11105},"[\"File\", \"Glob\", \"All\"]",[11107,11195,11277],{"type":41,"tag":287,"props":11108,"children":11112},{"className":1996,"code":11109,"filename":11110,"highlights":11111,"language":1998,"meta":7,"style":7},"yarn eslint resources/scripts/blocks.js\n\n/footmate.pro/wp-content/themes/footmate/resources/scripts/blocks.js\n  1:7   error  'Test' is defined but never used  no-unused-vars\n  3:9   error  Unexpected constant condition     no-constant-condition\n  3:16  error  Expected { after 'if' condition   curly\n  3:16  error  Unexpected 'debugger' statement   no-debugger\n\n✖ 4 problems (4 errors, 0 warnings)\n  1 error and 0 warnings potentially fixable with the `--fix` option.\n","File",[301],[11113],{"type":41,"tag":278,"props":11114,"children":11115},{"__ignoreMap":7},[11116,11125,11132,11140,11148,11156,11164,11172,11179,11187],{"type":41,"tag":298,"props":11117,"children":11119},{"class":11118,"line":301},[300,728],[11120],{"type":41,"tag":298,"props":11121,"children":11122},{"style":305},[11123],{"type":52,"value":11124},"yarn eslint resources/scripts/blocks.js\n",{"type":41,"tag":298,"props":11126,"children":11127},{"class":300,"line":311},[11128],{"type":41,"tag":298,"props":11129,"children":11130},{"emptyLinePlaceholder":36},[11131],{"type":52,"value":2018},{"type":41,"tag":298,"props":11133,"children":11134},{"class":300,"line":326},[11135],{"type":41,"tag":298,"props":11136,"children":11137},{"style":305},[11138],{"type":52,"value":11139},"/footmate.pro/wp-content/themes/footmate/resources/scripts/blocks.js\n",{"type":41,"tag":298,"props":11141,"children":11142},{"class":300,"line":341},[11143],{"type":41,"tag":298,"props":11144,"children":11145},{"style":305},[11146],{"type":52,"value":11147},"  1:7   error  'Test' is defined but never used  no-unused-vars\n",{"type":41,"tag":298,"props":11149,"children":11150},{"class":300,"line":354},[11151],{"type":41,"tag":298,"props":11152,"children":11153},{"style":305},[11154],{"type":52,"value":11155},"  3:9   error  Unexpected constant condition     no-constant-condition\n",{"type":41,"tag":298,"props":11157,"children":11158},{"class":300,"line":367},[11159],{"type":41,"tag":298,"props":11160,"children":11161},{"style":305},[11162],{"type":52,"value":11163},"  3:16  error  Expected { after 'if' condition   curly\n",{"type":41,"tag":298,"props":11165,"children":11166},{"class":300,"line":380},[11167],{"type":41,"tag":298,"props":11168,"children":11169},{"style":305},[11170],{"type":52,"value":11171},"  3:16  error  Unexpected 'debugger' statement   no-debugger\n",{"type":41,"tag":298,"props":11173,"children":11174},{"class":300,"line":389},[11175],{"type":41,"tag":298,"props":11176,"children":11177},{"emptyLinePlaceholder":36},[11178],{"type":52,"value":2018},{"type":41,"tag":298,"props":11180,"children":11181},{"class":300,"line":398},[11182],{"type":41,"tag":298,"props":11183,"children":11184},{"style":305},[11185],{"type":52,"value":11186},"✖ 4 problems (4 errors, 0 warnings)\n",{"type":41,"tag":298,"props":11188,"children":11189},{"class":300,"line":411},[11190],{"type":41,"tag":298,"props":11191,"children":11192},{"style":305},[11193],{"type":52,"value":11194},"  1 error and 0 warnings potentially fixable with the `--fix` option.\n",{"type":41,"tag":287,"props":11196,"children":11200},{"className":1996,"code":11197,"filename":11198,"highlights":11199,"language":1998,"meta":7,"style":7},"yarn eslint resources/**/*.js\n\n/footmate.pro/wp-content/themes/footmate/resources/scripts/blocks.js\n  1:7   error  'Test' is defined but never used  no-unused-vars\n  3:9   error  Unexpected constant condition     no-constant-condition\n  3:16  error  Expected { after 'if' condition   curly\n  3:16  error  Unexpected 'debugger' statement   no-debugger\n\n✖ 4 problems (6 errors, 0 warnings)\n  1 error and 0 warnings potentially fixable with the `--fix` option.\n","Glob",[301],[11201],{"type":41,"tag":278,"props":11202,"children":11203},{"__ignoreMap":7},[11204,11213,11220,11227,11234,11241,11248,11255,11262,11270],{"type":41,"tag":298,"props":11205,"children":11207},{"class":11206,"line":301},[300,728],[11208],{"type":41,"tag":298,"props":11209,"children":11210},{"style":305},[11211],{"type":52,"value":11212},"yarn eslint resources/**/*.js\n",{"type":41,"tag":298,"props":11214,"children":11215},{"class":300,"line":311},[11216],{"type":41,"tag":298,"props":11217,"children":11218},{"emptyLinePlaceholder":36},[11219],{"type":52,"value":2018},{"type":41,"tag":298,"props":11221,"children":11222},{"class":300,"line":326},[11223],{"type":41,"tag":298,"props":11224,"children":11225},{"style":305},[11226],{"type":52,"value":11139},{"type":41,"tag":298,"props":11228,"children":11229},{"class":300,"line":341},[11230],{"type":41,"tag":298,"props":11231,"children":11232},{"style":305},[11233],{"type":52,"value":11147},{"type":41,"tag":298,"props":11235,"children":11236},{"class":300,"line":354},[11237],{"type":41,"tag":298,"props":11238,"children":11239},{"style":305},[11240],{"type":52,"value":11155},{"type":41,"tag":298,"props":11242,"children":11243},{"class":300,"line":367},[11244],{"type":41,"tag":298,"props":11245,"children":11246},{"style":305},[11247],{"type":52,"value":11163},{"type":41,"tag":298,"props":11249,"children":11250},{"class":300,"line":380},[11251],{"type":41,"tag":298,"props":11252,"children":11253},{"style":305},[11254],{"type":52,"value":11171},{"type":41,"tag":298,"props":11256,"children":11257},{"class":300,"line":389},[11258],{"type":41,"tag":298,"props":11259,"children":11260},{"emptyLinePlaceholder":36},[11261],{"type":52,"value":2018},{"type":41,"tag":298,"props":11263,"children":11264},{"class":300,"line":398},[11265],{"type":41,"tag":298,"props":11266,"children":11267},{"style":305},[11268],{"type":52,"value":11269},"✖ 4 problems (6 errors, 0 warnings)\n",{"type":41,"tag":298,"props":11271,"children":11272},{"class":300,"line":411},[11273],{"type":41,"tag":298,"props":11274,"children":11275},{"style":305},[11276],{"type":52,"value":11194},{"type":41,"tag":287,"props":11278,"children":11282},{"className":1996,"code":11279,"filename":11280,"highlights":11281,"language":1998,"meta":7,"style":7},"yarn eslint\n\n/footmate.pro/wp-content/themes/footmate/resources/scripts/blocks.js\n  1:7   error  'Test' is defined but never used  no-unused-vars\n  3:9   error  Unexpected constant condition     no-constant-condition\n  3:16  error  Expected { after 'if' condition   curly\n  3:16  error  Unexpected 'debugger' statement   no-debugger\n\n✖ 4 problems (4 errors, 0 warnings)\n  1 error and 0 warnings potentially fixable with the `--fix` option.\n","All",[301],[11283],{"type":41,"tag":278,"props":11284,"children":11285},{"__ignoreMap":7},[11286,11295,11302,11309,11316,11323,11330,11337,11344,11351],{"type":41,"tag":298,"props":11287,"children":11289},{"class":11288,"line":301},[300,728],[11290],{"type":41,"tag":298,"props":11291,"children":11292},{"style":305},[11293],{"type":52,"value":11294},"yarn eslint\n",{"type":41,"tag":298,"props":11296,"children":11297},{"class":300,"line":311},[11298],{"type":41,"tag":298,"props":11299,"children":11300},{"emptyLinePlaceholder":36},[11301],{"type":52,"value":2018},{"type":41,"tag":298,"props":11303,"children":11304},{"class":300,"line":326},[11305],{"type":41,"tag":298,"props":11306,"children":11307},{"style":305},[11308],{"type":52,"value":11139},{"type":41,"tag":298,"props":11310,"children":11311},{"class":300,"line":341},[11312],{"type":41,"tag":298,"props":11313,"children":11314},{"style":305},[11315],{"type":52,"value":11147},{"type":41,"tag":298,"props":11317,"children":11318},{"class":300,"line":354},[11319],{"type":41,"tag":298,"props":11320,"children":11321},{"style":305},[11322],{"type":52,"value":11155},{"type":41,"tag":298,"props":11324,"children":11325},{"class":300,"line":367},[11326],{"type":41,"tag":298,"props":11327,"children":11328},{"style":305},[11329],{"type":52,"value":11163},{"type":41,"tag":298,"props":11331,"children":11332},{"class":300,"line":380},[11333],{"type":41,"tag":298,"props":11334,"children":11335},{"style":305},[11336],{"type":52,"value":11171},{"type":41,"tag":298,"props":11338,"children":11339},{"class":300,"line":389},[11340],{"type":41,"tag":298,"props":11341,"children":11342},{"emptyLinePlaceholder":36},[11343],{"type":52,"value":2018},{"type":41,"tag":298,"props":11345,"children":11346},{"class":300,"line":398},[11347],{"type":41,"tag":298,"props":11348,"children":11349},{"style":305},[11350],{"type":52,"value":11186},{"type":41,"tag":298,"props":11352,"children":11353},{"class":300,"line":411},[11354],{"type":41,"tag":298,"props":11355,"children":11356},{"style":305},[11357],{"type":52,"value":11194},{"type":41,"tag":48,"props":11359,"children":11360},{},[11361,11363],{"type":52,"value":11362},"The tool correctly identifies the rule violations that we intentionally created. While most of the issues it finds in this case need to be addressed manually, there is one that can be automatically fixed. ",{"type":41,"tag":95,"props":11364,"children":11365},{},[11366,11368,11374],{"type":52,"value":11367},"To apply this automatic correction and reduce your work, you can use a similar command as before but also add the ",{"type":41,"tag":278,"props":11369,"children":11371},{"className":11370},[],[11372],{"type":52,"value":11373},"--fix",{"type":52,"value":11375}," flag.",{"type":41,"tag":287,"props":11377,"children":11380},{"className":1996,"code":11378,"highlights":11379,"language":1998,"meta":7,"style":7},"yarn eslint --fix\n\n/footmate.pro/wp-content/themes/footmate/resources/scripts/blocks.js\n  1:7   error  'Test' is defined but never used  no-unused-vars\n  3:9   error  Unexpected constant condition     no-constant-condition\n  3:17  error  Unexpected 'debugger' statement   no-debugger\n\n✖ 3 problems (3 errors, 0 warnings)\n",[301],[11381],{"type":41,"tag":278,"props":11382,"children":11383},{"__ignoreMap":7},[11384,11393,11400,11407,11414,11421,11429,11436],{"type":41,"tag":298,"props":11385,"children":11387},{"class":11386,"line":301},[300,728],[11388],{"type":41,"tag":298,"props":11389,"children":11390},{"style":305},[11391],{"type":52,"value":11392},"yarn eslint --fix\n",{"type":41,"tag":298,"props":11394,"children":11395},{"class":300,"line":311},[11396],{"type":41,"tag":298,"props":11397,"children":11398},{"emptyLinePlaceholder":36},[11399],{"type":52,"value":2018},{"type":41,"tag":298,"props":11401,"children":11402},{"class":300,"line":326},[11403],{"type":41,"tag":298,"props":11404,"children":11405},{"style":305},[11406],{"type":52,"value":11139},{"type":41,"tag":298,"props":11408,"children":11409},{"class":300,"line":341},[11410],{"type":41,"tag":298,"props":11411,"children":11412},{"style":305},[11413],{"type":52,"value":11147},{"type":41,"tag":298,"props":11415,"children":11416},{"class":300,"line":354},[11417],{"type":41,"tag":298,"props":11418,"children":11419},{"style":305},[11420],{"type":52,"value":11155},{"type":41,"tag":298,"props":11422,"children":11423},{"class":300,"line":367},[11424],{"type":41,"tag":298,"props":11425,"children":11426},{"style":305},[11427],{"type":52,"value":11428},"  3:17  error  Unexpected 'debugger' statement   no-debugger\n",{"type":41,"tag":298,"props":11430,"children":11431},{"class":300,"line":380},[11432],{"type":41,"tag":298,"props":11433,"children":11434},{"emptyLinePlaceholder":36},[11435],{"type":52,"value":2018},{"type":41,"tag":298,"props":11437,"children":11438},{"class":300,"line":389},[11439],{"type":41,"tag":298,"props":11440,"children":11441},{"style":305},[11442],{"type":52,"value":11443},"✖ 3 problems (3 errors, 0 warnings)\n",{"type":41,"tag":48,"props":11445,"children":11446},{},[11447,11452],{"type":41,"tag":95,"props":11448,"children":11449},{},[11450],{"type":52,"value":11451},"Now, you'll need to address the remaining issues manually.",{"type":52,"value":11453}," Once these corrections are made, and you run the linter again, you should no longer see any problems.",{"type":41,"tag":48,"props":11455,"children":11456},{},[11457,11459,11464],{"type":52,"value":11458},"You can also add a script to the ",{"type":41,"tag":278,"props":11460,"children":11462},{"className":11461},[],[11463],{"type":52,"value":2191},{"type":52,"value":11465}," to run ESLint with other linters together with a single command. That's a standard approach in our codebase.",{"type":41,"tag":287,"props":11467,"children":11470},{"className":289,"code":11468,"filename":2191,"highlights":11469,"language":292,"meta":7,"style":7},"{\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"prettier . --check && stylelint resources/**/*.scss && eslint\",\n    \"format\": \"prettier . --write && stylelint resources/**/*.scss --fix && eslint --fix\"\n  },\n}\n",[354,367],[11471],{"type":41,"tag":278,"props":11472,"children":11473},{"__ignoreMap":7},[11474,11481,11492,11511,11530,11551,11568,11575],{"type":41,"tag":298,"props":11475,"children":11476},{"class":300,"line":301},[11477],{"type":41,"tag":298,"props":11478,"children":11479},{"style":305},[11480],{"type":52,"value":308},{"type":41,"tag":298,"props":11482,"children":11483},{"class":300,"line":311},[11484,11488],{"type":41,"tag":298,"props":11485,"children":11486},{"style":315},[11487],{"type":52,"value":2236},{"type":41,"tag":298,"props":11489,"children":11490},{"style":305},[11491],{"type":52,"value":1478},{"type":41,"tag":298,"props":11493,"children":11494},{"class":300,"line":326},[11495,11499,11503,11507],{"type":41,"tag":298,"props":11496,"children":11497},{"style":315},[11498],{"type":52,"value":2248},{"type":41,"tag":298,"props":11500,"children":11501},{"style":305},[11502],{"type":52,"value":1373},{"type":41,"tag":298,"props":11504,"children":11505},{"style":330},[11506],{"type":52,"value":2257},{"type":41,"tag":298,"props":11508,"children":11509},{"style":305},[11510],{"type":52,"value":338},{"type":41,"tag":298,"props":11512,"children":11513},{"class":300,"line":341},[11514,11518,11522,11526],{"type":41,"tag":298,"props":11515,"children":11516},{"style":315},[11517],{"type":52,"value":2269},{"type":41,"tag":298,"props":11519,"children":11520},{"style":305},[11521],{"type":52,"value":1373},{"type":41,"tag":298,"props":11523,"children":11524},{"style":330},[11525],{"type":52,"value":2278},{"type":41,"tag":298,"props":11527,"children":11528},{"style":305},[11529],{"type":52,"value":338},{"type":41,"tag":298,"props":11531,"children":11533},{"class":11532,"line":354},[300,728],[11534,11538,11542,11547],{"type":41,"tag":298,"props":11535,"children":11536},{"style":315},[11537],{"type":52,"value":2290},{"type":41,"tag":298,"props":11539,"children":11540},{"style":305},[11541],{"type":52,"value":1373},{"type":41,"tag":298,"props":11543,"children":11544},{"style":330},[11545],{"type":52,"value":11546},"\"prettier . --check && stylelint resources/**/*.scss && eslint\"",{"type":41,"tag":298,"props":11548,"children":11549},{"style":305},[11550],{"type":52,"value":338},{"type":41,"tag":298,"props":11552,"children":11554},{"class":11553,"line":367},[300,728],[11555,11559,11563],{"type":41,"tag":298,"props":11556,"children":11557},{"style":315},[11558],{"type":52,"value":2311},{"type":41,"tag":298,"props":11560,"children":11561},{"style":305},[11562],{"type":52,"value":1373},{"type":41,"tag":298,"props":11564,"children":11565},{"style":330},[11566],{"type":52,"value":11567},"\"prettier . --write && stylelint resources/**/*.scss --fix && eslint --fix\"\n",{"type":41,"tag":298,"props":11569,"children":11570},{"class":300,"line":380},[11571],{"type":41,"tag":298,"props":11572,"children":11573},{"style":305},[11574],{"type":52,"value":2328},{"type":41,"tag":298,"props":11576,"children":11577},{"class":300,"line":389},[11578],{"type":41,"tag":298,"props":11579,"children":11580},{"style":305},[11581],{"type":52,"value":490},{"type":41,"tag":79,"props":11583,"children":11584},{},[],{"type":41,"tag":83,"props":11586,"children":11588},{"id":11587},"how-to-ignore-errors-in-eslint",[11589],{"type":52,"value":11590},"How to Ignore Errors in ESLint?",{"type":41,"tag":48,"props":11592,"children":11593},{},[11594,11596,11609,11611,11616,11617,11623,11625,11631,11633,11640],{"type":52,"value":11595},"You have several options for skipping code checks in your project, which should, of course, be used with caution! ",{"type":41,"tag":95,"props":11597,"children":11598},{},[11599,11601,11607],{"type":52,"value":11600},"If you want to ignore entire directories, you can utilize the ",{"type":41,"tag":278,"props":11602,"children":11604},{"className":11603},[],[11605],{"type":52,"value":11606},"ignores",{"type":52,"value":11608}," key in your config file and specify them there.",{"type":52,"value":11610}," We don’t want to check the output files and external code, so we exclude the ",{"type":41,"tag":278,"props":11612,"children":11614},{"className":11613},[],[11615],{"type":52,"value":3747},{"type":52,"value":607},{"type":41,"tag":278,"props":11618,"children":11620},{"className":11619},[],[11621],{"type":52,"value":11622},"vendor",{"type":52,"value":11624},", and ",{"type":41,"tag":278,"props":11626,"children":11628},{"className":11627},[],[11629],{"type":52,"value":11630},"node_modules",{"type":52,"value":11632}," directories. If you need to handle more advanced scenarios, just ",{"type":41,"tag":55,"props":11634,"children":11637},{"href":11635,"rel":11636},"https://eslint.org/docs/latest/use/configure/ignore",[59],[11638],{"type":52,"value":11639},"check out the docs",{"type":52,"value":140},{"type":41,"tag":287,"props":11642,"children":11644},{"className":1731,"code":11643,"filename":1184,"language":1734,"meta":7,"style":7},"export default [\n  standard.configs.recommended,\n  {\n    ignores: [\n      'dist',\n      'vendor',\n      'node_modules'\n    ],\n  },\n];\n",[11645],{"type":41,"tag":278,"props":11646,"children":11647},{"__ignoreMap":7},[11648,11663,11690,11697,11708,11719,11730,11737,11744,11751],{"type":41,"tag":298,"props":11649,"children":11650},{"class":300,"line":301},[11651,11655,11659],{"type":41,"tag":298,"props":11652,"children":11653},{"style":3648},[11654],{"type":52,"value":10669},{"type":41,"tag":298,"props":11656,"children":11657},{"style":3648},[11658],{"type":52,"value":10674},{"type":41,"tag":298,"props":11660,"children":11661},{"style":305},[11662],{"type":52,"value":10679},{"type":41,"tag":298,"props":11664,"children":11665},{"class":300,"line":311},[11666,11670,11674,11678,11682,11686],{"type":41,"tag":298,"props":11667,"children":11668},{"style":4124},[11669],{"type":52,"value":10687},{"type":41,"tag":298,"props":11671,"children":11672},{"style":305},[11673],{"type":52,"value":140},{"type":41,"tag":298,"props":11675,"children":11676},{"style":4124},[11677],{"type":52,"value":10696},{"type":41,"tag":298,"props":11679,"children":11680},{"style":305},[11681],{"type":52,"value":140},{"type":41,"tag":298,"props":11683,"children":11684},{"style":315},[11685],{"type":52,"value":10705},{"type":41,"tag":298,"props":11687,"children":11688},{"style":305},[11689],{"type":52,"value":338},{"type":41,"tag":298,"props":11691,"children":11692},{"class":300,"line":326},[11693],{"type":41,"tag":298,"props":11694,"children":11695},{"style":305},[11696],{"type":52,"value":10717},{"type":41,"tag":298,"props":11698,"children":11699},{"class":300,"line":341},[11700,11704],{"type":41,"tag":298,"props":11701,"children":11702},{"style":315},[11703],{"type":52,"value":10976},{"type":41,"tag":298,"props":11705,"children":11706},{"style":305},[11707],{"type":52,"value":323},{"type":41,"tag":298,"props":11709,"children":11710},{"class":300,"line":354},[11711,11715],{"type":41,"tag":298,"props":11712,"children":11713},{"style":330},[11714],{"type":52,"value":10988},{"type":41,"tag":298,"props":11716,"children":11717},{"style":305},[11718],{"type":52,"value":338},{"type":41,"tag":298,"props":11720,"children":11721},{"class":300,"line":367},[11722,11726],{"type":41,"tag":298,"props":11723,"children":11724},{"style":330},[11725],{"type":52,"value":11000},{"type":41,"tag":298,"props":11727,"children":11728},{"style":305},[11729],{"type":52,"value":338},{"type":41,"tag":298,"props":11731,"children":11732},{"class":300,"line":380},[11733],{"type":41,"tag":298,"props":11734,"children":11735},{"style":330},[11736],{"type":52,"value":11012},{"type":41,"tag":298,"props":11738,"children":11739},{"class":300,"line":389},[11740],{"type":41,"tag":298,"props":11741,"children":11742},{"style":305},[11743],{"type":52,"value":2608},{"type":41,"tag":298,"props":11745,"children":11746},{"class":300,"line":398},[11747],{"type":41,"tag":298,"props":11748,"children":11749},{"style":305},[11750],{"type":52,"value":2328},{"type":41,"tag":298,"props":11752,"children":11753},{"class":300,"line":411},[11754],{"type":41,"tag":298,"props":11755,"children":11756},{"style":305},[11757],{"type":52,"value":10777},{"type":41,"tag":48,"props":11759,"children":11760},{},[11761,11766,11768,11775],{"type":41,"tag":95,"props":11762,"children":11763},{},[11764],{"type":52,"value":11765},"You can also disable checks for specific parts of your code using a common approach for linters, which involves using comments.",{"type":52,"value":11767}," For more detailed guidance and additional examples, just ",{"type":41,"tag":55,"props":11769,"children":11772},{"href":11770,"rel":11771},"https://eslint.org/docs/latest/use/configure/rules#disabling-rules",[59],[11773],{"type":52,"value":11774},"check out the official documentation",{"type":52,"value":3239},{"type":41,"tag":1725,"props":11777,"children":11779},{":tabs":11778},"[\"Block\", \"Line\", \"Next Line\", \"File\"]",[11780,11866,11942,12021],{"type":41,"tag":287,"props":11781,"children":11783},{"className":1731,"code":11782,"filename":6583,"language":1734,"meta":7,"style":7},"class Test {\n  /* eslint-disable */\n  constructor() {\n    if (false) debugger\n  }\n  /* eslint-enable */\n}\n",[11784],{"type":41,"tag":278,"props":11785,"children":11786},{"__ignoreMap":7},[11787,11802,11810,11821,11844,11851,11859],{"type":41,"tag":298,"props":11788,"children":11789},{"class":300,"line":301},[11790,11794,11798],{"type":41,"tag":298,"props":11791,"children":11792},{"style":3648},[11793],{"type":52,"value":674},{"type":41,"tag":298,"props":11795,"children":11796},{"style":4124},[11797],{"type":52,"value":10823},{"type":41,"tag":298,"props":11799,"children":11800},{"style":305},[11801],{"type":52,"value":4172},{"type":41,"tag":298,"props":11803,"children":11804},{"class":300,"line":311},[11805],{"type":41,"tag":298,"props":11806,"children":11807},{"style":3515},[11808],{"type":52,"value":11809},"  /* eslint-disable */\n",{"type":41,"tag":298,"props":11811,"children":11812},{"class":300,"line":326},[11813,11817],{"type":41,"tag":298,"props":11814,"children":11815},{"style":3648},[11816],{"type":52,"value":10835},{"type":41,"tag":298,"props":11818,"children":11819},{"style":305},[11820],{"type":52,"value":10840},{"type":41,"tag":298,"props":11822,"children":11823},{"class":300,"line":341},[11824,11828,11832,11836,11840],{"type":41,"tag":298,"props":11825,"children":11826},{"style":3648},[11827],{"type":52,"value":10848},{"type":41,"tag":298,"props":11829,"children":11830},{"style":305},[11831],{"type":52,"value":10853},{"type":41,"tag":298,"props":11833,"children":11834},{"style":1376},[11835],{"type":52,"value":10858},{"type":41,"tag":298,"props":11837,"children":11838},{"style":305},[11839],{"type":52,"value":10863},{"type":41,"tag":298,"props":11841,"children":11842},{"style":3648},[11843],{"type":52,"value":10868},{"type":41,"tag":298,"props":11845,"children":11846},{"class":300,"line":354},[11847],{"type":41,"tag":298,"props":11848,"children":11849},{"style":305},[11850],{"type":52,"value":3165},{"type":41,"tag":298,"props":11852,"children":11853},{"class":300,"line":367},[11854],{"type":41,"tag":298,"props":11855,"children":11856},{"style":3515},[11857],{"type":52,"value":11858},"  /* eslint-enable */\n",{"type":41,"tag":298,"props":11860,"children":11861},{"class":300,"line":380},[11862],{"type":41,"tag":298,"props":11863,"children":11864},{"style":305},[11865],{"type":52,"value":490},{"type":41,"tag":287,"props":11867,"children":11869},{"className":1731,"code":11868,"filename":6459,"language":1734,"meta":7,"style":7},"class Test {\n  constructor() {\n    if (false) debugger // eslint-disable-line\n  }\n}\n",[11870],{"type":41,"tag":278,"props":11871,"children":11872},{"__ignoreMap":7},[11873,11888,11899,11928,11935],{"type":41,"tag":298,"props":11874,"children":11875},{"class":300,"line":301},[11876,11880,11884],{"type":41,"tag":298,"props":11877,"children":11878},{"style":3648},[11879],{"type":52,"value":674},{"type":41,"tag":298,"props":11881,"children":11882},{"style":4124},[11883],{"type":52,"value":10823},{"type":41,"tag":298,"props":11885,"children":11886},{"style":305},[11887],{"type":52,"value":4172},{"type":41,"tag":298,"props":11889,"children":11890},{"class":300,"line":311},[11891,11895],{"type":41,"tag":298,"props":11892,"children":11893},{"style":3648},[11894],{"type":52,"value":10835},{"type":41,"tag":298,"props":11896,"children":11897},{"style":305},[11898],{"type":52,"value":10840},{"type":41,"tag":298,"props":11900,"children":11901},{"class":300,"line":326},[11902,11906,11910,11914,11918,11923],{"type":41,"tag":298,"props":11903,"children":11904},{"style":3648},[11905],{"type":52,"value":10848},{"type":41,"tag":298,"props":11907,"children":11908},{"style":305},[11909],{"type":52,"value":10853},{"type":41,"tag":298,"props":11911,"children":11912},{"style":1376},[11913],{"type":52,"value":10858},{"type":41,"tag":298,"props":11915,"children":11916},{"style":305},[11917],{"type":52,"value":10863},{"type":41,"tag":298,"props":11919,"children":11920},{"style":3648},[11921],{"type":52,"value":11922},"debugger",{"type":41,"tag":298,"props":11924,"children":11925},{"style":3515},[11926],{"type":52,"value":11927}," // eslint-disable-line\n",{"type":41,"tag":298,"props":11929,"children":11930},{"class":300,"line":341},[11931],{"type":41,"tag":298,"props":11932,"children":11933},{"style":305},[11934],{"type":52,"value":3165},{"type":41,"tag":298,"props":11936,"children":11937},{"class":300,"line":354},[11938],{"type":41,"tag":298,"props":11939,"children":11940},{"style":305},[11941],{"type":52,"value":490},{"type":41,"tag":287,"props":11943,"children":11946},{"className":1731,"code":11944,"filename":11945,"language":1734,"meta":7,"style":7},"class Test {\n  constructor() {\n    // eslint-disable-next-line no-debugger\n    if (false) debugger\n  }\n}\n","Next Line",[11947],{"type":41,"tag":278,"props":11948,"children":11949},{"__ignoreMap":7},[11950,11965,11976,11984,12007,12014],{"type":41,"tag":298,"props":11951,"children":11952},{"class":300,"line":301},[11953,11957,11961],{"type":41,"tag":298,"props":11954,"children":11955},{"style":3648},[11956],{"type":52,"value":674},{"type":41,"tag":298,"props":11958,"children":11959},{"style":4124},[11960],{"type":52,"value":10823},{"type":41,"tag":298,"props":11962,"children":11963},{"style":305},[11964],{"type":52,"value":4172},{"type":41,"tag":298,"props":11966,"children":11967},{"class":300,"line":311},[11968,11972],{"type":41,"tag":298,"props":11969,"children":11970},{"style":3648},[11971],{"type":52,"value":10835},{"type":41,"tag":298,"props":11973,"children":11974},{"style":305},[11975],{"type":52,"value":10840},{"type":41,"tag":298,"props":11977,"children":11978},{"class":300,"line":326},[11979],{"type":41,"tag":298,"props":11980,"children":11981},{"style":3515},[11982],{"type":52,"value":11983},"    // eslint-disable-next-line no-debugger\n",{"type":41,"tag":298,"props":11985,"children":11986},{"class":300,"line":341},[11987,11991,11995,11999,12003],{"type":41,"tag":298,"props":11988,"children":11989},{"style":3648},[11990],{"type":52,"value":10848},{"type":41,"tag":298,"props":11992,"children":11993},{"style":305},[11994],{"type":52,"value":10853},{"type":41,"tag":298,"props":11996,"children":11997},{"style":1376},[11998],{"type":52,"value":10858},{"type":41,"tag":298,"props":12000,"children":12001},{"style":305},[12002],{"type":52,"value":10863},{"type":41,"tag":298,"props":12004,"children":12005},{"style":3648},[12006],{"type":52,"value":10868},{"type":41,"tag":298,"props":12008,"children":12009},{"class":300,"line":354},[12010],{"type":41,"tag":298,"props":12011,"children":12012},{"style":305},[12013],{"type":52,"value":3165},{"type":41,"tag":298,"props":12015,"children":12016},{"class":300,"line":367},[12017],{"type":41,"tag":298,"props":12018,"children":12019},{"style":305},[12020],{"type":52,"value":490},{"type":41,"tag":287,"props":12022,"children":12024},{"className":1731,"code":12023,"filename":11110,"language":1734,"meta":7,"style":7},"/* eslint no-debugger: \"off\" */\nclass Test {\n  constructor() {\n    if (false) debugger\n  }\n}\n",[12025],{"type":41,"tag":278,"props":12026,"children":12027},{"__ignoreMap":7},[12028,12036,12051,12062,12085,12092],{"type":41,"tag":298,"props":12029,"children":12030},{"class":300,"line":301},[12031],{"type":41,"tag":298,"props":12032,"children":12033},{"style":3515},[12034],{"type":52,"value":12035},"/* eslint no-debugger: \"off\" */\n",{"type":41,"tag":298,"props":12037,"children":12038},{"class":300,"line":311},[12039,12043,12047],{"type":41,"tag":298,"props":12040,"children":12041},{"style":3648},[12042],{"type":52,"value":674},{"type":41,"tag":298,"props":12044,"children":12045},{"style":4124},[12046],{"type":52,"value":10823},{"type":41,"tag":298,"props":12048,"children":12049},{"style":305},[12050],{"type":52,"value":4172},{"type":41,"tag":298,"props":12052,"children":12053},{"class":300,"line":326},[12054,12058],{"type":41,"tag":298,"props":12055,"children":12056},{"style":3648},[12057],{"type":52,"value":10835},{"type":41,"tag":298,"props":12059,"children":12060},{"style":305},[12061],{"type":52,"value":10840},{"type":41,"tag":298,"props":12063,"children":12064},{"class":300,"line":341},[12065,12069,12073,12077,12081],{"type":41,"tag":298,"props":12066,"children":12067},{"style":3648},[12068],{"type":52,"value":10848},{"type":41,"tag":298,"props":12070,"children":12071},{"style":305},[12072],{"type":52,"value":10853},{"type":41,"tag":298,"props":12074,"children":12075},{"style":1376},[12076],{"type":52,"value":10858},{"type":41,"tag":298,"props":12078,"children":12079},{"style":305},[12080],{"type":52,"value":10863},{"type":41,"tag":298,"props":12082,"children":12083},{"style":3648},[12084],{"type":52,"value":10868},{"type":41,"tag":298,"props":12086,"children":12087},{"class":300,"line":354},[12088],{"type":41,"tag":298,"props":12089,"children":12090},{"style":305},[12091],{"type":52,"value":3165},{"type":41,"tag":298,"props":12093,"children":12094},{"class":300,"line":367},[12095],{"type":41,"tag":298,"props":12096,"children":12097},{"style":305},[12098],{"type":52,"value":490},{"type":41,"tag":79,"props":12100,"children":12101},{},[],{"type":41,"tag":83,"props":12103,"children":12105},{"id":12104},"how-to-configure-eslint",[12106],{"type":52,"value":12107},"How to Configure ESLint?",{"type":41,"tag":48,"props":12109,"children":12110},{},[12111,12123,12125,12132],{"type":41,"tag":95,"props":12112,"children":12113},{},[12114,12116,12121],{"type":52,"value":12115},"To alter the tool's behavior, you should now modify the ",{"type":41,"tag":278,"props":12117,"children":12119},{"className":12118},[],[12120],{"type":52,"value":1184},{"type":52,"value":12122}," file created during the initial setup.",{"type":52,"value":12124}," I haven't delved into any advanced configurations yet, so I recommend ",{"type":41,"tag":55,"props":12126,"children":12129},{"href":12127,"rel":12128},"https://eslint.org/docs/latest/use/configure/configuration-files",[59],[12130],{"type":52,"value":12131},"exploring this",{"type":52,"value":12133}," on your own, but for me, the most I need is choosing the coding standards and adjusting rules, and that can be easily managed",{"type":41,"tag":287,"props":12135,"children":12136},{"className":1731,"code":10885,"filename":1184,"language":1734,"meta":7,"style":7},[12137],{"type":41,"tag":278,"props":12138,"children":12139},{"__ignoreMap":7},[12140,12163,12170,12185,12212,12219,12230,12241,12252,12259,12266,12277,12296,12303,12310],{"type":41,"tag":298,"props":12141,"children":12142},{"class":300,"line":301},[12143,12147,12151,12155,12159],{"type":41,"tag":298,"props":12144,"children":12145},{"style":3648},[12146],{"type":52,"value":10611},{"type":41,"tag":298,"props":12148,"children":12149},{"style":315},[12150],{"type":52,"value":4791},{"type":41,"tag":298,"props":12152,"children":12153},{"style":3648},[12154],{"type":52,"value":10621},{"type":41,"tag":298,"props":12156,"children":12157},{"style":330},[12158],{"type":52,"value":10650},{"type":41,"tag":298,"props":12160,"children":12161},{"style":305},[12162],{"type":52,"value":4419},{"type":41,"tag":298,"props":12164,"children":12165},{"class":300,"line":311},[12166],{"type":41,"tag":298,"props":12167,"children":12168},{"emptyLinePlaceholder":36},[12169],{"type":52,"value":2018},{"type":41,"tag":298,"props":12171,"children":12172},{"class":300,"line":326},[12173,12177,12181],{"type":41,"tag":298,"props":12174,"children":12175},{"style":3648},[12176],{"type":52,"value":10669},{"type":41,"tag":298,"props":12178,"children":12179},{"style":3648},[12180],{"type":52,"value":10674},{"type":41,"tag":298,"props":12182,"children":12183},{"style":305},[12184],{"type":52,"value":10679},{"type":41,"tag":298,"props":12186,"children":12187},{"class":300,"line":341},[12188,12192,12196,12200,12204,12208],{"type":41,"tag":298,"props":12189,"children":12190},{"style":4124},[12191],{"type":52,"value":10687},{"type":41,"tag":298,"props":12193,"children":12194},{"style":305},[12195],{"type":52,"value":140},{"type":41,"tag":298,"props":12197,"children":12198},{"style":4124},[12199],{"type":52,"value":10696},{"type":41,"tag":298,"props":12201,"children":12202},{"style":305},[12203],{"type":52,"value":140},{"type":41,"tag":298,"props":12205,"children":12206},{"style":315},[12207],{"type":52,"value":10705},{"type":41,"tag":298,"props":12209,"children":12210},{"style":305},[12211],{"type":52,"value":338},{"type":41,"tag":298,"props":12213,"children":12214},{"class":300,"line":354},[12215],{"type":41,"tag":298,"props":12216,"children":12217},{"style":305},[12218],{"type":52,"value":10717},{"type":41,"tag":298,"props":12220,"children":12221},{"class":300,"line":367},[12222,12226],{"type":41,"tag":298,"props":12223,"children":12224},{"style":315},[12225],{"type":52,"value":10976},{"type":41,"tag":298,"props":12227,"children":12228},{"style":305},[12229],{"type":52,"value":323},{"type":41,"tag":298,"props":12231,"children":12232},{"class":300,"line":380},[12233,12237],{"type":41,"tag":298,"props":12234,"children":12235},{"style":330},[12236],{"type":52,"value":10988},{"type":41,"tag":298,"props":12238,"children":12239},{"style":305},[12240],{"type":52,"value":338},{"type":41,"tag":298,"props":12242,"children":12243},{"class":300,"line":389},[12244,12248],{"type":41,"tag":298,"props":12245,"children":12246},{"style":330},[12247],{"type":52,"value":11000},{"type":41,"tag":298,"props":12249,"children":12250},{"style":305},[12251],{"type":52,"value":338},{"type":41,"tag":298,"props":12253,"children":12254},{"class":300,"line":398},[12255],{"type":41,"tag":298,"props":12256,"children":12257},{"style":330},[12258],{"type":52,"value":11012},{"type":41,"tag":298,"props":12260,"children":12261},{"class":300,"line":411},[12262],{"type":41,"tag":298,"props":12263,"children":12264},{"style":305},[12265],{"type":52,"value":2608},{"type":41,"tag":298,"props":12267,"children":12268},{"class":300,"line":424},[12269,12273],{"type":41,"tag":298,"props":12270,"children":12271},{"style":315},[12272],{"type":52,"value":11027},{"type":41,"tag":298,"props":12274,"children":12275},{"style":305},[12276],{"type":52,"value":1478},{"type":41,"tag":298,"props":12278,"children":12279},{"class":300,"line":433},[12280,12284,12288,12292],{"type":41,"tag":298,"props":12281,"children":12282},{"style":315},[12283],{"type":52,"value":11039},{"type":41,"tag":298,"props":12285,"children":12286},{"style":305},[12287],{"type":52,"value":1373},{"type":41,"tag":298,"props":12289,"children":12290},{"style":330},[12291],{"type":52,"value":11048},{"type":41,"tag":298,"props":12293,"children":12294},{"style":305},[12295],{"type":52,"value":338},{"type":41,"tag":298,"props":12297,"children":12298},{"class":300,"line":441},[12299],{"type":41,"tag":298,"props":12300,"children":12301},{"style":305},[12302],{"type":52,"value":1511},{"type":41,"tag":298,"props":12304,"children":12305},{"class":300,"line":454},[12306],{"type":41,"tag":298,"props":12307,"children":12308},{"style":305},[12309],{"type":52,"value":2328},{"type":41,"tag":298,"props":12311,"children":12312},{"class":300,"line":467},[12313],{"type":41,"tag":298,"props":12314,"children":12315},{"style":305},[12316],{"type":52,"value":10777},{"type":41,"tag":48,"props":12318,"children":12319},{},[12320,12322,12328],{"type":52,"value":12321},"In this example, we use ",{"type":41,"tag":278,"props":12323,"children":12325},{"className":12324},[],[12326],{"type":52,"value":12327},"eslint:recommended",{"type":52,"value":12329}," rules as a foundation for code checks. Also, we configured it to ignore certain directories and enforced the use of curly braces.",{"type":41,"tag":79,"props":12331,"children":12332},{},[],{"type":41,"tag":48,"props":12334,"children":12335},{},[12336],{"type":52,"value":1051},{"type":41,"tag":48,"props":12338,"children":12339},{},[12340],{"type":52,"value":1056},{"type":41,"tag":48,"props":12342,"children":12343},{},[12344],{"type":41,"tag":95,"props":12345,"children":12346},{},[12347],{"type":52,"value":1064},{"type":41,"tag":1066,"props":12349,"children":12350},{},[],{"type":41,"tag":79,"props":12352,"children":12353},{},[],{"type":41,"tag":83,"props":12355,"children":12357},{"id":12356},"what-is-the-best-js-coding-standard",[12358],{"type":52,"value":12359},"What is The Best JS Coding Standard?",{"type":41,"tag":48,"props":12361,"children":12362},{},[12363,12365,12370,12372,12379,12381,12388,12390,12395],{"type":52,"value":12364},"The default config uses ",{"type":41,"tag":278,"props":12366,"children":12368},{"className":12367},[],[12369],{"type":52,"value":12327},{"type":52,"value":12371}," rules, which serve as a good base, but I need something more. A few years ago, while exploring various JavaScript coding styles, I came across ",{"type":41,"tag":55,"props":12373,"children":12376},{"href":12374,"rel":12375},"https://github.com/airbnb/javascript",[59],[12377],{"type":52,"value":12378},"Airbnb's style guide",{"type":52,"value":12380},", however, I found it to be too much for my needs. Then I found ",{"type":41,"tag":55,"props":12382,"children":12385},{"href":12383,"rel":12384},"https://github.com/standard/standard",[59],[12386],{"type":52,"value":12387},"Standard JS",{"type":52,"value":12389},", then Neostandard. You can learn more about available coding standards ",{"type":41,"tag":55,"props":12391,"children":12392},{"href":10516},[12393],{"type":52,"value":12394},"here",{"type":52,"value":140},{"type":41,"tag":111,"props":12397,"children":12398},{"url":10516},[],{"type":41,"tag":79,"props":12400,"children":12401},{},[],{"type":41,"tag":83,"props":12403,"children":12405},{"id":12404},"how-to-integrate-eslint-with-vs-code",[12406],{"type":52,"value":12407},"How to Integrate ESLint With VS Code?",{"type":41,"tag":48,"props":12409,"children":12410},{},[12411,12413,12420],{"type":52,"value":12412},"ESLint offers an integration plugin for VS Code, making it incredibly easy to get started - simply ",{"type":41,"tag":55,"props":12414,"children":12417},{"href":12415,"rel":12416},"https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint",[59],[12418],{"type":52,"value":12419},"install the plugin",{"type":52,"value":12421}," and start using it! The tool will highlight any issues in your code that don't align with the selected rules.",{"type":41,"tag":48,"props":12423,"children":12424},{},[12425],{"type":41,"tag":164,"props":12426,"children":12428},{"alt":166,"src":12427},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/b88024d1-9d58-4f1e-910a-f1f429cef3a3.png",[],{"type":41,"tag":48,"props":12430,"children":12431},{},[12432,12434,12440],{"type":52,"value":12433},"To fix issues, you can either run the fix script in the terminal or use the ",{"type":41,"tag":278,"props":12435,"children":12437},{"className":12436},[],[12438],{"type":52,"value":12439},"cmd + shift + p",{"type":52,"value":12441}," shortcut in VS Code, type \"fix,\" and select \"Fix all auto-fixable problems\" to automatically format the code. Additionally, you can configure ESLint to format the code upon saving. However, be aware of potential conflicts with Prettier!",{"type":41,"tag":79,"props":12443,"children":12444},{},[],{"type":41,"tag":83,"props":12446,"children":12448},{"id":12447},"how-to-integrate-eslint-with-prettier",[12449],{"type":52,"value":12450},"How to Integrate ESLint With Prettier?",{"type":41,"tag":48,"props":12452,"children":12453},{},[12454,12459],{"type":41,"tag":95,"props":12455,"children":12456},{},[12457],{"type":52,"value":12458},"ESLint checks formatting rules, which can lead to conflicts with Prettier",{"type":52,"value":12460},", another tool we use in our system. What conflicts? Let's check out the following example.",{"type":41,"tag":1725,"props":12462,"children":12464},{":tabs":12463},"[\"block.js\", \".prettierrc\"]",[12465,12543],{"type":41,"tag":287,"props":12466,"children":12468},{"className":1731,"code":12467,"filename":10807,"language":1734,"meta":7,"style":7},"class Test {\n  log() {\n    console.log('blocks');\n  }\n}\n",[12469],{"type":41,"tag":278,"props":12470,"children":12471},{"__ignoreMap":7},[12472,12487,12499,12529,12536],{"type":41,"tag":298,"props":12473,"children":12474},{"class":300,"line":301},[12475,12479,12483],{"type":41,"tag":298,"props":12476,"children":12477},{"style":3648},[12478],{"type":52,"value":674},{"type":41,"tag":298,"props":12480,"children":12481},{"style":4124},[12482],{"type":52,"value":10823},{"type":41,"tag":298,"props":12484,"children":12485},{"style":305},[12486],{"type":52,"value":4172},{"type":41,"tag":298,"props":12488,"children":12489},{"class":300,"line":311},[12490,12495],{"type":41,"tag":298,"props":12491,"children":12492},{"style":737},[12493],{"type":52,"value":12494},"  log",{"type":41,"tag":298,"props":12496,"children":12497},{"style":305},[12498],{"type":52,"value":10840},{"type":41,"tag":298,"props":12500,"children":12501},{"class":300,"line":326},[12502,12507,12511,12516,12520,12525],{"type":41,"tag":298,"props":12503,"children":12504},{"style":4124},[12505],{"type":52,"value":12506},"    console",{"type":41,"tag":298,"props":12508,"children":12509},{"style":305},[12510],{"type":52,"value":140},{"type":41,"tag":298,"props":12512,"children":12513},{"style":737},[12514],{"type":52,"value":12515},"log",{"type":41,"tag":298,"props":12517,"children":12518},{"style":305},[12519],{"type":52,"value":1751},{"type":41,"tag":298,"props":12521,"children":12522},{"style":330},[12523],{"type":52,"value":12524},"'blocks'",{"type":41,"tag":298,"props":12526,"children":12527},{"style":305},[12528],{"type":52,"value":1866},{"type":41,"tag":298,"props":12530,"children":12531},{"class":300,"line":341},[12532],{"type":41,"tag":298,"props":12533,"children":12534},{"style":305},[12535],{"type":52,"value":3165},{"type":41,"tag":298,"props":12537,"children":12538},{"class":300,"line":354},[12539],{"type":41,"tag":298,"props":12540,"children":12541},{"style":305},[12542],{"type":52,"value":490},{"type":41,"tag":287,"props":12544,"children":12546},{"className":289,"code":12545,"filename":1344,"language":292,"meta":7,"style":7},"{\n  \"singleQuote\": false\n}\n",[12547],{"type":41,"tag":278,"props":12548,"children":12549},{"__ignoreMap":7},[12550,12557,12573],{"type":41,"tag":298,"props":12551,"children":12552},{"class":300,"line":301},[12553],{"type":41,"tag":298,"props":12554,"children":12555},{"style":305},[12556],{"type":52,"value":308},{"type":41,"tag":298,"props":12558,"children":12559},{"class":300,"line":311},[12560,12564,12568],{"type":41,"tag":298,"props":12561,"children":12562},{"style":315},[12563],{"type":52,"value":1368},{"type":41,"tag":298,"props":12565,"children":12566},{"style":305},[12567],{"type":52,"value":1373},{"type":41,"tag":298,"props":12569,"children":12570},{"style":1376},[12571],{"type":52,"value":12572},"false\n",{"type":41,"tag":298,"props":12574,"children":12575},{"class":300,"line":326},[12576],{"type":41,"tag":298,"props":12577,"children":12578},{"style":305},[12579],{"type":52,"value":490},{"type":41,"tag":48,"props":12581,"children":12582},{},[12583,12585,12590],{"type":52,"value":12584},"Prettier in our setup is configured to use double quotes, while ESLint is set to enforce single quotes. When the code is formatted with Prettier, it converts all single quotes to double quotes. This action triggers ESLint to flag these as issues, and if automatic corrections are enabled, ESLint changes them back to single quotes. Then, if Prettier runs again, it marks these single quotes as incorrect and changes them back to double quotes. ",{"type":41,"tag":95,"props":12586,"children":12587},{},[12588],{"type":52,"value":12589},"This creates a cycle where whichever tool is used last could overwrite the changes made by the other,",{"type":52,"value":12591}," leading to a war between the two formatters.",{"type":41,"tag":48,"props":12593,"children":12594},{},[12595],{"type":41,"tag":164,"props":12596,"children":12598},{"alt":166,"src":12597},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/52b8603a-9b9c-4914-b82b-2d1a32d45567.png",[],{"type":41,"tag":48,"props":12600,"children":12601},{},[12602,12609,12611,12617,12619,12625,12627,12632],{"type":41,"tag":55,"props":12603,"children":12606},{"href":12604,"rel":12605},"https://pragmate.dev/css/stylelint/#how-to-integrate-stylelint-with-prettier",[59],[12607],{"type":52,"value":12608},"A similar issue occurred with Stylelint",{"type":52,"value":12610},", but as you may recall, we didn't need to make any adjustments in the latest versions because ",{"type":41,"tag":55,"props":12612,"children":12614},{"href":1233,"rel":12613},[59],[12615],{"type":52,"value":12616},"Stylelint no longer handles formatting rules",{"type":52,"value":12618},". However, for ESLint, while ",{"type":41,"tag":55,"props":12620,"children":12622},{"href":1115,"rel":12621},[59],[12623],{"type":52,"value":12624},"formatting rules are deprecated",{"type":52,"value":12626},", they have not yet been removed. So, ",{"type":41,"tag":95,"props":12628,"children":12629},{},[12630],{"type":52,"value":12631},"to avoid conflicts between those two tools, we need to disable the rules that overlap with what Prettier handles",{"type":52,"value":12633},". We can do it by installing an additional config.",{"type":41,"tag":1725,"props":12635,"children":12637},{":tabs":12636},"[\"Installation\", \".eslintrc\"]",[12638,12667],{"type":41,"tag":287,"props":12639,"children":12642},{"className":1921,"code":12640,"filename":12641,"language":1923,"meta":7,"style":7},"yarn add eslint-config-prettier --dev\n","Installation",[12643],{"type":41,"tag":278,"props":12644,"children":12645},{"__ignoreMap":7},[12646],{"type":41,"tag":298,"props":12647,"children":12648},{"class":300,"line":301},[12649,12653,12657,12662],{"type":41,"tag":298,"props":12650,"children":12651},{"style":737},[12652],{"type":52,"value":1935},{"type":41,"tag":298,"props":12654,"children":12655},{"style":330},[12656],{"type":52,"value":1940},{"type":41,"tag":298,"props":12658,"children":12659},{"style":330},[12660],{"type":52,"value":12661}," eslint-config-prettier",{"type":41,"tag":298,"props":12663,"children":12664},{"style":1376},[12665],{"type":52,"value":12666}," --dev\n",{"type":41,"tag":287,"props":12668,"children":12672},{"className":289,"code":12669,"filename":12670,"highlights":12671,"language":292,"meta":7,"style":7},"{\n  \"root\": true,\n  \"extends\": [\"semistandard\", \"prettier\"],\n  \"rules\": {\n    \"space-before-function-paren\": [\"error\", \"never\"],\n    \"curly\": [\"error\", \"all\"],\n    \"comma-dangle\": [\"error\", \"always-multiline\"],\n    \"padding-line-between-statements\": [\"error\", {\n      \"blankLine\": \"always\",\n      \"prev\": \"*\",\n      \"next\": \"return\"\n    }]\n  }\n}\n",".eslintrc",[326],[12673],{"type":41,"tag":278,"props":12674,"children":12675},{"__ignoreMap":7},[12676,12683,12703,12734,12746,12776,12805,12834,12855,12876,12897,12914,12922,12929],{"type":41,"tag":298,"props":12677,"children":12678},{"class":300,"line":301},[12679],{"type":41,"tag":298,"props":12680,"children":12681},{"style":305},[12682],{"type":52,"value":308},{"type":41,"tag":298,"props":12684,"children":12685},{"class":300,"line":311},[12686,12691,12695,12699],{"type":41,"tag":298,"props":12687,"children":12688},{"style":315},[12689],{"type":52,"value":12690},"  \"root\"",{"type":41,"tag":298,"props":12692,"children":12693},{"style":305},[12694],{"type":52,"value":1373},{"type":41,"tag":298,"props":12696,"children":12697},{"style":1376},[12698],{"type":52,"value":1379},{"type":41,"tag":298,"props":12700,"children":12701},{"style":305},[12702],{"type":52,"value":338},{"type":41,"tag":298,"props":12704,"children":12706},{"class":12705,"line":326},[300,728],[12707,12712,12716,12721,12725,12730],{"type":41,"tag":298,"props":12708,"children":12709},{"style":315},[12710],{"type":52,"value":12711},"  \"extends\"",{"type":41,"tag":298,"props":12713,"children":12714},{"style":305},[12715],{"type":52,"value":597},{"type":41,"tag":298,"props":12717,"children":12718},{"style":330},[12719],{"type":52,"value":12720},"\"semistandard\"",{"type":41,"tag":298,"props":12722,"children":12723},{"style":305},[12724],{"type":52,"value":607},{"type":41,"tag":298,"props":12726,"children":12727},{"style":330},[12728],{"type":52,"value":12729},"\"prettier\"",{"type":41,"tag":298,"props":12731,"children":12732},{"style":305},[12733],{"type":52,"value":617},{"type":41,"tag":298,"props":12735,"children":12736},{"class":300,"line":341},[12737,12742],{"type":41,"tag":298,"props":12738,"children":12739},{"style":315},[12740],{"type":52,"value":12741},"  \"rules\"",{"type":41,"tag":298,"props":12743,"children":12744},{"style":305},[12745],{"type":52,"value":1478},{"type":41,"tag":298,"props":12747,"children":12748},{"class":300,"line":354},[12749,12754,12758,12763,12767,12772],{"type":41,"tag":298,"props":12750,"children":12751},{"style":315},[12752],{"type":52,"value":12753},"    \"space-before-function-paren\"",{"type":41,"tag":298,"props":12755,"children":12756},{"style":305},[12757],{"type":52,"value":597},{"type":41,"tag":298,"props":12759,"children":12760},{"style":330},[12761],{"type":52,"value":12762},"\"error\"",{"type":41,"tag":298,"props":12764,"children":12765},{"style":305},[12766],{"type":52,"value":607},{"type":41,"tag":298,"props":12768,"children":12769},{"style":330},[12770],{"type":52,"value":12771},"\"never\"",{"type":41,"tag":298,"props":12773,"children":12774},{"style":305},[12775],{"type":52,"value":617},{"type":41,"tag":298,"props":12777,"children":12778},{"class":300,"line":367},[12779,12784,12788,12792,12796,12801],{"type":41,"tag":298,"props":12780,"children":12781},{"style":315},[12782],{"type":52,"value":12783},"    \"curly\"",{"type":41,"tag":298,"props":12785,"children":12786},{"style":305},[12787],{"type":52,"value":597},{"type":41,"tag":298,"props":12789,"children":12790},{"style":330},[12791],{"type":52,"value":12762},{"type":41,"tag":298,"props":12793,"children":12794},{"style":305},[12795],{"type":52,"value":607},{"type":41,"tag":298,"props":12797,"children":12798},{"style":330},[12799],{"type":52,"value":12800},"\"all\"",{"type":41,"tag":298,"props":12802,"children":12803},{"style":305},[12804],{"type":52,"value":617},{"type":41,"tag":298,"props":12806,"children":12807},{"class":300,"line":380},[12808,12813,12817,12821,12825,12830],{"type":41,"tag":298,"props":12809,"children":12810},{"style":315},[12811],{"type":52,"value":12812},"    \"comma-dangle\"",{"type":41,"tag":298,"props":12814,"children":12815},{"style":305},[12816],{"type":52,"value":597},{"type":41,"tag":298,"props":12818,"children":12819},{"style":330},[12820],{"type":52,"value":12762},{"type":41,"tag":298,"props":12822,"children":12823},{"style":305},[12824],{"type":52,"value":607},{"type":41,"tag":298,"props":12826,"children":12827},{"style":330},[12828],{"type":52,"value":12829},"\"always-multiline\"",{"type":41,"tag":298,"props":12831,"children":12832},{"style":305},[12833],{"type":52,"value":617},{"type":41,"tag":298,"props":12835,"children":12836},{"class":300,"line":389},[12837,12842,12846,12850],{"type":41,"tag":298,"props":12838,"children":12839},{"style":315},[12840],{"type":52,"value":12841},"    \"padding-line-between-statements\"",{"type":41,"tag":298,"props":12843,"children":12844},{"style":305},[12845],{"type":52,"value":597},{"type":41,"tag":298,"props":12847,"children":12848},{"style":330},[12849],{"type":52,"value":12762},{"type":41,"tag":298,"props":12851,"children":12852},{"style":305},[12853],{"type":52,"value":12854},", {\n",{"type":41,"tag":298,"props":12856,"children":12857},{"class":300,"line":398},[12858,12863,12867,12872],{"type":41,"tag":298,"props":12859,"children":12860},{"style":315},[12861],{"type":52,"value":12862},"      \"blankLine\"",{"type":41,"tag":298,"props":12864,"children":12865},{"style":305},[12866],{"type":52,"value":1373},{"type":41,"tag":298,"props":12868,"children":12869},{"style":330},[12870],{"type":52,"value":12871},"\"always\"",{"type":41,"tag":298,"props":12873,"children":12874},{"style":305},[12875],{"type":52,"value":338},{"type":41,"tag":298,"props":12877,"children":12878},{"class":300,"line":411},[12879,12884,12888,12893],{"type":41,"tag":298,"props":12880,"children":12881},{"style":315},[12882],{"type":52,"value":12883},"      \"prev\"",{"type":41,"tag":298,"props":12885,"children":12886},{"style":305},[12887],{"type":52,"value":1373},{"type":41,"tag":298,"props":12889,"children":12890},{"style":330},[12891],{"type":52,"value":12892},"\"*\"",{"type":41,"tag":298,"props":12894,"children":12895},{"style":305},[12896],{"type":52,"value":338},{"type":41,"tag":298,"props":12898,"children":12899},{"class":300,"line":424},[12900,12905,12909],{"type":41,"tag":298,"props":12901,"children":12902},{"style":315},[12903],{"type":52,"value":12904},"      \"next\"",{"type":41,"tag":298,"props":12906,"children":12907},{"style":305},[12908],{"type":52,"value":1373},{"type":41,"tag":298,"props":12910,"children":12911},{"style":330},[12912],{"type":52,"value":12913},"\"return\"\n",{"type":41,"tag":298,"props":12915,"children":12916},{"class":300,"line":433},[12917],{"type":41,"tag":298,"props":12918,"children":12919},{"style":305},[12920],{"type":52,"value":12921},"    }]\n",{"type":41,"tag":298,"props":12923,"children":12924},{"class":300,"line":441},[12925],{"type":41,"tag":298,"props":12926,"children":12927},{"style":305},[12928],{"type":52,"value":3165},{"type":41,"tag":298,"props":12930,"children":12931},{"class":300,"line":454},[12932],{"type":41,"tag":298,"props":12933,"children":12934},{"style":305},[12935],{"type":52,"value":490},{"type":41,"tag":79,"props":12937,"children":12938},{},[],{"type":41,"tag":48,"props":12940,"children":12941},{},[12942,12943,12948,12949,12955,12956,12961],{"type":52,"value":1598},{"type":41,"tag":55,"props":12944,"children":12946},{"href":1601,"rel":12945},[59],[12947],{"type":52,"value":1605},{"type":52,"value":3874},{"type":41,"tag":55,"props":12950,"children":12953},{"href":12951,"rel":12952},"https://www.youtube.com/watch?v=uOcJqRGAWAA",[59],[12954],{"type":52,"value":3914},{"type":52,"value":3916},{"type":41,"tag":55,"props":12957,"children":12959},{"href":1610,"rel":12958},[59],[12960],{"type":52,"value":1614},{"type":52,"value":1616},{"type":41,"tag":1618,"props":12963,"children":12964},{},[12965],{"type":52,"value":1622},{"title":7,"searchDepth":311,"depth":311,"links":12967},[12968,12969,12970,12971,12972,12973,12974],{"id":10546,"depth":311,"text":10549},{"id":10783,"depth":311,"text":10786},{"id":11587,"depth":311,"text":11590},{"id":12104,"depth":311,"text":12107},{"id":12356,"depth":311,"text":12359},{"id":12404,"depth":311,"text":12407},{"id":12447,"depth":311,"text":12450},"content:js:eslint.md","js/eslint.md","js/eslint",{"_path":12979,"_dir":3625,"_draft":6,"_partial":6,"_locale":7,"title":12980,"description":12981,"head":12982,"tags":12993,"links":12994,"chapters":12997,"created":12990,"thumb":12999,"body":13000,"_type":1638,"_id":15017,"_source":1640,"_file":15018,"_stem":15019,"_extension":1643},"/css/stylelint","Stylelint: CSS Linter You Must Know As A Frontend","Let me show you Stylelint, a tool for anyone working with CSS or SCSS, making sure the code doesn't go off the rails. It identifies errors, and rule violations, suggests fixes, and sometimes solves issues for you.",{"title":12983,"link":12984,"meta":12986},"Stylelint: CSS Linter You Must Know As A Frontend | pragmate.dev",[12985],{"rel":14,"href":176},[12987,12988,12989,12991],{"name":18,"content":19},{"name":21,"content":22},{"name":24,"content":12990},"2024-05-08",{"name":27,"content":12992},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/d8aa6dd6-0dc4-4826-966a-6ff17292a09e.jpeg",{"time":1659,"level":31},{"github":12995,"solution":12996},"https://github.com/pragmatedev/vilare/pull/20/files","#how-to-install-stylelint",[1589,12998],"/css/stylelint-order/","frontend",{"type":38,"children":13001,"toc":15005},[13002,13006,13033,13043,13046,13049,13055,13069,13092,13131,13172,13186,13261,13264,13270,13291,13392,13411,13478,13497,13610,13613,13619,13669,13767,13788,13901,13904,13910,13924,14013,14043,14139,14142,14146,14150,14157,14160,14163,14169,14190,14194,14215,14222,14225,14231,14248,14254,14259,14438,14443,14543,14560,14570,14578,14584,14597,14772,14777,14893,14922,14951,14957,14970,14975,14978,15001],{"type":41,"tag":42,"props":13003,"children":13005},{"thumbnail":12992,"url":13004},"https://www.youtube-nocookie.com/embed/_cDvBp-C7oY",[],{"type":41,"tag":48,"props":13007,"children":13008},{},[13009,13011,13017,13019,13031],{"type":52,"value":13010},"What kind of issues? For example, if your project has a policy against using ",{"type":41,"tag":278,"props":13012,"children":13014},{"className":13013},[],[13015],{"type":52,"value":13016},"px",{"type":52,"value":13018}," units, ",{"type":41,"tag":95,"props":13020,"children":13021},{},[13022,13024,13029],{"type":52,"value":13023},"you can configure Stylelint to flag any instances where ",{"type":41,"tag":278,"props":13025,"children":13027},{"className":13026},[],[13028],{"type":52,"value":13016},{"type":52,"value":13030}," units are used, providing immediate feedback to developers that these need to be changed",{"type":52,"value":13032},". This instant alert helps maintain consistency and uphold standards within your project.",{"type":41,"tag":48,"props":13034,"children":13035},{},[13036,13041],{"type":41,"tag":95,"props":13037,"children":13038},{},[13039],{"type":52,"value":13040},"Stylelint protects against coding issues, saves development time, and improves the quality of your project.",{"type":52,"value":13042}," It is precious in team environments or larger projects where a consistent coding style is key, however, it is not so crucial if you don't write a lot of CSS code, or for the simplest projects.",{"type":41,"tag":75,"props":13044,"children":13045},{},[],{"type":41,"tag":79,"props":13047,"children":13048},{},[],{"type":41,"tag":83,"props":13050,"children":13052},{"id":13051},"how-to-install-stylelint",[13053],{"type":52,"value":13054},"How to Install Stylelint?",{"type":41,"tag":48,"props":13056,"children":13057},{},[13058,13060,13067],{"type":52,"value":13059},"At first, I suggest sticking to the ",{"type":41,"tag":55,"props":13061,"children":13064},{"href":13062,"rel":13063},"https://stylelint.io/user-guide/get-started",[59],[13065],{"type":52,"value":13066},"official docs",{"type":52,"value":13068}," and using NPM for installation 😅 This method ensures a smooth setup, avoiding the issues like I experienced with Yarn.",{"type":41,"tag":287,"props":13070,"children":13072},{"className":1921,"code":13071,"language":1923,"meta":7,"style":7},"npm init stylelint\n",[13073],{"type":41,"tag":278,"props":13074,"children":13075},{"__ignoreMap":7},[13076],{"type":41,"tag":298,"props":13077,"children":13078},{"class":300,"line":301},[13079,13083,13087],{"type":41,"tag":298,"props":13080,"children":13081},{"style":737},[13082],{"type":52,"value":10574},{"type":41,"tag":298,"props":13084,"children":13085},{"style":330},[13086],{"type":52,"value":4157},{"type":41,"tag":298,"props":13088,"children":13089},{"style":330},[13090],{"type":52,"value":13091}," stylelint\n",{"type":41,"tag":48,"props":13093,"children":13094},{},[13095,13097,13104,13106,13113,13115,13121,13123,13129],{"type":52,"value":13096},"The installation command not only sets up Stylelint but also includes ",{"type":41,"tag":55,"props":13098,"children":13101},{"href":13099,"rel":13100},"https://github.com/stylelint/stylelint-config-recommended/blob/main/index.js",[59],[13102],{"type":52,"value":13103},"recommended rules",{"type":52,"value":13105},", providing a strong foundation that you can ",{"type":41,"tag":55,"props":13107,"children":13110},{"href":13108,"rel":13109},"https://stylelint.io/user-guide/customize",[59],[13111],{"type":52,"value":13112},"customize",{"type":52,"value":13114}," for your project's needs. It also creates a ",{"type":41,"tag":55,"props":13116,"children":13119},{"href":13117,"rel":13118},"https://stylelint.io/user-guide/configure/",[59],[13120],{"type":52,"value":3256},{"type":52,"value":13122}," named ",{"type":41,"tag":278,"props":13124,"children":13126},{"className":13125},[],[13127],{"type":52,"value":13128},".stylelintrc.json",{"type":52,"value":13130}," that you'll modify later.",{"type":41,"tag":287,"props":13132,"children":13134},{"className":289,"code":13133,"filename":13128,"language":292,"meta":7,"style":7},"{\n  \"extends\": [\"stylelint-config-standard\"]\n}\n",[13135],{"type":41,"tag":278,"props":13136,"children":13137},{"__ignoreMap":7},[13138,13145,13165],{"type":41,"tag":298,"props":13139,"children":13140},{"class":300,"line":301},[13141],{"type":41,"tag":298,"props":13142,"children":13143},{"style":305},[13144],{"type":52,"value":308},{"type":41,"tag":298,"props":13146,"children":13147},{"class":300,"line":311},[13148,13152,13156,13161],{"type":41,"tag":298,"props":13149,"children":13150},{"style":315},[13151],{"type":52,"value":12711},{"type":41,"tag":298,"props":13153,"children":13154},{"style":305},[13155],{"type":52,"value":597},{"type":41,"tag":298,"props":13157,"children":13158},{"style":330},[13159],{"type":52,"value":13160},"\"stylelint-config-standard\"",{"type":41,"tag":298,"props":13162,"children":13163},{"style":305},[13164],{"type":52,"value":647},{"type":41,"tag":298,"props":13166,"children":13167},{"class":300,"line":326},[13168],{"type":41,"tag":298,"props":13169,"children":13170},{"style":305},[13171],{"type":52,"value":490},{"type":41,"tag":48,"props":13173,"children":13174},{},[13175,13177,13184],{"type":52,"value":13176},"If you're working with SCSS, integrating ",{"type":41,"tag":55,"props":13178,"children":13181},{"href":13179,"rel":13180},"https://github.com/stylelint-scss/stylelint-config-standard-scss/blob/main/index.js",[59],[13182],{"type":52,"value":13183},"SCSS-specific rules",{"type":52,"value":13185}," into your configuration is easy. Install them with the command below and tell the Stylelint to use them.",{"type":41,"tag":1725,"props":13187,"children":13189},{":tabs":13188},"[\"Install\", \".stylelintrc.json\"]",[13190,13220],{"type":41,"tag":287,"props":13191,"children":13194},{"className":1921,"code":13192,"filename":13193,"language":1923,"meta":7,"style":7},"npm install stylelint-config-standard-scss --save-dev\n","Install",[13195],{"type":41,"tag":278,"props":13196,"children":13197},{"__ignoreMap":7},[13198],{"type":41,"tag":298,"props":13199,"children":13200},{"class":300,"line":301},[13201,13205,13210,13215],{"type":41,"tag":298,"props":13202,"children":13203},{"style":737},[13204],{"type":52,"value":10574},{"type":41,"tag":298,"props":13206,"children":13207},{"style":330},[13208],{"type":52,"value":13209}," install",{"type":41,"tag":298,"props":13211,"children":13212},{"style":330},[13213],{"type":52,"value":13214}," stylelint-config-standard-scss",{"type":41,"tag":298,"props":13216,"children":13217},{"style":1376},[13218],{"type":52,"value":13219}," --save-dev\n",{"type":41,"tag":287,"props":13221,"children":13223},{"className":289,"code":13222,"filename":13128,"language":292,"meta":7,"style":7},"{\n  \"extends\": [\"stylelint-config-standard-scss\"]\n}\n",[13224],{"type":41,"tag":278,"props":13225,"children":13226},{"__ignoreMap":7},[13227,13234,13254],{"type":41,"tag":298,"props":13228,"children":13229},{"class":300,"line":301},[13230],{"type":41,"tag":298,"props":13231,"children":13232},{"style":305},[13233],{"type":52,"value":308},{"type":41,"tag":298,"props":13235,"children":13236},{"class":300,"line":311},[13237,13241,13245,13250],{"type":41,"tag":298,"props":13238,"children":13239},{"style":315},[13240],{"type":52,"value":12711},{"type":41,"tag":298,"props":13242,"children":13243},{"style":305},[13244],{"type":52,"value":597},{"type":41,"tag":298,"props":13246,"children":13247},{"style":330},[13248],{"type":52,"value":13249},"\"stylelint-config-standard-scss\"",{"type":41,"tag":298,"props":13251,"children":13252},{"style":305},[13253],{"type":52,"value":647},{"type":41,"tag":298,"props":13255,"children":13256},{"class":300,"line":326},[13257],{"type":41,"tag":298,"props":13258,"children":13259},{"style":305},[13260],{"type":52,"value":490},{"type":41,"tag":79,"props":13262,"children":13263},{},[],{"type":41,"tag":83,"props":13265,"children":13267},{"id":13266},"how-to-use-stylelint",[13268],{"type":52,"value":13269},"How to Use Stylelint?",{"type":41,"tag":48,"props":13271,"children":13272},{},[13273,13275,13282,13284,13290],{"type":52,"value":13274},"Once Stylelint is installed, you're ready to put it to work. With the ",{"type":41,"tag":55,"props":13276,"children":13279},{"href":13277,"rel":13278},"https://stylelint.io/user-guide/cli",[59],[13280],{"type":52,"value":13281},"command-line interface",{"type":52,"value":13283},", you can lint all SCSS files within the specific directory e.g. ",{"type":41,"tag":278,"props":13285,"children":13287},{"className":13286},[],[13288],{"type":52,"value":13289},"resources",{"type":52,"value":140},{"type":41,"tag":287,"props":13292,"children":13294},{"className":1996,"code":13293,"language":1998,"meta":7,"style":7},"yarn stylelint resources/**/*.scss\n\nresources/styles/styles.scss\n   2:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n  11:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n  20:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n  35:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n  35:16  ✖  Unexpected missing generic font family          font-family-no-missing-generic-family-keyword\n  47:3   ✖  Expected \"0 0 1.375rem 0\" to be \"0 0 1.375rem\"  shorthand-property-no-redundant-values\n\n✖ 6 problems (6 errors, 0 warnings)\n  5 errors potentially fixable with the \"--fix\" option.\n",[13295],{"type":41,"tag":278,"props":13296,"children":13297},{"__ignoreMap":7},[13298,13306,13313,13321,13329,13337,13345,13353,13361,13369,13376,13384],{"type":41,"tag":298,"props":13299,"children":13300},{"class":300,"line":301},[13301],{"type":41,"tag":298,"props":13302,"children":13303},{"style":305},[13304],{"type":52,"value":13305},"yarn stylelint resources/**/*.scss\n",{"type":41,"tag":298,"props":13307,"children":13308},{"class":300,"line":311},[13309],{"type":41,"tag":298,"props":13310,"children":13311},{"emptyLinePlaceholder":36},[13312],{"type":52,"value":2018},{"type":41,"tag":298,"props":13314,"children":13315},{"class":300,"line":326},[13316],{"type":41,"tag":298,"props":13317,"children":13318},{"style":305},[13319],{"type":52,"value":13320},"resources/styles/styles.scss\n",{"type":41,"tag":298,"props":13322,"children":13323},{"class":300,"line":341},[13324],{"type":41,"tag":298,"props":13325,"children":13326},{"style":305},[13327],{"type":52,"value":13328},"   2:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n",{"type":41,"tag":298,"props":13330,"children":13331},{"class":300,"line":354},[13332],{"type":41,"tag":298,"props":13333,"children":13334},{"style":305},[13335],{"type":52,"value":13336},"  11:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n",{"type":41,"tag":298,"props":13338,"children":13339},{"class":300,"line":367},[13340],{"type":41,"tag":298,"props":13341,"children":13342},{"style":305},[13343],{"type":52,"value":13344},"  20:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n",{"type":41,"tag":298,"props":13346,"children":13347},{"class":300,"line":380},[13348],{"type":41,"tag":298,"props":13349,"children":13350},{"style":305},[13351],{"type":52,"value":13352},"  35:16  ✖  Unexpected quotes around \"Montserrat\"           font-family-name-quotes\n",{"type":41,"tag":298,"props":13354,"children":13355},{"class":300,"line":389},[13356],{"type":41,"tag":298,"props":13357,"children":13358},{"style":305},[13359],{"type":52,"value":13360},"  35:16  ✖  Unexpected missing generic font family          font-family-no-missing-generic-family-keyword\n",{"type":41,"tag":298,"props":13362,"children":13363},{"class":300,"line":398},[13364],{"type":41,"tag":298,"props":13365,"children":13366},{"style":305},[13367],{"type":52,"value":13368},"  47:3   ✖  Expected \"0 0 1.375rem 0\" to be \"0 0 1.375rem\"  shorthand-property-no-redundant-values\n",{"type":41,"tag":298,"props":13370,"children":13371},{"class":300,"line":411},[13372],{"type":41,"tag":298,"props":13373,"children":13374},{"emptyLinePlaceholder":36},[13375],{"type":52,"value":2018},{"type":41,"tag":298,"props":13377,"children":13378},{"class":300,"line":424},[13379],{"type":41,"tag":298,"props":13380,"children":13381},{"style":305},[13382],{"type":52,"value":13383},"✖ 6 problems (6 errors, 0 warnings)\n",{"type":41,"tag":298,"props":13385,"children":13386},{"class":300,"line":433},[13387],{"type":41,"tag":298,"props":13388,"children":13389},{"style":305},[13390],{"type":52,"value":13391},"  5 errors potentially fixable with the \"--fix\" option.\n",{"type":41,"tag":48,"props":13393,"children":13394},{},[13395,13409],{"type":41,"tag":298,"props":13396,"children":13399},{"className":13397},[13398],"-highlight",[13400,13402,13407],{"type":52,"value":13401},"If Stylelint identifies issues that can be automatically fixed, appending the ",{"type":41,"tag":278,"props":13403,"children":13405},{"className":13404},[],[13406],{"type":52,"value":11373},{"type":52,"value":13408}," flag to your command will address these issues",{"type":52,"value":13410},", simplifying your workflow. Any remaining issues must be manually handled, which is a standard part of the process.",{"type":41,"tag":287,"props":13412,"children":13414},{"className":1996,"code":13413,"language":1998,"meta":7,"style":7},"yarn stylelint resources/**/*.scss --fix\n\nresources/styles/styles.scss\n  35:16  ✖  Unexpected missing generic font family  font-family-no-missing-generic-family-keyword\n\n✖ 1 problem (1 error, 0 warnings)\n\nerror Command failed with exit code 2.\n",[13415],{"type":41,"tag":278,"props":13416,"children":13417},{"__ignoreMap":7},[13418,13426,13433,13440,13448,13455,13463,13470],{"type":41,"tag":298,"props":13419,"children":13420},{"class":300,"line":301},[13421],{"type":41,"tag":298,"props":13422,"children":13423},{"style":305},[13424],{"type":52,"value":13425},"yarn stylelint resources/**/*.scss --fix\n",{"type":41,"tag":298,"props":13427,"children":13428},{"class":300,"line":311},[13429],{"type":41,"tag":298,"props":13430,"children":13431},{"emptyLinePlaceholder":36},[13432],{"type":52,"value":2018},{"type":41,"tag":298,"props":13434,"children":13435},{"class":300,"line":326},[13436],{"type":41,"tag":298,"props":13437,"children":13438},{"style":305},[13439],{"type":52,"value":13320},{"type":41,"tag":298,"props":13441,"children":13442},{"class":300,"line":341},[13443],{"type":41,"tag":298,"props":13444,"children":13445},{"style":305},[13446],{"type":52,"value":13447},"  35:16  ✖  Unexpected missing generic font family  font-family-no-missing-generic-family-keyword\n",{"type":41,"tag":298,"props":13449,"children":13450},{"class":300,"line":354},[13451],{"type":41,"tag":298,"props":13452,"children":13453},{"emptyLinePlaceholder":36},[13454],{"type":52,"value":2018},{"type":41,"tag":298,"props":13456,"children":13457},{"class":300,"line":367},[13458],{"type":41,"tag":298,"props":13459,"children":13460},{"style":305},[13461],{"type":52,"value":13462},"✖ 1 problem (1 error, 0 warnings)\n",{"type":41,"tag":298,"props":13464,"children":13465},{"class":300,"line":380},[13466],{"type":41,"tag":298,"props":13467,"children":13468},{"emptyLinePlaceholder":36},[13469],{"type":52,"value":2018},{"type":41,"tag":298,"props":13471,"children":13472},{"class":300,"line":389},[13473],{"type":41,"tag":298,"props":13474,"children":13475},{"style":305},[13476],{"type":52,"value":13477},"error Command failed with exit code 2.\n",{"type":41,"tag":48,"props":13479,"children":13480},{},[13481,13483,13488,13490,13495],{"type":52,"value":13482},"Tip: Dropping Stylelint tasks into your ",{"type":41,"tag":278,"props":13484,"children":13486},{"className":13485},[],[13487],{"type":52,"value":2191},{"type":52,"value":13489}," is a great way to make your setup more efficient, keeping your configs and dependencies in one place. Just place the lining and formatting commands after the Prettier's ones (they have been described ",{"type":41,"tag":55,"props":13491,"children":13493},{"href":57,"rel":13492},[59],[13494],{"type":52,"value":12394},{"type":52,"value":13496},").",{"type":41,"tag":287,"props":13498,"children":13500},{"className":289,"code":13499,"filename":2191,"language":292,"meta":7,"style":7},"{\n  \"scripts\": {\n    \"build\": \"vite build\",\n    \"dev\": \"vite\",\n    \"lint\": \"prettier . --check && stylelint **/*.{css,scss};\",\n    \"format\": \"prettier . --write && stylelint **/*.{css,scss} --fix;\"\n  },\n}\n",[13501],{"type":41,"tag":278,"props":13502,"children":13503},{"__ignoreMap":7},[13504,13511,13522,13541,13560,13580,13596,13603],{"type":41,"tag":298,"props":13505,"children":13506},{"class":300,"line":301},[13507],{"type":41,"tag":298,"props":13508,"children":13509},{"style":305},[13510],{"type":52,"value":308},{"type":41,"tag":298,"props":13512,"children":13513},{"class":300,"line":311},[13514,13518],{"type":41,"tag":298,"props":13515,"children":13516},{"style":315},[13517],{"type":52,"value":2236},{"type":41,"tag":298,"props":13519,"children":13520},{"style":305},[13521],{"type":52,"value":1478},{"type":41,"tag":298,"props":13523,"children":13524},{"class":300,"line":326},[13525,13529,13533,13537],{"type":41,"tag":298,"props":13526,"children":13527},{"style":315},[13528],{"type":52,"value":2248},{"type":41,"tag":298,"props":13530,"children":13531},{"style":305},[13532],{"type":52,"value":1373},{"type":41,"tag":298,"props":13534,"children":13535},{"style":330},[13536],{"type":52,"value":2257},{"type":41,"tag":298,"props":13538,"children":13539},{"style":305},[13540],{"type":52,"value":338},{"type":41,"tag":298,"props":13542,"children":13543},{"class":300,"line":341},[13544,13548,13552,13556],{"type":41,"tag":298,"props":13545,"children":13546},{"style":315},[13547],{"type":52,"value":2269},{"type":41,"tag":298,"props":13549,"children":13550},{"style":305},[13551],{"type":52,"value":1373},{"type":41,"tag":298,"props":13553,"children":13554},{"style":330},[13555],{"type":52,"value":2278},{"type":41,"tag":298,"props":13557,"children":13558},{"style":305},[13559],{"type":52,"value":338},{"type":41,"tag":298,"props":13561,"children":13562},{"class":300,"line":354},[13563,13567,13571,13576],{"type":41,"tag":298,"props":13564,"children":13565},{"style":315},[13566],{"type":52,"value":2290},{"type":41,"tag":298,"props":13568,"children":13569},{"style":305},[13570],{"type":52,"value":1373},{"type":41,"tag":298,"props":13572,"children":13573},{"style":330},[13574],{"type":52,"value":13575},"\"prettier . --check && stylelint **/*.{css,scss};\"",{"type":41,"tag":298,"props":13577,"children":13578},{"style":305},[13579],{"type":52,"value":338},{"type":41,"tag":298,"props":13581,"children":13582},{"class":300,"line":367},[13583,13587,13591],{"type":41,"tag":298,"props":13584,"children":13585},{"style":315},[13586],{"type":52,"value":2311},{"type":41,"tag":298,"props":13588,"children":13589},{"style":305},[13590],{"type":52,"value":1373},{"type":41,"tag":298,"props":13592,"children":13593},{"style":330},[13594],{"type":52,"value":13595},"\"prettier . --write && stylelint **/*.{css,scss} --fix;\"\n",{"type":41,"tag":298,"props":13597,"children":13598},{"class":300,"line":380},[13599],{"type":41,"tag":298,"props":13600,"children":13601},{"style":305},[13602],{"type":52,"value":2328},{"type":41,"tag":298,"props":13604,"children":13605},{"class":300,"line":389},[13606],{"type":41,"tag":298,"props":13607,"children":13608},{"style":305},[13609],{"type":52,"value":490},{"type":41,"tag":79,"props":13611,"children":13612},{},[],{"type":41,"tag":83,"props":13614,"children":13616},{"id":13615},"how-to-configure-stylelint",[13617],{"type":52,"value":13618},"How to Configure Stylelint?",{"type":41,"tag":48,"props":13620,"children":13621},{},[13622,13624,13631,13632,13645,13647,13652,13654,13660,13662,13668],{"type":52,"value":13623},"Stylelint provides several ",{"type":41,"tag":55,"props":13625,"children":13628},{"href":13626,"rel":13627},"https://stylelint.io/user-guide/configure",[59],[13629],{"type":52,"value":13630},"configurable options",{"type":52,"value":2358},{"type":41,"tag":95,"props":13633,"children":13634},{},[13635,13637,13643],{"type":52,"value":13636},"the most I need is choosing standard and ",{"type":41,"tag":55,"props":13638,"children":13640},{"href":13108,"rel":13639},[59],[13641],{"type":52,"value":13642},"adjusting rules",{"type":52,"value":13644}," to my needs",{"type":52,"value":13646}," what can be eaisly done in the ",{"type":41,"tag":278,"props":13648,"children":13650},{"className":13649},[],[13651],{"type":52,"value":13128},{"type":52,"value":13653}," file. Let's say that I want to allow empty CSS files, which are forbidden in the standard config. I need to add a ",{"type":41,"tag":278,"props":13655,"children":13657},{"className":13656},[],[13658],{"type":52,"value":13659},"rules",{"type":52,"value":13661}," key to the config and disable ",{"type":41,"tag":278,"props":13663,"children":13665},{"className":13664},[],[13666],{"type":52,"value":13667},"no-empty-source",{"type":52,"value":140},{"type":41,"tag":287,"props":13670,"children":13673},{"className":289,"code":13671,"filename":13128,"highlights":13672,"language":292,"meta":7,"style":7},"{\n  \"extends\": [\n    \"stylelint-config-standard-scss\",\n    \"stylelint-config-clean-order\"\n  ],\n  \"rules\": {\n    \"no-empty-source\": null\n  }\n}\n",[367,380,389],[13674],{"type":41,"tag":278,"props":13675,"children":13676},{"__ignoreMap":7},[13677,13684,13695,13707,13715,13722,13734,13752,13760],{"type":41,"tag":298,"props":13678,"children":13679},{"class":300,"line":301},[13680],{"type":41,"tag":298,"props":13681,"children":13682},{"style":305},[13683],{"type":52,"value":308},{"type":41,"tag":298,"props":13685,"children":13686},{"class":300,"line":311},[13687,13691],{"type":41,"tag":298,"props":13688,"children":13689},{"style":315},[13690],{"type":52,"value":12711},{"type":41,"tag":298,"props":13692,"children":13693},{"style":305},[13694],{"type":52,"value":323},{"type":41,"tag":298,"props":13696,"children":13697},{"class":300,"line":326},[13698,13703],{"type":41,"tag":298,"props":13699,"children":13700},{"style":330},[13701],{"type":52,"value":13702},"    \"stylelint-config-standard-scss\"",{"type":41,"tag":298,"props":13704,"children":13705},{"style":305},[13706],{"type":52,"value":338},{"type":41,"tag":298,"props":13708,"children":13709},{"class":300,"line":341},[13710],{"type":41,"tag":298,"props":13711,"children":13712},{"style":330},[13713],{"type":52,"value":13714},"    \"stylelint-config-clean-order\"\n",{"type":41,"tag":298,"props":13716,"children":13717},{"class":300,"line":354},[13718],{"type":41,"tag":298,"props":13719,"children":13720},{"style":305},[13721],{"type":52,"value":395},{"type":41,"tag":298,"props":13723,"children":13725},{"class":13724,"line":367},[300,728],[13726,13730],{"type":41,"tag":298,"props":13727,"children":13728},{"style":315},[13729],{"type":52,"value":12741},{"type":41,"tag":298,"props":13731,"children":13732},{"style":305},[13733],{"type":52,"value":1478},{"type":41,"tag":298,"props":13735,"children":13737},{"class":13736,"line":380},[300,728],[13738,13743,13747],{"type":41,"tag":298,"props":13739,"children":13740},{"style":315},[13741],{"type":52,"value":13742},"    \"no-empty-source\"",{"type":41,"tag":298,"props":13744,"children":13745},{"style":305},[13746],{"type":52,"value":1373},{"type":41,"tag":298,"props":13748,"children":13749},{"style":1376},[13750],{"type":52,"value":13751},"null\n",{"type":41,"tag":298,"props":13753,"children":13755},{"class":13754,"line":389},[300,728],[13756],{"type":41,"tag":298,"props":13757,"children":13758},{"style":305},[13759],{"type":52,"value":3165},{"type":41,"tag":298,"props":13761,"children":13762},{"class":300,"line":398},[13763],{"type":41,"tag":298,"props":13764,"children":13765},{"style":305},[13766],{"type":52,"value":490},{"type":41,"tag":48,"props":13768,"children":13769},{},[13770,13772,13778,13780,13786],{"type":52,"value":13771},"Keep in mind that Stylelint ",{"type":41,"tag":55,"props":13773,"children":13775},{"href":13117,"rel":13774},[59],[13776],{"type":52,"value":13777},"searches for configurations in several file types",{"type":52,"value":13779},", so JSON is not your only option. If you're looking for more flexible solutions, such as applying rules conditionally, you might want to consider using the ",{"type":41,"tag":278,"props":13781,"children":13783},{"className":13782},[],[13784],{"type":52,"value":13785},"stylelint.config.js",{"type":52,"value":13787}," format.",{"type":41,"tag":287,"props":13789,"children":13791},{"className":1731,"code":13790,"filename":13785,"language":1734,"meta":7,"style":7},"export default {\n  extends: [\n    'stylelint-config-standard-scss',\n    'stylelint-config-clean-order',\n  ],\n  rules: {\n    'no-empty-source': null,\n  },\n};\n",[13792],{"type":41,"tag":278,"props":13793,"children":13794},{"__ignoreMap":7},[13795,13810,13822,13834,13846,13853,13865,13886,13893],{"type":41,"tag":298,"props":13796,"children":13797},{"class":300,"line":301},[13798,13802,13806],{"type":41,"tag":298,"props":13799,"children":13800},{"style":3648},[13801],{"type":52,"value":10669},{"type":41,"tag":298,"props":13803,"children":13804},{"style":3648},[13805],{"type":52,"value":10674},{"type":41,"tag":298,"props":13807,"children":13808},{"style":305},[13809],{"type":52,"value":4172},{"type":41,"tag":298,"props":13811,"children":13812},{"class":300,"line":311},[13813,13818],{"type":41,"tag":298,"props":13814,"children":13815},{"style":315},[13816],{"type":52,"value":13817},"  extends",{"type":41,"tag":298,"props":13819,"children":13820},{"style":305},[13821],{"type":52,"value":323},{"type":41,"tag":298,"props":13823,"children":13824},{"class":300,"line":326},[13825,13830],{"type":41,"tag":298,"props":13826,"children":13827},{"style":330},[13828],{"type":52,"value":13829},"    'stylelint-config-standard-scss'",{"type":41,"tag":298,"props":13831,"children":13832},{"style":305},[13833],{"type":52,"value":338},{"type":41,"tag":298,"props":13835,"children":13836},{"class":300,"line":341},[13837,13842],{"type":41,"tag":298,"props":13838,"children":13839},{"style":330},[13840],{"type":52,"value":13841},"    'stylelint-config-clean-order'",{"type":41,"tag":298,"props":13843,"children":13844},{"style":305},[13845],{"type":52,"value":338},{"type":41,"tag":298,"props":13847,"children":13848},{"class":300,"line":354},[13849],{"type":41,"tag":298,"props":13850,"children":13851},{"style":305},[13852],{"type":52,"value":395},{"type":41,"tag":298,"props":13854,"children":13855},{"class":300,"line":367},[13856,13861],{"type":41,"tag":298,"props":13857,"children":13858},{"style":315},[13859],{"type":52,"value":13860},"  rules",{"type":41,"tag":298,"props":13862,"children":13863},{"style":305},[13864],{"type":52,"value":1478},{"type":41,"tag":298,"props":13866,"children":13867},{"class":300,"line":380},[13868,13873,13877,13882],{"type":41,"tag":298,"props":13869,"children":13870},{"style":330},[13871],{"type":52,"value":13872},"    'no-empty-source'",{"type":41,"tag":298,"props":13874,"children":13875},{"style":305},[13876],{"type":52,"value":1373},{"type":41,"tag":298,"props":13878,"children":13879},{"style":1376},[13880],{"type":52,"value":13881},"null",{"type":41,"tag":298,"props":13883,"children":13884},{"style":305},[13885],{"type":52,"value":338},{"type":41,"tag":298,"props":13887,"children":13888},{"class":300,"line":389},[13889],{"type":41,"tag":298,"props":13890,"children":13891},{"style":305},[13892],{"type":52,"value":2328},{"type":41,"tag":298,"props":13894,"children":13895},{"class":300,"line":398},[13896],{"type":41,"tag":298,"props":13897,"children":13898},{"style":305},[13899],{"type":52,"value":13900},"};\n",{"type":41,"tag":79,"props":13902,"children":13903},{},[],{"type":41,"tag":83,"props":13905,"children":13907},{"id":13906},"how-to-ignore-errors-in-stylelint",[13908],{"type":52,"value":13909},"How to Ignore Errors in Stylelint?",{"type":41,"tag":48,"props":13911,"children":13912},{},[13913,13915,13922],{"type":52,"value":13914},"The process with Stylelint is similar to other linters and formatters. You can use specific ",{"type":41,"tag":55,"props":13916,"children":13919},{"href":13917,"rel":13918},"https://stylelint.io/user-guide/ignore-code/#parts-of-a-file",[59],[13920],{"type":52,"value":13921},"comment formats",{"type":52,"value":13923}," to exclude certain blocks from validation, specific lines, or even disable a specific rule for a section or line.",{"type":41,"tag":287,"props":13925,"children":13927},{"className":3623,"code":13926,"language":3625,"meta":7,"style":7},"/* stylelint-disable */\na {}\n/* stylelint-enable */\n\n#id { /* stylelint-disable-line */\n  color: pink !important; /* stylelint-disable-line declaration-no-important */\n}\n",[13928],{"type":41,"tag":278,"props":13929,"children":13930},{"__ignoreMap":7},[13931,13939,13951,13959,13966,13984,14006],{"type":41,"tag":298,"props":13932,"children":13933},{"class":300,"line":301},[13934],{"type":41,"tag":298,"props":13935,"children":13936},{"style":3515},[13937],{"type":52,"value":13938},"/* stylelint-disable */\n",{"type":41,"tag":298,"props":13940,"children":13941},{"class":300,"line":311},[13942,13946],{"type":41,"tag":298,"props":13943,"children":13944},{"style":315},[13945],{"type":52,"value":55},{"type":41,"tag":298,"props":13947,"children":13948},{"style":305},[13949],{"type":52,"value":13950}," {}\n",{"type":41,"tag":298,"props":13952,"children":13953},{"class":300,"line":326},[13954],{"type":41,"tag":298,"props":13955,"children":13956},{"style":3515},[13957],{"type":52,"value":13958},"/* stylelint-enable */\n",{"type":41,"tag":298,"props":13960,"children":13961},{"class":300,"line":341},[13962],{"type":41,"tag":298,"props":13963,"children":13964},{"emptyLinePlaceholder":36},[13965],{"type":52,"value":2018},{"type":41,"tag":298,"props":13967,"children":13968},{"class":300,"line":354},[13969,13974,13979],{"type":41,"tag":298,"props":13970,"children":13971},{"style":737},[13972],{"type":52,"value":13973},"#id",{"type":41,"tag":298,"props":13975,"children":13976},{"style":305},[13977],{"type":52,"value":13978}," { ",{"type":41,"tag":298,"props":13980,"children":13981},{"style":3515},[13982],{"type":52,"value":13983},"/* stylelint-disable-line */\n",{"type":41,"tag":298,"props":13985,"children":13986},{"class":300,"line":367},[13987,13992,13997,14001],{"type":41,"tag":298,"props":13988,"children":13989},{"style":305},[13990],{"type":52,"value":13991},"  color: pink ",{"type":41,"tag":298,"props":13993,"children":13994},{"style":3648},[13995],{"type":52,"value":13996},"!important",{"type":41,"tag":298,"props":13998,"children":13999},{"style":305},[14000],{"type":52,"value":4825},{"type":41,"tag":298,"props":14002,"children":14003},{"style":3515},[14004],{"type":52,"value":14005},"/* stylelint-disable-line declaration-no-important */\n",{"type":41,"tag":298,"props":14007,"children":14008},{"class":300,"line":380},[14009],{"type":41,"tag":298,"props":14010,"children":14011},{"style":305},[14012],{"type":52,"value":490},{"type":41,"tag":48,"props":14014,"children":14015},{},[14016,14018,14024,14026,14033,14035,14041],{"type":52,"value":14017},"Additionally, you can create a ",{"type":41,"tag":278,"props":14019,"children":14021},{"className":14020},[],[14022],{"type":52,"value":14023},".stylelintignore",{"type":52,"value":14025}," file to ",{"type":41,"tag":55,"props":14027,"children":14030},{"href":14028,"rel":14029},"https://stylelint.io/user-guide/ignore-code/#files-entirely",[59],[14031],{"type":52,"value":14032},"exclude entire directories or specific file formats",{"type":52,"value":14034}," from being linted. Alternatively, you can achieve the same effect by specifying files to ignore in the ",{"type":41,"tag":278,"props":14036,"children":14038},{"className":14037},[],[14039],{"type":52,"value":14040},"ignoreFiles",{"type":52,"value":14042}," key of the Stylelint configuration file.",{"type":41,"tag":287,"props":14044,"children":14046},{"className":289,"code":14045,"filename":13128,"language":292,"meta":7,"style":7},"{\n  \"extends\": [\n    \"stylelint-config-standard-scss\",\n    \"stylelint-config-clean-order\"\n  ],\n  \"ignoreFiles\": [\n    \"node_modules\",\n    \"dist/**/*\"\n  ]\n}\n",[14047],{"type":41,"tag":278,"props":14048,"children":14049},{"__ignoreMap":7},[14050,14057,14068,14079,14086,14093,14105,14117,14125,14132],{"type":41,"tag":298,"props":14051,"children":14052},{"class":300,"line":301},[14053],{"type":41,"tag":298,"props":14054,"children":14055},{"style":305},[14056],{"type":52,"value":308},{"type":41,"tag":298,"props":14058,"children":14059},{"class":300,"line":311},[14060,14064],{"type":41,"tag":298,"props":14061,"children":14062},{"style":315},[14063],{"type":52,"value":12711},{"type":41,"tag":298,"props":14065,"children":14066},{"style":305},[14067],{"type":52,"value":323},{"type":41,"tag":298,"props":14069,"children":14070},{"class":300,"line":326},[14071,14075],{"type":41,"tag":298,"props":14072,"children":14073},{"style":330},[14074],{"type":52,"value":13702},{"type":41,"tag":298,"props":14076,"children":14077},{"style":305},[14078],{"type":52,"value":338},{"type":41,"tag":298,"props":14080,"children":14081},{"class":300,"line":341},[14082],{"type":41,"tag":298,"props":14083,"children":14084},{"style":330},[14085],{"type":52,"value":13714},{"type":41,"tag":298,"props":14087,"children":14088},{"class":300,"line":354},[14089],{"type":41,"tag":298,"props":14090,"children":14091},{"style":305},[14092],{"type":52,"value":395},{"type":41,"tag":298,"props":14094,"children":14095},{"class":300,"line":367},[14096,14101],{"type":41,"tag":298,"props":14097,"children":14098},{"style":315},[14099],{"type":52,"value":14100},"  \"ignoreFiles\"",{"type":41,"tag":298,"props":14102,"children":14103},{"style":305},[14104],{"type":52,"value":323},{"type":41,"tag":298,"props":14106,"children":14107},{"class":300,"line":380},[14108,14113],{"type":41,"tag":298,"props":14109,"children":14110},{"style":330},[14111],{"type":52,"value":14112},"    \"node_modules\"",{"type":41,"tag":298,"props":14114,"children":14115},{"style":305},[14116],{"type":52,"value":338},{"type":41,"tag":298,"props":14118,"children":14119},{"class":300,"line":389},[14120],{"type":41,"tag":298,"props":14121,"children":14122},{"style":330},[14123],{"type":52,"value":14124},"    \"dist/**/*\"\n",{"type":41,"tag":298,"props":14126,"children":14127},{"class":300,"line":398},[14128],{"type":41,"tag":298,"props":14129,"children":14130},{"style":305},[14131],{"type":52,"value":1519},{"type":41,"tag":298,"props":14133,"children":14134},{"class":300,"line":411},[14135],{"type":41,"tag":298,"props":14136,"children":14137},{"style":305},[14138],{"type":52,"value":490},{"type":41,"tag":79,"props":14140,"children":14141},{},[],{"type":41,"tag":48,"props":14143,"children":14144},{},[14145],{"type":52,"value":1051},{"type":41,"tag":48,"props":14147,"children":14148},{},[14149],{"type":52,"value":1056},{"type":41,"tag":48,"props":14151,"children":14152},{},[14153],{"type":41,"tag":95,"props":14154,"children":14155},{},[14156],{"type":52,"value":1064},{"type":41,"tag":1066,"props":14158,"children":14159},{},[],{"type":41,"tag":79,"props":14161,"children":14162},{},[],{"type":41,"tag":83,"props":14164,"children":14166},{"id":14165},"how-to-integrate-stylelint-with-vs-code",[14167],{"type":52,"value":14168},"How to Integrate Stylelint With VS Code?",{"type":41,"tag":48,"props":14170,"children":14171},{},[14172,14174,14181,14183,14188],{"type":52,"value":14173},"Stylelint offers an ",{"type":41,"tag":55,"props":14175,"children":14178},{"href":14176,"rel":14177},"https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint",[59],[14179],{"type":52,"value":14180},"integration plugin for VS Code",{"type":52,"value":14182},", and setting it up is pretty easy. Simply install the plugin, and it should work seamlessly. ",{"type":41,"tag":95,"props":14184,"children":14185},{},[14186],{"type":52,"value":14187},"If you work with SCSS, you'll need to adjust the extension settings to include SCSS in the file types to check too.",{"type":52,"value":14189}," This is also applicable to other file types like Vue if you want to check SCSS within those files.",{"type":41,"tag":200,"props":14191,"children":14193},{":items":14192},"[\"https://cdn.pragmate.dev/wp-content/uploads/2024/04/48517392-ae0d-4fa9-9b77-2c5f74a3d2d7.png\",\"https://cdn.pragmate.dev/wp-content/uploads/2024/04/199365bb-2d32-4bfc-8ffb-891e39b4a560.png\"]",[],{"type":41,"tag":48,"props":14195,"children":14196},{},[14197,14199,14205,14207,14213],{"type":52,"value":14198},"Once installed, the plugin allows you to see problems in your code as you write. You can also fix these issues directly in VS Code by using the ",{"type":41,"tag":278,"props":14200,"children":14202},{"className":14201},[],[14203],{"type":52,"value":14204},"cmd+shift+p",{"type":52,"value":14206}," shortcut, typing ",{"type":41,"tag":278,"props":14208,"children":14210},{"className":14209},[],[14211],{"type":52,"value":14212},"fix",{"type":52,"value":14214}," and choosing Stylelint to fix the file. You can also modify the settings and enable file formatting every time you save a file. It happens in the background.",{"type":41,"tag":48,"props":14216,"children":14217},{},[14218],{"type":41,"tag":164,"props":14219,"children":14221},{"alt":166,"src":14220},"https://cdn.pragmate.dev/wp-content/uploads/2024/04/6f72bb04-0a60-41f3-ace4-32e187b0c8af.png",[],{"type":41,"tag":79,"props":14223,"children":14224},{},[],{"type":41,"tag":83,"props":14226,"children":14228},{"id":14227},"how-to-integrate-stylelint-with-prettier",[14229],{"type":52,"value":14230},"How to Integrate Stylelint with Prettier?",{"type":41,"tag":48,"props":14232,"children":14233},{},[14234,14236,14241,14243],{"type":52,"value":14235},"Until version 15, Stylelint managed stylistic rules, which Prettier also handled. This overlap meant that whichever tool was used last could overwrite changes made by the other. However, with the release of version 16, Stylelint ",{"type":41,"tag":55,"props":14237,"children":14239},{"href":1233,"rel":14238},[59],[14240],{"type":52,"value":1237},{"type":52,"value":14242}," and recommends Prettier for these tasks. Now, ",{"type":41,"tag":95,"props":14244,"children":14245},{},[14246],{"type":52,"value":14247},"Stylelint concentrates mostly on architectural concerns and lets Prettier handle stylistic rules.",{"type":41,"tag":149,"props":14249,"children":14251},{"id":14250},"why-im-worried-about-self-awareness",[14252],{"type":52,"value":14253},"Why I'm Worried About Self-Awareness?",{"type":41,"tag":48,"props":14255,"children":14256},{},[14257],{"type":52,"value":14258},"It sounds fine, but I have some doubts. Please check out the following code which breaks different rules like incorrect quotes in line 2 handled by Stylelint and incorrect indentation in the line 2,3 handled by Prettier.",{"type":41,"tag":287,"props":14260,"children":14264},{"className":14261,"code":14262,"language":14263,"meta":7,"style":7},"language-scss shiki shiki-themes one-dark-pro","@font-face {\n    font-family: 'Montserrat';\n    font-style: normal;\n  font-weight: 300;\n  font-display: swap;\n  src: url('../fonts/Montserrat-Light.woff2') format('woff2'),\n  url('../fonts/Montserrat-Light.woff') format('woff');\n}\n","scss",[14265],{"type":41,"tag":278,"props":14266,"children":14267},{"__ignoreMap":7},[14268,14280,14297,14314,14331,14348,14393,14431],{"type":41,"tag":298,"props":14269,"children":14270},{"class":300,"line":301},[14271,14276],{"type":41,"tag":298,"props":14272,"children":14273},{"style":3648},[14274],{"type":52,"value":14275},"@font-face",{"type":41,"tag":298,"props":14277,"children":14278},{"style":305},[14279],{"type":52,"value":4172},{"type":41,"tag":298,"props":14281,"children":14282},{"class":300,"line":311},[14283,14288,14293],{"type":41,"tag":298,"props":14284,"children":14285},{"style":305},[14286],{"type":52,"value":14287},"    font-family: ",{"type":41,"tag":298,"props":14289,"children":14290},{"style":330},[14291],{"type":52,"value":14292},"'Montserrat'",{"type":41,"tag":298,"props":14294,"children":14295},{"style":305},[14296],{"type":52,"value":4419},{"type":41,"tag":298,"props":14298,"children":14299},{"class":300,"line":326},[14300,14305,14310],{"type":41,"tag":298,"props":14301,"children":14302},{"style":305},[14303],{"type":52,"value":14304},"    font-style: ",{"type":41,"tag":298,"props":14306,"children":14307},{"style":1376},[14308],{"type":52,"value":14309},"normal",{"type":41,"tag":298,"props":14311,"children":14312},{"style":305},[14313],{"type":52,"value":4419},{"type":41,"tag":298,"props":14315,"children":14316},{"class":300,"line":341},[14317,14322,14327],{"type":41,"tag":298,"props":14318,"children":14319},{"style":305},[14320],{"type":52,"value":14321},"  font-weight: ",{"type":41,"tag":298,"props":14323,"children":14324},{"style":1376},[14325],{"type":52,"value":14326},"300",{"type":41,"tag":298,"props":14328,"children":14329},{"style":305},[14330],{"type":52,"value":4419},{"type":41,"tag":298,"props":14332,"children":14333},{"class":300,"line":354},[14334,14339,14344],{"type":41,"tag":298,"props":14335,"children":14336},{"style":305},[14337],{"type":52,"value":14338},"  font-display: ",{"type":41,"tag":298,"props":14340,"children":14341},{"style":1376},[14342],{"type":52,"value":14343},"swap",{"type":41,"tag":298,"props":14345,"children":14346},{"style":305},[14347],{"type":52,"value":4419},{"type":41,"tag":298,"props":14349,"children":14350},{"class":300,"line":367},[14351,14356,14361,14365,14370,14374,14379,14383,14388],{"type":41,"tag":298,"props":14352,"children":14353},{"style":305},[14354],{"type":52,"value":14355},"  src: ",{"type":41,"tag":298,"props":14357,"children":14358},{"style":713},[14359],{"type":52,"value":14360},"url",{"type":41,"tag":298,"props":14362,"children":14363},{"style":305},[14364],{"type":52,"value":1751},{"type":41,"tag":298,"props":14366,"children":14367},{"style":330},[14368],{"type":52,"value":14369},"'../fonts/Montserrat-Light.woff2'",{"type":41,"tag":298,"props":14371,"children":14372},{"style":305},[14373],{"type":52,"value":10863},{"type":41,"tag":298,"props":14375,"children":14376},{"style":713},[14377],{"type":52,"value":14378},"format",{"type":41,"tag":298,"props":14380,"children":14381},{"style":305},[14382],{"type":52,"value":1751},{"type":41,"tag":298,"props":14384,"children":14385},{"style":330},[14386],{"type":52,"value":14387},"'woff2'",{"type":41,"tag":298,"props":14389,"children":14390},{"style":305},[14391],{"type":52,"value":14392},"),\n",{"type":41,"tag":298,"props":14394,"children":14395},{"class":300,"line":380},[14396,14401,14405,14410,14414,14418,14422,14427],{"type":41,"tag":298,"props":14397,"children":14398},{"style":713},[14399],{"type":52,"value":14400},"  url",{"type":41,"tag":298,"props":14402,"children":14403},{"style":305},[14404],{"type":52,"value":1751},{"type":41,"tag":298,"props":14406,"children":14407},{"style":330},[14408],{"type":52,"value":14409},"'../fonts/Montserrat-Light.woff'",{"type":41,"tag":298,"props":14411,"children":14412},{"style":305},[14413],{"type":52,"value":10863},{"type":41,"tag":298,"props":14415,"children":14416},{"style":713},[14417],{"type":52,"value":14378},{"type":41,"tag":298,"props":14419,"children":14420},{"style":305},[14421],{"type":52,"value":1751},{"type":41,"tag":298,"props":14423,"children":14424},{"style":330},[14425],{"type":52,"value":14426},"'woff'",{"type":41,"tag":298,"props":14428,"children":14429},{"style":305},[14430],{"type":52,"value":1866},{"type":41,"tag":298,"props":14432,"children":14433},{"class":300,"line":389},[14434],{"type":41,"tag":298,"props":14435,"children":14436},{"style":305},[14437],{"type":52,"value":490},{"type":41,"tag":48,"props":14439,"children":14440},{},[14441],{"type":52,"value":14442},"When I run Stylelint checks, it works great and shows all the rules violations with exact references. When I run Prettier to check formatting, I get only the information about files which includes problems without any further references.",{"type":41,"tag":1725,"props":14444,"children":14446},{":tabs":14445},"[\"Stylelint\", \"Prettier\"]",[14447,14491],{"type":41,"tag":287,"props":14448,"children":14450},{"className":1996,"code":14449,"filename":180,"language":1998,"meta":7,"style":7},"yarn stylelint resources/**/*.scss\n\nresources/styles/styles.scss\n  2:18  ✖  Unexpected quotes around \"Montserrat\"                            font-family-name-quotes\n  4:3   ⚠  Expected \"font-weight\" to come before \"font-style\"               order/properties-order\n",[14451],{"type":41,"tag":278,"props":14452,"children":14453},{"__ignoreMap":7},[14454,14461,14468,14475,14483],{"type":41,"tag":298,"props":14455,"children":14456},{"class":300,"line":301},[14457],{"type":41,"tag":298,"props":14458,"children":14459},{"style":305},[14460],{"type":52,"value":13305},{"type":41,"tag":298,"props":14462,"children":14463},{"class":300,"line":311},[14464],{"type":41,"tag":298,"props":14465,"children":14466},{"emptyLinePlaceholder":36},[14467],{"type":52,"value":2018},{"type":41,"tag":298,"props":14469,"children":14470},{"class":300,"line":326},[14471],{"type":41,"tag":298,"props":14472,"children":14473},{"style":305},[14474],{"type":52,"value":13320},{"type":41,"tag":298,"props":14476,"children":14477},{"class":300,"line":341},[14478],{"type":41,"tag":298,"props":14479,"children":14480},{"style":305},[14481],{"type":52,"value":14482},"  2:18  ✖  Unexpected quotes around \"Montserrat\"                            font-family-name-quotes\n",{"type":41,"tag":298,"props":14484,"children":14485},{"class":300,"line":354},[14486],{"type":41,"tag":298,"props":14487,"children":14488},{"style":305},[14489],{"type":52,"value":14490},"  4:3   ⚠  Expected \"font-weight\" to come before \"font-style\"               order/properties-order\n",{"type":41,"tag":287,"props":14492,"children":14494},{"className":1996,"code":14493,"filename":62,"language":1998,"meta":7,"style":7},"yarn prettier . --check\n\nChecking formatting...\n[warn] .stylelintrc.json\n[warn] resources/styles/styles.scss\n[warn] Code style issues found in 2 files. Run Prettier to fix.\n",[14495],{"type":41,"tag":278,"props":14496,"children":14497},{"__ignoreMap":7},[14498,14505,14512,14519,14527,14535],{"type":41,"tag":298,"props":14499,"children":14500},{"class":300,"line":301},[14501],{"type":41,"tag":298,"props":14502,"children":14503},{"style":305},[14504],{"type":52,"value":2010},{"type":41,"tag":298,"props":14506,"children":14507},{"class":300,"line":311},[14508],{"type":41,"tag":298,"props":14509,"children":14510},{"emptyLinePlaceholder":36},[14511],{"type":52,"value":2018},{"type":41,"tag":298,"props":14513,"children":14514},{"class":300,"line":326},[14515],{"type":41,"tag":298,"props":14516,"children":14517},{"style":305},[14518],{"type":52,"value":2026},{"type":41,"tag":298,"props":14520,"children":14521},{"class":300,"line":341},[14522],{"type":41,"tag":298,"props":14523,"children":14524},{"style":305},[14525],{"type":52,"value":14526},"[warn] .stylelintrc.json\n",{"type":41,"tag":298,"props":14528,"children":14529},{"class":300,"line":354},[14530],{"type":41,"tag":298,"props":14531,"children":14532},{"style":305},[14533],{"type":52,"value":14534},"[warn] resources/styles/styles.scss\n",{"type":41,"tag":298,"props":14536,"children":14537},{"class":300,"line":367},[14538],{"type":41,"tag":298,"props":14539,"children":14540},{"style":305},[14541],{"type":52,"value":14542},"[warn] Code style issues found in 2 files. Run Prettier to fix.\n",{"type":41,"tag":48,"props":14544,"children":14545},{},[14546,14548,14553,14555],{"type":52,"value":14547},"I know, ",{"type":41,"tag":95,"props":14549,"children":14550},{},[14551],{"type":52,"value":14552},"Prettier was created to forget about problems.",{"type":52,"value":14554}," Automatic corrections, especially with features like \"format on save,\" are amazing, and improve the coding experience a lot, but they can also obscure learning opportunities. ",{"type":41,"tag":95,"props":14556,"children":14557},{},[14558],{"type":52,"value":14559},"For developers who thrive on detailed feedback to improve their coding practices, seeing each issue is beneficial.",{"type":41,"tag":48,"props":14561,"children":14562},{},[14563,14568],{"type":41,"tag":95,"props":14564,"children":14565},{},[14566],{"type":52,"value":14567},"Also, without CI/CD processes or integrating tools like Husky, developers must remember to format the code before pushing.",{"type":52,"value":14569}," This reliance on memory is a potential source of the problems. I don't like this and that's why I prefer seeing problems immediately as I write - I can't just say \"Oh, I forgot.\"",{"type":41,"tag":48,"props":14571,"children":14572},{},[14573],{"type":41,"tag":95,"props":14574,"children":14575},{},[14576],{"type":52,"value":14577},"So while Prettier is an excellent tool, it truly shines only in the right hands.",{"type":41,"tag":149,"props":14579,"children":14581},{"id":14580},"is-there-any-alternative",[14582],{"type":52,"value":14583},"Is There Any Alternative?",{"type":41,"tag":48,"props":14585,"children":14586},{},[14587,14589,14595],{"type":52,"value":14588},"It might seem that with Stylelint's decision to remove stylistic rules, you'd be left without those capabilities unless you switch to using Prettier. However, that isn't the case. A ",{"type":41,"tag":55,"props":14590,"children":14592},{"href":1242,"rel":14591},[59],[14593],{"type":52,"value":14594},"community-driven plugin",{"type":52,"value":14596}," has brought these deprecated rules back.",{"type":41,"tag":1725,"props":14598,"children":14599},{":tabs":13188},[14600,14632],{"type":41,"tag":287,"props":14601,"children":14603},{"className":1921,"code":14602,"filename":13193,"language":1923,"meta":7,"style":7},"npm install @stylistic/stylelint-plugin @stylistic/stylelint-config --save-dev\n",[14604],{"type":41,"tag":278,"props":14605,"children":14606},{"__ignoreMap":7},[14607],{"type":41,"tag":298,"props":14608,"children":14609},{"class":300,"line":301},[14610,14614,14618,14623,14628],{"type":41,"tag":298,"props":14611,"children":14612},{"style":737},[14613],{"type":52,"value":10574},{"type":41,"tag":298,"props":14615,"children":14616},{"style":330},[14617],{"type":52,"value":13209},{"type":41,"tag":298,"props":14619,"children":14620},{"style":330},[14621],{"type":52,"value":14622}," @stylistic/stylelint-plugin",{"type":41,"tag":298,"props":14624,"children":14625},{"style":330},[14626],{"type":52,"value":14627}," @stylistic/stylelint-config",{"type":41,"tag":298,"props":14629,"children":14630},{"style":1376},[14631],{"type":52,"value":13219},{"type":41,"tag":287,"props":14633,"children":14635},{"className":289,"code":14634,"filename":13128,"language":292,"meta":7,"style":7},"{\n  \"extends\": [\n    \"@stylistic/stylelint-config\",\n    \"stylelint-config-standard-scss\",\n    \"stylelint-config-clean-order\"\n  ],\n  \"ignoreFiles\": [\n    \"node_modules\",\n    \"dist/**/*\"\n  ],\n  \"rules\": {\n    \"@stylistic/string-quotes\": \"single\"\n  }\n}\n",[14636],{"type":41,"tag":278,"props":14637,"children":14638},{"__ignoreMap":7},[14639,14646,14657,14669,14680,14687,14694,14705,14716,14723,14730,14741,14758,14765],{"type":41,"tag":298,"props":14640,"children":14641},{"class":300,"line":301},[14642],{"type":41,"tag":298,"props":14643,"children":14644},{"style":305},[14645],{"type":52,"value":308},{"type":41,"tag":298,"props":14647,"children":14648},{"class":300,"line":311},[14649,14653],{"type":41,"tag":298,"props":14650,"children":14651},{"style":315},[14652],{"type":52,"value":12711},{"type":41,"tag":298,"props":14654,"children":14655},{"style":305},[14656],{"type":52,"value":323},{"type":41,"tag":298,"props":14658,"children":14659},{"class":300,"line":326},[14660,14665],{"type":41,"tag":298,"props":14661,"children":14662},{"style":330},[14663],{"type":52,"value":14664},"    \"@stylistic/stylelint-config\"",{"type":41,"tag":298,"props":14666,"children":14667},{"style":305},[14668],{"type":52,"value":338},{"type":41,"tag":298,"props":14670,"children":14671},{"class":300,"line":341},[14672,14676],{"type":41,"tag":298,"props":14673,"children":14674},{"style":330},[14675],{"type":52,"value":13702},{"type":41,"tag":298,"props":14677,"children":14678},{"style":305},[14679],{"type":52,"value":338},{"type":41,"tag":298,"props":14681,"children":14682},{"class":300,"line":354},[14683],{"type":41,"tag":298,"props":14684,"children":14685},{"style":330},[14686],{"type":52,"value":13714},{"type":41,"tag":298,"props":14688,"children":14689},{"class":300,"line":367},[14690],{"type":41,"tag":298,"props":14691,"children":14692},{"style":305},[14693],{"type":52,"value":395},{"type":41,"tag":298,"props":14695,"children":14696},{"class":300,"line":380},[14697,14701],{"type":41,"tag":298,"props":14698,"children":14699},{"style":315},[14700],{"type":52,"value":14100},{"type":41,"tag":298,"props":14702,"children":14703},{"style":305},[14704],{"type":52,"value":323},{"type":41,"tag":298,"props":14706,"children":14707},{"class":300,"line":389},[14708,14712],{"type":41,"tag":298,"props":14709,"children":14710},{"style":330},[14711],{"type":52,"value":14112},{"type":41,"tag":298,"props":14713,"children":14714},{"style":305},[14715],{"type":52,"value":338},{"type":41,"tag":298,"props":14717,"children":14718},{"class":300,"line":398},[14719],{"type":41,"tag":298,"props":14720,"children":14721},{"style":330},[14722],{"type":52,"value":14124},{"type":41,"tag":298,"props":14724,"children":14725},{"class":300,"line":411},[14726],{"type":41,"tag":298,"props":14727,"children":14728},{"style":305},[14729],{"type":52,"value":395},{"type":41,"tag":298,"props":14731,"children":14732},{"class":300,"line":424},[14733,14737],{"type":41,"tag":298,"props":14734,"children":14735},{"style":315},[14736],{"type":52,"value":12741},{"type":41,"tag":298,"props":14738,"children":14739},{"style":305},[14740],{"type":52,"value":1478},{"type":41,"tag":298,"props":14742,"children":14743},{"class":300,"line":433},[14744,14749,14753],{"type":41,"tag":298,"props":14745,"children":14746},{"style":315},[14747],{"type":52,"value":14748},"    \"@stylistic/string-quotes\"",{"type":41,"tag":298,"props":14750,"children":14751},{"style":305},[14752],{"type":52,"value":1373},{"type":41,"tag":298,"props":14754,"children":14755},{"style":330},[14756],{"type":52,"value":14757},"\"single\"\n",{"type":41,"tag":298,"props":14759,"children":14760},{"class":300,"line":441},[14761],{"type":41,"tag":298,"props":14762,"children":14763},{"style":305},[14764],{"type":52,"value":3165},{"type":41,"tag":298,"props":14766,"children":14767},{"class":300,"line":454},[14768],{"type":41,"tag":298,"props":14769,"children":14770},{"style":305},[14771],{"type":52,"value":490},{"type":41,"tag":48,"props":14773,"children":14774},{},[14775],{"type":52,"value":14776},"After installing the additional plugin, stylistic issues such as breaking indentation rules are also displayed in the reports. This visibility ensures that developers can no longer claim they didn't notice these problems.",{"type":41,"tag":287,"props":14778,"children":14780},{"className":1996,"code":14779,"language":1998,"meta":7,"style":7},"yarn stylelint resources/**/*.scss\n\nresources/styles/styles.scss\n   2:5   ✖  Expected indentation of 2 spaces                                 @stylistic/indentation\n   2:18  ✖  Expected double quotes                                           @stylistic/string-quotes\n   2:18  ✖  Unexpected quotes around \"Montserrat\"                            font-family-name-quotes\n   3:5   ✖  Expected indentation of 2 spaces                                 @stylistic/indentation\n   4:3   ⚠  Expected \"font-weight\" to come before \"font-style\"               order/properties-order\n   6:6   ✖  Expected newline after \":\" with a multi-line declaration         @stylistic/declaration-colon-newline-after\n   6:12  ✖  Expected double quotes                                           @stylistic/string-quotes\n   6:54  ✖  Expected double quotes                                           @stylistic/string-quotes\n   7:3   ✖  Expected indentation of 4 spaces                                 @stylistic/indentation\n   7:7   ✖  Expected double quotes                                           @stylistic/string-quotes\n   7:48  ✖  Expected double quotes                                           @stylistic/string-quotes\n",[14781],{"type":41,"tag":278,"props":14782,"children":14783},{"__ignoreMap":7},[14784,14791,14798,14805,14813,14821,14829,14837,14845,14853,14861,14869,14877,14885],{"type":41,"tag":298,"props":14785,"children":14786},{"class":300,"line":301},[14787],{"type":41,"tag":298,"props":14788,"children":14789},{"style":305},[14790],{"type":52,"value":13305},{"type":41,"tag":298,"props":14792,"children":14793},{"class":300,"line":311},[14794],{"type":41,"tag":298,"props":14795,"children":14796},{"emptyLinePlaceholder":36},[14797],{"type":52,"value":2018},{"type":41,"tag":298,"props":14799,"children":14800},{"class":300,"line":326},[14801],{"type":41,"tag":298,"props":14802,"children":14803},{"style":305},[14804],{"type":52,"value":13320},{"type":41,"tag":298,"props":14806,"children":14807},{"class":300,"line":341},[14808],{"type":41,"tag":298,"props":14809,"children":14810},{"style":305},[14811],{"type":52,"value":14812},"   2:5   ✖  Expected indentation of 2 spaces                                 @stylistic/indentation\n",{"type":41,"tag":298,"props":14814,"children":14815},{"class":300,"line":354},[14816],{"type":41,"tag":298,"props":14817,"children":14818},{"style":305},[14819],{"type":52,"value":14820},"   2:18  ✖  Expected double quotes                                           @stylistic/string-quotes\n",{"type":41,"tag":298,"props":14822,"children":14823},{"class":300,"line":367},[14824],{"type":41,"tag":298,"props":14825,"children":14826},{"style":305},[14827],{"type":52,"value":14828},"   2:18  ✖  Unexpected quotes around \"Montserrat\"                            font-family-name-quotes\n",{"type":41,"tag":298,"props":14830,"children":14831},{"class":300,"line":380},[14832],{"type":41,"tag":298,"props":14833,"children":14834},{"style":305},[14835],{"type":52,"value":14836},"   3:5   ✖  Expected indentation of 2 spaces                                 @stylistic/indentation\n",{"type":41,"tag":298,"props":14838,"children":14839},{"class":300,"line":389},[14840],{"type":41,"tag":298,"props":14841,"children":14842},{"style":305},[14843],{"type":52,"value":14844},"   4:3   ⚠  Expected \"font-weight\" to come before \"font-style\"               order/properties-order\n",{"type":41,"tag":298,"props":14846,"children":14847},{"class":300,"line":398},[14848],{"type":41,"tag":298,"props":14849,"children":14850},{"style":305},[14851],{"type":52,"value":14852},"   6:6   ✖  Expected newline after \":\" with a multi-line declaration         @stylistic/declaration-colon-newline-after\n",{"type":41,"tag":298,"props":14854,"children":14855},{"class":300,"line":411},[14856],{"type":41,"tag":298,"props":14857,"children":14858},{"style":305},[14859],{"type":52,"value":14860},"   6:12  ✖  Expected double quotes                                           @stylistic/string-quotes\n",{"type":41,"tag":298,"props":14862,"children":14863},{"class":300,"line":424},[14864],{"type":41,"tag":298,"props":14865,"children":14866},{"style":305},[14867],{"type":52,"value":14868},"   6:54  ✖  Expected double quotes                                           @stylistic/string-quotes\n",{"type":41,"tag":298,"props":14870,"children":14871},{"class":300,"line":433},[14872],{"type":41,"tag":298,"props":14873,"children":14874},{"style":305},[14875],{"type":52,"value":14876},"   7:3   ✖  Expected indentation of 4 spaces                                 @stylistic/indentation\n",{"type":41,"tag":298,"props":14878,"children":14879},{"class":300,"line":441},[14880],{"type":41,"tag":298,"props":14881,"children":14882},{"style":305},[14883],{"type":52,"value":14884},"   7:7   ✖  Expected double quotes                                           @stylistic/string-quotes\n",{"type":41,"tag":298,"props":14886,"children":14887},{"class":300,"line":454},[14888],{"type":41,"tag":298,"props":14889,"children":14890},{"style":305},[14891],{"type":52,"value":14892},"   7:48  ✖  Expected double quotes                                           @stylistic/string-quotes\n",{"type":41,"tag":48,"props":14894,"children":14895},{},[14896,14898,14905,14907,14913,14915,14920],{"type":52,"value":14897},"In this approach, I want to ",{"type":41,"tag":55,"props":14899,"children":14902},{"href":14900,"rel":14901},"https://github.com/stylelint-stylistic/stylelint-config/tree/1cf0dc407cce1c7da4a157996d9c5e8b0a1646b7?tab=readme-ov-file#rule-overrides",[59],[14903],{"type":52,"value":14904},"tweak",{"type":52,"value":14906}," the ",{"type":41,"tag":55,"props":14908,"children":14911},{"href":14909,"rel":14910},"https://github.com/stylelint-stylistic/stylelint-config/blob/1cf0dc407cce1c7da4a157996d9c5e8b0a1646b7/.stylelintrc.json",[59],[14912],{"type":52,"value":13659},{"type":52,"value":14914}," slightly, as I prefer using single quotes. Consequently, I need to update the ",{"type":41,"tag":278,"props":14916,"children":14918},{"className":14917},[],[14919],{"type":52,"value":1344},{"type":52,"value":14921}," file to exclude CSS files from its checks.",{"type":41,"tag":287,"props":14923,"children":14925},{"className":1996,"code":14924,"language":1998,"meta":7,"style":7},"*.lock\n*-lock.json\n**/*.scss\n",[14926],{"type":41,"tag":278,"props":14927,"children":14928},{"__ignoreMap":7},[14929,14936,14943],{"type":41,"tag":298,"props":14930,"children":14931},{"class":300,"line":301},[14932],{"type":41,"tag":298,"props":14933,"children":14934},{"style":305},[14935],{"type":52,"value":3494},{"type":41,"tag":298,"props":14937,"children":14938},{"class":300,"line":311},[14939],{"type":41,"tag":298,"props":14940,"children":14941},{"style":305},[14942],{"type":52,"value":3502},{"type":41,"tag":298,"props":14944,"children":14945},{"class":300,"line":326},[14946],{"type":41,"tag":298,"props":14947,"children":14948},{"style":305},[14949],{"type":52,"value":14950},"**/*.scss\n",{"type":41,"tag":149,"props":14952,"children":14954},{"id":14953},"what-approach-do-i-use",[14955],{"type":52,"value":14956},"What Approach do I Use?",{"type":41,"tag":48,"props":14958,"children":14959},{},[14960,14962,14968],{"type":52,"value":14961},"In a previous ",{"type":41,"tag":55,"props":14963,"children":14965},{"href":57,"rel":14964},[59],[14966],{"type":52,"value":14967},"video about Prettier",{"type":52,"value":14969},", I mentioned that I wouldn't use Prettier for managing stylistic rules in CSS code, believing that it was the right approach at the time. However, my perspective has since shifted.",{"type":41,"tag":48,"props":14971,"children":14972},{},[14973],{"type":52,"value":14974},"I had concerns about developers losing awareness or forgetting about the formatting process, but It might not be a huge problem when integrating tools like Husky or setting up CI/CD processes, which I plan to implement soon. Therefore, I now use Stylelint to handle CSS architectural concerns and let Prettier take care of the formatting.",{"type":41,"tag":79,"props":14976,"children":14977},{},[],{"type":41,"tag":48,"props":14979,"children":14980},{},[14981,14982,14987,14988,14994,14995,15000],{"type":52,"value":1598},{"type":41,"tag":55,"props":14983,"children":14985},{"href":1601,"rel":14984},[59],[14986],{"type":52,"value":1605},{"type":52,"value":3874},{"type":41,"tag":55,"props":14989,"children":14992},{"href":14990,"rel":14991},"https://www.youtube.com/watch?v=_cDvBp-C7oY",[59],[14993],{"type":52,"value":3914},{"type":52,"value":3916},{"type":41,"tag":55,"props":14996,"children":14998},{"href":1610,"rel":14997},[59],[14999],{"type":52,"value":1614},{"type":52,"value":1616},{"type":41,"tag":1618,"props":15002,"children":15003},{},[15004],{"type":52,"value":1622},{"title":7,"searchDepth":311,"depth":311,"links":15006},[15007,15008,15009,15010,15011,15012],{"id":13051,"depth":311,"text":13054},{"id":13266,"depth":311,"text":13269},{"id":13615,"depth":311,"text":13618},{"id":13906,"depth":311,"text":13909},{"id":14165,"depth":311,"text":14168},{"id":14227,"depth":311,"text":14230,"children":15013},[15014,15015,15016],{"id":14250,"depth":326,"text":14253},{"id":14580,"depth":326,"text":14583},{"id":14953,"depth":326,"text":14956},"content:css:stylelint.md","css/stylelint.md","css/stylelint",1784278045581]