From 4441071010cf53facae1b66fabf5d255e1d4a4cc Mon Sep 17 00:00:00 2001 From: Brett Jankord Date: Mon, 13 Mar 2023 20:16:50 -0500 Subject: [PATCH] Add scss/no-global-function-names rule (#280) --- CHANGELOG.md | 3 ++- README.md | 1 + index.js | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 786f04a..bebf263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 5b8c310..42d1d82 100644 --- a/README.md +++ b/README.md @@ -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 (`&`). diff --git a/index.js b/index.js index 33a0dce..93b0776 100644 --- a/index.js +++ b/index.js @@ -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": [