Skip to content

Commit

Permalink
Add scss/no-global-function-names rule (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjankord committed Mar 14, 2023
1 parent 45b3fa0 commit 4441071
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -6,10 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [10.0.0]
### Changed
- Updated repo to be compatible with stylelint v15
- Updated package to be compatible with stylelint v15

### Added
- Added node 18 to automated test matrix
- Added scss/no-global-function-names rule. Resolves [#268](https://github.com/bjankord/stylelint-config-sass-guidelines/issues/268)

### Removed
- Dropped official support for Node 12
Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -124,6 +124,7 @@ This is a list of the lints turned on in this configuration, and what they do.
* [`scss/dollar-variable-colon-space-after`](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-after/README.md): Require a single space after the colon in $-variable declarations.
* [`scss/dollar-variable-colon-space-before`](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/dollar-variable-colon-space-before/README.md): Disallow whitespace before the colon in $-variable declarations.
* [`scss/dollar-variable-pattern`](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/dollar-variable-pattern/README.md): SCSS variables must be written in lowercase and match the regex `^[a-z]+([a-z0-9-]+[a-z0-9]+)?$`.
* [`scss/no-global-function-names`](https://github.com/stylelint-scss/stylelint-scss/blob/master/src/rules/no-global-function-names/README.md): Disallows the use of global function names, as these global functions are now located inside built-in Sass modules.
* [`scss/percent-placeholder-pattern`](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/percent-placeholder-pattern/README.md): SCSS `%`-placeholders must be written in lowercase and match the regex `^[a-z]+([a-z0-9-]+[a-z0-9]+)?$`.
* [`scss/selector-no-redundant-nesting-selector`](https://github.com/kristerkari/stylelint-scss/blob/master/src/rules/selector-no-redundant-nesting-selector/README.md): Disallow redundant nesting selectors (`&`).

Expand Down
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -48,6 +48,7 @@ module.exports = {
"scss/dollar-variable-colon-space-after": "always",
"scss/dollar-variable-colon-space-before": "never",
"scss/dollar-variable-pattern": "^[_]?[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/no-global-function-names": true,
"scss/percent-placeholder-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
"scss/selector-no-redundant-nesting-selector": true,
"selector-class-pattern": [
Expand Down

0 comments on commit 4441071

Please sign in to comment.