Changeset - 4d36432bf705
default
0
1
1
eslint: install eslint with front-end so it can be run manually
eslint can be run manually on the main .js files with:
./node_modules/.bin/eslint kallithea/public/js/base.js kallithea/public/js/codemirror_loadmode.js kallithea/public/js/graph.js
- but it is quite noisy. Some problems do however stand out as relevant to fix.
Script sections in HTML files can also be checked after removing mako markup:
hg up -cr.
sed -i -e 's/\${[^{}]*\({[^{}]*}[^{}]*\)*}/""/g' -e 's/%\(if\|else\|endif\|for\|endfor\)\>.*//g' -e 's/##.*//g' $(hg loc 'kallithea/templates/**.html')
vim kallithea/templates/pullrequests/pullrequest.html +139 # blank out the multi line 'var url = ${}'
./node_modules/.bin/eslint $(hg loc 'kallithea/templates/**.html')
hg up -Cr.
- but that is even more noisy.
The noise is mainly due to eslint not knowing that everything runs together,
with kallithea/templates/base/root.html defining global variables,
kallithea/public/js/base.js using these and defining functions, which then is
used "everywhere". There might be solutions to that - this is a starting point.
eslint can be run manually on the main .js files with:
./node_modules/.bin/eslint kallithea/public/js/base.js kallithea/public/js/codemirror_loadmode.js kallithea/public/js/graph.js
- but it is quite noisy. Some problems do however stand out as relevant to fix.
Script sections in HTML files can also be checked after removing mako markup:
hg up -cr.
sed -i -e 's/\${[^{}]*\({[^{}]*}[^{}]*\)*}/""/g' -e 's/%\(if\|else\|endif\|for\|endfor\)\>.*//g' -e 's/##.*//g' $(hg loc 'kallithea/templates/**.html')
vim kallithea/templates/pullrequests/pullrequest.html +139 # blank out the multi line 'var url = ${}'
./node_modules/.bin/eslint $(hg loc 'kallithea/templates/**.html')
hg up -Cr.
- but that is even more noisy.
The noise is mainly due to eslint not knowing that everything runs together,
with kallithea/templates/base/root.html defining global variables,
kallithea/public/js/base.js using these and defining functions, which then is
used "everywhere". There might be solutions to that - this is a starting point.
2 files changed with 22 insertions and 0 deletions:
0 comments (0 inline, 0 general)
0 comments (0 inline, 0 general)