New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[qa] Added linting of JS and CSS #173 #202
Changes from 9 commits
3439473
6f4aed0
5a05b8c
4e5700d
2053e42
a4f9322
f44f3c2
b2ea06d
bd62a02
95833ae
005b4d1
eb489f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"unused": true, | ||
"esversion": 6, | ||
"curly": true, | ||
"strict": "global", | ||
"globals": { | ||
"django": true, | ||
"gettext": true, | ||
"ReconnectingWebSocket": true, | ||
"notificationApiHost": true, | ||
"notificationSound": true, | ||
"notificationSocket": true, | ||
"owNotifyObjectId": true, | ||
"owNotifyAppLabel": true, | ||
"owNotifyModelName": true, | ||
"owIsChangeForm": true, | ||
"getAbsoluteUrl": true, | ||
"dateTimeStampToDateTimeLocaleString": true | ||
}, | ||
"browser": true | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"rules": { | ||
"block-no-empty": null, | ||
"color-no-invalid-hex": true, | ||
"comment-empty-line-before": ["always", { | ||
"ignore": ["stylelint-commands", "after-comment"] | ||
}], | ||
"declaration-colon-space-after": "always", | ||
"indentation": [2, { | ||
"except": ["value"] | ||
}], | ||
"max-empty-lines": 4, | ||
"rule-empty-line-before": ["never-multi-line", { | ||
"except": ["first-nested"], | ||
"ignore": ["after-comment", "inside-block"] | ||
}], | ||
"unit-allowed-list": ["em", "rem", "%", "s", "px", "vh", "deg"], | ||
"declaration-block-trailing-semicolon": "always", | ||
"property-no-unknown": true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if which stylelint > /dev/null | ||
then | ||
stylelint $(find . -type f -name "*.css") --fix | ||
else | ||
echo "MODULE NOT FOUND: Please install stylelint" | ||
exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. once more time, I think this is wrong. Didn't we agree this feature must be backward compatible? So why fail if |
||
fi | ||
isort . | ||
black -S . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shell script to automatically format Python code. It runs
isort
.black
andstylelint
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its better.
Shell script to automatically format Python and CSS code. It runs
isort
.black
andstylelint
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention that the command won't fail if
stylelint
is not installed but will skip instead.