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

chore: update rulesets to support light/dark mode banners #34

Merged
merged 3 commits into from
Feb 21, 2023
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
<a href="https://opensource.newrelic.com/oss-category/#community-plus"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"><source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"><img alt="New Relic Open Source community plus project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"></picture></a>

# .github

Expand Down
8 changes: 4 additions & 4 deletions repolinter-rulesets/community-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ rules:
nocase: true
lineCount: 5
patterns:
- https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Plus\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><img alt="New Relic Open Source community plus project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus
human-readable-pattern: Open source Community Plus header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
fix:
type: file-modify
options:
text: "[![Community Plus header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)"
text: "the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-2"
write_mode: prepend
newlines:
end: 2
Expand All @@ -77,7 +77,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
human-readable-content: a link to the security policy for this repository
Expand All @@ -94,7 +94,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: discuss\.newrelic\.com
human-readable-content: a link to the appropriate discuss.newrelic.com topic
Expand Down
8 changes: 4 additions & 4 deletions repolinter-rulesets/community-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ rules:
nocase: true
lineCount: 5
patterns:
- https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Project\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><img alt="New Relic Open Source community project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project
human-readable-pattern: Open source Community header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
fix:
type: file-modify
options:
text: "[![Community header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project)"
text: "the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-1"
write_mode: prepend
newlines:
end: 2
Expand All @@ -77,7 +77,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
human-readable-content: a link to the security policy for this repository
Expand All @@ -94,7 +94,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: discuss\.newrelic\.com
human-readable-content: a link to the appropriate discuss.newrelic.com topic
Expand Down
6 changes: 3 additions & 3 deletions repolinter-rulesets/example-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ rules:
nocase: true
lineCount: 5
patterns:
- https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Example_Code\.png
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#example-code"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Example_Code\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Example_Code\.png"><img alt="New Relic Open Source example project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Example_Code\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#example-code
human-readable-pattern: Open source Example Code header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
fix:
type: file-modify
options:
text: "[![Example Code header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Example_Code.png)](https://opensource.newrelic.com/oss-category/#example-code)"
text: "the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-4"
write_mode: prepend
newlines:
end: 2
Expand All @@ -77,7 +77,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
human-readable-content: a link to the security policy for this repository
Expand Down
6 changes: 3 additions & 3 deletions repolinter-rulesets/new-relic-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ rules:
nocase: true
lineCount: 5
patterns:
- https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Experimental\.png
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#new-relic-experimental"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Experimental\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Experimental\.png"><img alt="New Relic Open Source experimental project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Experimental\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#new-relic-experimental
human-readable-pattern: Open source experimental header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
fix:
type: file-modify
options:
text: "[![New Relic Experimental header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Experimental.png)](https://opensource.newrelic.com/oss-category/#new-relic-experimental)"
text: "the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet"
write_mode: prepend
newlines:
end: 2
Expand All @@ -77,7 +77,7 @@ rules:
options:
globsAll:
- README*
fail-on-non-exist: true
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic-experimental\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
human-readable-content: a link to the security policy for this repository
Expand Down
22 changes: 11 additions & 11 deletions repolinter-rulesets/new-relic-one-catalog-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@
"rule": {
"type": "file-starts-with",
"options": {
"globsAll": ["README*"],
"nocase": true,
"lineCount": 1,
"patterns": ["\\[\\s*\\!\\[[a-z0-9\\s]+\\]\\(\\s*https:\\/\\/github\\.com\\/newrelic\\/opensource-website\\/raw\\/master\\/src\\/images\\/categories\\/New_Relic_One_Catalog_Project\\.png\\s*\\)\\s*\\]\\(\\s*https:\\/\\/opensource\\.newrelic\\.com\\/oss-category\\/#new-relic-one-catalog-project\\s*\\)"],
"human-readable-pattern": "Open source NR1 Catalog header (see https://opensource.newrelic.com/oss-category)",
"flags": "i",
"succeed-on-non-existent": false
"globsAll": ["README*"],
"nocase": true,
"lineCount": 1,
"patterns": ["<a href=\"https:\\/\\/opensource\\.newrelic\\.com\\/oss-category\\/#new-relic-one-catalog-project\"><picture><source media=\"\\(prefers-color-scheme: dark\\)\" srcset=\"https:\\/\\/github\\.com\\/newrelic\\/opensource-website\\/raw\\/main\\/src\\/images\\/categories\\/dark\\/New_Relic_One_Catalog_Project\\.png\"><source media=\"\\(prefers-color-scheme: light\\)\" srcset=\"https:\\/\\/github\\.com\\/newrelic\\/opensource-website\\/raw\\/main\\/src\\/images\\/categories\\/New_Relic_One_Catalog_Project\\.png\"><img alt=\"New Relic Open Source catalog project banner\\.\" src=\"https:\\/\\/github\\.com\\/newrelic\\/opensource-website\\/raw\\/main\\/src\\/images\\/categories\\/New_Relic_One_Catalog_Project\\.png\"><\\/picture><\\/a>"],
"human-readable-pattern": "Open source NR1 Catalog header (see https://opensource.newrelic.com/oss-category)",
"flags": "i",
"succeed-on-non-existent": false
}
},
"fix": {
"type": "file-modify",
"options": {
"text": "[![New Relic One Catalog Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/New_Relic_One_Catalog_Project.png)](https://opensource.newrelic.com/oss-category/#new-relic-one-catalog-project)",
"text": "the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-3",
"write_mode": "prepend",
"newlines": { "end": 2 }
}
Expand All @@ -73,7 +73,7 @@
"type": "file-contents",
"options": {
"globsAll": ["README*"],
"fail-on-non-exist": true,
"fail-on-non-existent": true,
"flags": "mi",
"content": "^#+\\s*security[\\w\\s]*$",
"human-readable-content": "a security section"
Expand All @@ -88,7 +88,7 @@
"type": "file-contents",
"options": {
"globsAll": ["README*"],
"fail-on-non-exist": true,
"fail-on-non-existent": true,
"flags": "i",
"content": "(?:(?:https:\\/\\/github\\.com\\/newrelic\\/[^\\/]+)|(?:\\.\\.\\/\\.\\.))\\/security\\/policy",
"human-readable-content": "a link to the security policy for this repository"
Expand All @@ -103,7 +103,7 @@
"type": "file-contents",
"options": {
"globsAll": ["README*"],
"fail-on-non-exist": true,
"fail-on-non-existent": true,
"flags": "i",
"content": "discuss\\.newrelic\\.com",
"human-readable-content": "a link to the appropriate discuss.newrelic.com topic"
Expand Down
14 changes: 7 additions & 7 deletions repolinter-rulesets/nr1-lib-deprecations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (import {).*(Dropdown).*(} from 'nr1').*(<(Dropdown)\s[^>]*(label)=*)
human-readable-content: The Dropdown label property is deprecated
Expand All @@ -28,7 +28,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(AccountPicker)\s[^>]*(onChange)=*)
human-readable-content: deprecated event handled for AccountPicker onChange
Expand All @@ -45,7 +45,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(Icon)\s[^>]*(sizeType)=*)
human-readable-content: The Icon sizeType property is deprecated
Expand All @@ -62,7 +62,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(EntityTitleTableRowCell)\s[^>]*(value)=*)
human-readable-content: The reporting property of the value object should be present within this EntityTitleTableRowCell
Expand All @@ -79,7 +79,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(Tooltip)\s[^>]*(className)=*)
human-readable-content: deprecated Tooltip className property
Expand All @@ -96,7 +96,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(Tooltip)\s[^>]*(style)=*)
human-readable-content: The Tooltip style property is deprecated
Expand All @@ -113,7 +113,7 @@ rules:
globsAll:
- "**/*.@(js|ts|jsx|tsx)"
- "!node_modules/**"
fail-on-non-exist: false
fail-on-non-existent: false
flags: gm
content: (<(TableRow)\s[^>]*(actions)=*)
human-readable-content: The iconType property of the actions object should not be present within a TableRow
Expand Down