{"_id":"@eladavron/eslint-plugin-jinja","_rev":"2-eb679f5185e0a2b4eb7b141c924d9c3a","name":"@eladavron/eslint-plugin-jinja","dist-tags":{"latest":"0.3.1"},"versions":{"0.3.0":{"name":"@eladavron/eslint-plugin-jinja","version":"0.3.0","description":"This plugin treats Jinja template expressions as Javascript literals and ignores template statements and comments. It is a fork and update of the original eslint-plugin-jinja package by alexkuz.","main":"lib/index.js","scripts":{"test":"npm test","build":"babel src --out-dir lib","watch":"watch 'npm run build' ./src","version":"npm run build && git add -A .","postversion":"git push","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/eladavron/eslint-plugin-jinja.git"},"keywords":["eslint","eslintplugin","jinja","jinja2","template"],"author":{"name":"Elad Avron","email":"eladavron@gmail.com"},"maintainers":[{"name":"eladavron","email":"eladavron@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/eladavron/eslint-plugin-jinja/issues"},"homepage":"https://github.com/eladavron/eslint-plugin-jinja#readme","devDependencies":{"@babel/cli":"^7.16.7","@babel/core":"^7.16.7","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.7","@babel/preset-env":"^7.16.7","eslint":"^8.6.0","glob":"^7.2.0","watch":"^1.0.2"},"peerDependencies":{"eslint":"^8.0.0"},"gitHead":"9861209e7ba643b80a4bbf7e2579d9242f7c3486","_id":"@eladavron/eslint-plugin-jinja@0.3.0","_nodeVersion":"17.3.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-jB2IiwzpD3EtMBem2kR1b024u2H6STgGbTl+O9VIDPxtTk3neWFxx11pp27hvihyhNHUI2t29cj4SfdfK4mv0g==","shasum":"64bd14b99b4675a6a8c1838c35d2c766b9992063","tarball":"https://registry.npmjs.org/@eladavron/eslint-plugin-jinja/-/eslint-plugin-jinja-0.3.0.tgz","fileCount":4,"unpackedSize":6084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3rhQCRA9TVsSAnZWagAAgTsP/igq42SNhDwmvvZRo0av\n6HtXUqi815eY/MmGumFwypEMoNP2jllTKGVane1NvxXchJNGWmfCejmKu8CM\nYsqSa1+05iid4zxILr0nlIYKYK4JKF2hdWeoGeL0oUWJFvX3IETa4XUczE9C\n6kpLZesw4rETYz5OF7mYFuwoOpZr1HqpD4OLZ+2QWUXzfr1pSmy38ejmUM0N\nMqm6tgFKd4nqnP6kIgTn4F3d1/qDD6+T5P8jsmtxXosc4PoJOAIa3xU2+hCK\nbQzdls9y6YoXBrAMG9JIA70dkVlXE9rTAMqWfaW2xE5CBx4zWrHyqOYzTpz1\ndYAApKPz8ILruJgubAHtMjIl9ybZx+qhmp6AcrxrZIRAXGnyIU2JA6HLitFV\ntESpWCO1KZtjvP0Xwb6L0Flu5dqzMJ87DWkXW9Fzjxz53d9F52/oOE3e+nIR\nbWkbaj7e2q8rfpKPS139PL0yZ37YNuVTh+5yk6IY/V95Ctnf1B1G6Q52N6lD\n6zhqGV6maIXsUJZ4WRdse1t91y9khmhfo/Qzpzp1xb8RJG4fMNmQPKJ1oMDu\nqqXrR+RaEYjIT7TSK+0mONuQ0530oZ36AYYe9LyGy+VJ5jK+uKJseMWmbk6/\n6wT2rMyOPHavQ5O99c44OABmjhJiRk33JGpBOgd30txS6awC7VZ587VzEShW\n/hQD\r\n=P68t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBiQnBQeK4iR8AOGf/Hv7nhDRsicnBbEXHpWCjv1rWdXAiEAoC9shKQwHf6yN6egiZpSZ7dC4f9PIVN4t8V8JTYo0hY="}]},"_npmUser":{"name":"eladavron","email":"eladavron@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-jinja_0.3.0_1641986128740_0.09388847406366319"},"_hasShrinkwrap":false},"0.3.1":{"name":"@eladavron/eslint-plugin-jinja","version":"0.3.1","description":"This plugin treats Jinja template expressions as Javascript literals and ignores template statements and comments. It is a fork and update of the original eslint-plugin-jinja package by alexkuz.","main":"lib/index.js","scripts":{"test":"npm test","build":"babel src --out-dir lib","watch":"watch 'npm run build' ./src","version":"npm run build && git add -A .","postversion":"git push","prepublish":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/eladavron/eslint-plugin-jinja.git"},"keywords":["eslint","eslintplugin","jinja","jinja2","template"],"author":{"name":"Alexander","email":"alexkuz@gmail.com","url":"http://kuzya.org/"},"contributors":[{"name":"Elad Avron","email":"eladavron@gmail.com"}],"license":"MIT","bugs":{"url":"https://github.com/eladavron/eslint-plugin-jinja/issues"},"homepage":"https://github.com/eladavron/eslint-plugin-jinja#readme","devDependencies":{"@babel/cli":"^7.16.7","@babel/core":"^7.16.7","@babel/eslint-parser":"^7.16.5","@babel/plugin-transform-runtime":"^7.16.7","@babel/preset-env":"^7.16.7","eslint":"^8.6.0","glob":"^7.2.0","watch":"^1.0.2"},"peerDependencies":{"eslint":"^8.0.0"},"gitHead":"9861209e7ba643b80a4bbf7e2579d9242f7c3486","_id":"@eladavron/eslint-plugin-jinja@0.3.1","_nodeVersion":"17.3.1","_npmVersion":"8.3.0","dist":{"integrity":"sha512-tJ/AD/uBxH6fu4pwPxQSRb6uY5lIPJjl+TYzhMbOG96+fIBzxsz8tVcMam3oxoyVLEz6SsGnLGbbbGFPgw5n+A==","shasum":"3e14fcabe60739ad4f309da0e2d1b1ac45d5c8c3","tarball":"https://registry.npmjs.org/@eladavron/eslint-plugin-jinja/-/eslint-plugin-jinja-0.3.1.tgz","fileCount":4,"unpackedSize":6013,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3zVbCRA9TVsSAnZWagAA45oP/2IgrcKsHdYEjEfxmaZQ\nFxaT48iBhbbQokHIsp++9eDQGZZ+Tu51NWc0GsIOLpnRlmXtLfB7wIk8eowp\ng6NchjoW4AbXA7r5PgbFgGHijfBZ3LPFUstvQl1ibF94JT0kjBuD/KB4kZs3\noSflwKSdyUuDelMleEqyKA69uw+hyrD8hPjV7RoM9p3I1E/5BCxV3t9/+7if\nWSeGN6hQvmpp+LmG+ejP6TsPRpPusTSUpIoQEHOwEOmqOGJkcT18bsZtLhNJ\nnZh0fhgV6MgKN2uKBgcnlj7BqtpstVLLkJ/QviL3nEpIpTo7Xhl1zP0MX/Ip\nBP82tZnZBIrwqdb/PX7xwGobfnxPWtAWUT1B0ZrOakCJqxtZq9krzW3PcZuT\n+dDpLCbWRWcJzpGh4QnGnE/i8ZdfZ1TRdv5cltH0jYuDaxz1G80qFqrFIR75\n+yMtNGPQaCZ1pJV/UoIE1FLSb7zdVNXFRtRkqtC4uRky2G+LM/3pU97kaEUk\na9RkFA2hiK3Eok7DX/QiKjFueagzZdBq5SgPJCujuFrQAjR8P5RMErX9f59Y\nItFy27te6lL4gtcdKC5o9UCYlLFg5/c67yLu5Q00nqyqNN8j5/9N+F7DvPQE\ng3Uk3hjqEvOWvNr7ZiNaGqI7OkIKL1IwxHFcYFdaOCh50EVPAE+SVcY1/3wI\n9CBP\r\n=bu6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGhF3vPuBeNuJREw4HTFZ4j+Iqj9iEOuYGLlFSTuWP/UAiEAo+N3URvRPwa5KLpZbOQuhvz2Ll+9cwPVWUNHt6uY4P4="}]},"_npmUser":{"name":"eladavron","email":"eladavron@gmail.com"},"directories":{},"maintainers":[{"name":"eladavron","email":"eladavron@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-jinja_0.3.1_1642018139082_0.6015231857941756"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-12T11:15:28.669Z","0.3.0":"2022-01-12T11:15:28.866Z","modified":"2022-04-05T07:03:24.850Z","0.3.1":"2022-01-12T20:08:59.374Z"},"maintainers":[{"name":"eladavron","email":"eladavron@gmail.com"}],"description":"This plugin treats Jinja template expressions as Javascript literals and ignores template statements and comments. It is a fork and update of the original eslint-plugin-jinja package by alexkuz.","homepage":"https://github.com/eladavron/eslint-plugin-jinja#readme","keywords":["eslint","eslintplugin","jinja","jinja2","template"],"repository":{"type":"git","url":"git+https://github.com/eladavron/eslint-plugin-jinja.git"},"author":{"name":"Alexander","email":"alexkuz@gmail.com","url":"http://kuzya.org/"},"bugs":{"url":"https://github.com/eladavron/eslint-plugin-jinja/issues"},"license":"MIT","readme":"[![npm version](https://img.shields.io/npm/v/eslint-plugin-jinja.svg?style=flat)](https://www.npmjs.com/package/eslint-plugin-jinja)\n\n# eslint-plugin-jinja\nThis plugin treats Jinja template expressions and statements as valid Javascript expressions, so that ESLint can check javascript code, ignoring any Jinja expression found.\n\nAs a note, it is possible that this best effort conversion yeilds false negatives or positives because it is impossible to know the right way to insert placeholders.\n\nAlso - some complex inline expressions might break and you might have to expand them.\n\n### Example\n\nPlugin will convert (internally) this code:\n\n```js\n  (function() {\n    'use strict';\n\n    {# plain jinja variables are converted into strings\n      (preferred quotes are getting from .eslintrc file) #}\n\n    var a = 'this is' + {{ some_variable }};\n\n    {# if it is already in string, it is wrapped with spaces #}\n\n    var b = 'this is {{ other_variable }}';\n    var c = 'and this is {{ another_one['field']}}';\n\n    {# if-else statements are converted into ( ..., ... ) expression #}\n\n    var d = {% if something %} 'this is something' {% else %} null {% endif %};\n\n    {# any other statements become comments #}\n\n    {% for i in [1, 2, 3] %}\n      console.log(a, b, c, d);\n    {% endfor %}\n  })();\n```\ninto this:\n```js\n (function() {\n    'use strict';\n\n    /* plain jinja variables are converted into zeroed out regex patterns\n      to avoid having to guess preferred quotes */\n    var a = 'this is' + /00000000000/;\n\n    /* if it is already in string, it is wrapped with spaces */\n\n    var b = 'this is    other_variable   ';\n    var c = 'and this is    another_one[ field ]  ';\n\n    /* if-else statements are converted into ( ..., ... ) expression */\n\n    var d = (/*if something */ 'this is something' ,/*else */ null /*endif */);\n\n    /* any other statements become comments */\n\n    /* for i in [1, 2, 3] */\n      console.log(a, b, c, d);\n    /* endfor */\n  })();\n```\n","readmeFilename":"README.md","contributors":[{"name":"Elad Avron","email":"eladavron@gmail.com"}]}