Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Jan 6, 2020
1 parent ec87117 commit 7b1411d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/rules/no-global-function-names/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A full list of disallowed names (and their alternatives) is located [here](https
It is recommended to use the [Sass migrator](https://sass-lang.com/documentation/cli/migrator) to change these global function names automatically.

```scss
@use color;
@use "sass:color";
a {
background: color.adjust(#6b717f, $red: 15);
}
Expand All @@ -24,7 +24,7 @@ a {
The following patterns are *not* considered warnings:

```scss
@use color;
@use "sass:color";
a {
background: color.adjust(#6b717f, $red: 15);
}
Expand Down
12 changes: 10 additions & 2 deletions src/rules/no-global-function-names/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ testRule(rule, {
accept: [
{
code: `
@use color;
@use "sass:color";
a {
background: color.adjust(#6b717f, $red: 15);
}
Expand All @@ -17,12 +17,20 @@ testRule(rule, {
},
{
code: `
@use color;
@use "sass:color";
a {
background: color.red(#6b717f);
}
`,
description: "Non-global function with different name"
},
{
code: `
a {
background: rgb(27,224,63);
}
`,
description: "An allowed global function"
}
],

Expand Down

0 comments on commit 7b1411d

Please sign in to comment.