Skip to content

Commit

Permalink
Added info on workflows
Browse files Browse the repository at this point in the history
Updates on github-actions
  • Loading branch information
AlexRogalskiy committed Aug 12, 2021
1 parent 32ec90b commit 2d5466e
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ docs/
plopfile.js
jest.config.js
commitlint.config.js
stylelint-local-rules.js
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ coverage
dist
data
docs

stylelint-local-rules.js
54 changes: 51 additions & 3 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"extends": ["stylelint-config-standard", "stylelint-config-prettier", "stylelint-config-recommended"],
"plugins": ["stylelint-order", "stylelint-scss", "stylelint-prettier", "stylelint-selector-bem-pattern"],
"plugins": [
"stylelint-order",
"stylelint-scss",
"stylelint-prettier",
"stylelint-selector-bem-pattern",
"./stylelint-local-rules.js"
],
"rules": {
"indentation": 4,
"selector-max-id": null,
"selector-no-vendor-prefix": null,
"shorthand-property-no-redundant-values": true,
"okta/no-absolute-urls": true,
"no-invalid-position-at-import-rule": null,
"scss/at-rule-no-unknown": true,
"prettier/prettier": true,
Expand All @@ -23,11 +33,20 @@
"max-empty-lines": null,
"no-duplicate-selectors": null,
"selector-pseudo-element-colon-notation": null,
"selector-class-pattern": null,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": ["consecutive-duplicates-with-different-values"]
}
],
"selector-class-pattern": "[-a-z0-9]",
"selector-id-pattern": "[-a-z0-9]",
"selector-no-qualifying-type": [
true,
{
"ignore": ["attribute", "class"]
"ignore": ["attribute", "class", "id"]
}
],
"plugin/selector-bem-pattern": {
Expand All @@ -53,6 +72,35 @@
"for"
]
}
],
"unit-allowed-list": [
"ch",
"em",
"ex",
"rem",
"cm",
"in",
"mm",
"pc",
"pt",
"px",
"q",
"vh",
"vw",
"vmin",
"vmax",
"deg",
"grad",
"rad",
"turn",
"ms",
"s",
"Hz",
"kHz",
"dpi",
"dpcm",
"dppx",
"%"
]
}
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 0.0.2 (2021-07-23)
## 0.0.2 (2021-08-12)


### Features
Expand Down
4 changes: 2 additions & 2 deletions api/caillen/images/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body a {
.title {
position: absolute;
width: 100%;
margin: 10px 0 0 0;
margin: 10px 0 0;
text-align: center;
}

Expand All @@ -36,7 +36,7 @@ body a {
width: 100%;
text-align: center;
bottom: 0;
margin: 0 0 10px 0;
margin: 0 0 10px;
}

.div-icons {
Expand Down
32 changes: 32 additions & 0 deletions stylelint-local-rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const stylelint = require('stylelint')
const { report, ruleMessages, validateOptions } = stylelint.utils

const ruleName = 'okta/no-absolute-urls'
const messages = ruleMessages(ruleName, {
expected:
'URLs starting with \'/\' are not allowed in SCSS files. Fix this by replacing with a relative link.',
})

module.exports = stylelint.createPlugin(ruleName, function getPlugin() {
return function lint(root, result) {
const validOptions = validateOptions(result, ruleName, {})
if (!validOptions) {
return
}
root.walkDecls(decl => {
const field = decl.toString().toLowerCase()
const match = field.match(/url\(["']\//g)
if (match) {
report({
ruleName,
result,
message: messages.expected,
node: decl,
})
}
})
}
})

module.exports.ruleName = ruleName
module.exports.messages = messages

0 comments on commit 2d5466e

Please sign in to comment.