Skip to content
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

Spelling #217

Merged
merged 6 commits into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plenty-carpets-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/stylelint-config": patch
---

Spelling fixes
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

### Patch Changes

- [#181](https://github.com/primer/stylelint-config/pull/181) [`23e438a`](https://github.com/primer/stylelint-config/commit/23e438a7a9062550baa696cafbb186dc78b723f5) Thanks [@jonrohan](https://github.com/jonrohan)! - Truning off scss/dollar-variable-default
- [#181](https://github.com/primer/stylelint-config/pull/181) [`23e438a`](https://github.com/primer/stylelint-config/commit/23e438a7a9062550baa696cafbb186dc78b723f5) Thanks [@jonrohan](https://github.com/jonrohan)! - Turning off scss/dollar-variable-default

## 12.1.1

Expand Down Expand Up @@ -92,7 +92,7 @@

### Major Changes

- [`23a1f15`](https://github.com/primer/stylelint-config/commit/23a1f1599673f2a4f9f28c39da61f42871c05697) [#85](https://github.com/primer/stylelint-config/pull/85) Thanks [@koddsson](https://github.com/koddsson)! - Replace deprecated "blacklist" rules for "dissallow list" rules.
- [`23a1f15`](https://github.com/primer/stylelint-config/commit/23a1f1599673f2a4f9f28c39da61f42871c05697) [#85](https://github.com/primer/stylelint-config/pull/85) Thanks [@koddsson](https://github.com/koddsson)! - Replace deprecated "blacklist" rules for "disallow list" rules.

See https://stylelint.io/user-guide/rules/at-rule-blacklist and http://stylelint.io/user-guide/rules/declaration-property-value-disallowed-list/

Expand All @@ -110,7 +110,7 @@

### Patch Changes

- [`d18cfbf`](https://github.com/primer/stylelint-config/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add additinal verbose logging to `no-undefined-vars`
- [`d18cfbf`](https://github.com/primer/stylelint-config/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Add additional verbose logging to `no-undefined-vars`

* [`d18cfbf`](https://github.com/primer/stylelint-config/commit/d18cfbfefc25be6ae38f73132552d2f3c62c4d02) [#79](https://github.com/primer/stylelint-config/pull/79) Thanks [@BinaryMuse](https://github.com/BinaryMuse)! - Fix handling of edge-cases in `no-undefined-vars`

Expand Down
2 changes: 1 addition & 1 deletion plugins/no-deprecated-colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ module.exports = stylelint.createPlugin(ruleName, (enabled, options = {}, contex
}, {})

const lintResult = (root, result) => {
// Walk all declarartions
// Walk all declarations
root.walk(node => {
if (seen.has(node)) {
return
Expand Down
10 changes: 5 additions & 5 deletions plugins/no-unused-vars.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function getCachedVariables(options, log) {
const key = JSON.stringify(options)
return cache.tap(key, () => {
const {files, variablePattern} = options
const decs = new TapMap()
const decls = new TapMap()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches other instances of what I think are decls...

const refs = new TapMap()

log(`Looking for variables in ${files} ...`)
Expand All @@ -60,15 +60,15 @@ function getCachedVariables(options, log) {
const after = css.substr(match.index + match[0].length)
const name = match[0]
if (after.startsWith(COLON)) {
decs.tap(name, set).add(file)
decls.tap(name, set).add(file)
} else {
refs.tap(name, set).add(file)
}
}
}
log(`Found ${decs.size} declarations, ${pluralize(refs.size, 'reference')}.`)
log(`Found ${decls.size} declarations, ${pluralize(refs.size, 'reference')}.`)

for (const [name, filesList] of decs.entries()) {
for (const [name, filesList] of decls.entries()) {
const fileRefs = refs.get(name)
if (fileRefs) {
log(`variable "${name}" declared in ${pluralize(filesList.size, 'file')}, ref'd in ${fileRefs.size}`)
Expand All @@ -77,7 +77,7 @@ function getCachedVariables(options, log) {
}
}

return {decs, refs}
return {decls, refs}
})
}

Expand Down