Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rokucommunity/bslint into…
Browse files Browse the repository at this point in the history
… fix-npm-audit-issues
  • Loading branch information
TwitchBronBron committed Mar 19, 2024
2 parents 042dc6b + a650d6f commit 452c22e
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 112 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0



## [0.8.19](https://github.com/rokucommunity/bslint/compare/v0.8.18...v0.8.19) - 2024-03-07
### Changed
- upgrade to [[email protected]](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#06525---2024-03-07). Notable changes since 0.65.23:
- Support when tokens have null ranges ([brighterscript#1072](https://github.com/rokucommunity/brighterscript/pull/1072))
- Support whitespace in conditional compile keywords ([brighterscript#1090](https://github.com/rokucommunity/brighterscript/pull/1090))
- Allow negative patterns in diagnostic filters ([brighterscript#1078](https://github.com/rokucommunity/brighterscript/pull/1078))



## [0.8.18](https://github.com/rokucommunity/bslint/compare/v0.8.17...v0.8.18) - 2024-02-29
### Changed
- upgrade to [[email protected]](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#06523---2024-02-29). Notable changes since 0.65.19:
- empty interfaces break the parser ([brighterscript#1082](https://github.com/rokucommunity/brighterscript/pull/1082))
- Allow v1 syntax: built-in types for class member types and type declarations on lhs ([brighterscript#1059](https://github.com/rokucommunity/brighterscript/pull/1059))
- Move `coveralls-next` to a devDependency since it's not needed at runtime ([brighterscript#1051](https://github.com/rokucommunity/brighterscript/pull/1051))
- Fix parsing issues with multi-index IndexedSet and IndexedGet ([brighterscript#1050](https://github.com/rokucommunity/brighterscript/pull/1050))



## [0.8.17](https://github.com/rokucommunity/bslint/compare/v0.8.16...v0.8.17) - 2024-01-30
### Changed
- upgrade to [[email protected]](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#06519---2024-01-30). Notable changes since 0.65.18:
- Backport v1 syntax changes ([brighterscript#1034](https://github.com/rokucommunity/brighterscript/pull/1034))



## [0.8.16](https://github.com/rokucommunity/bslint/compare/v0.8.15...v0.8.16) - 2024-01-25
### Changed
- upgrade to [[email protected]](https://github.com/rokucommunity/brighterscript/blob/master/CHANGELOG.md#06518---2024-01-25). Notable changes since 0.65.17:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Default rules:

- `color-cert`: enforces Roku's [broadcast safe color 6.4 certification requirement](https://developer.roku.com/en-gb/docs/developer-program/certification/certification.md). Requires that `color-format` is set to `hash-hex` or `quoted-numeric-hex`.

- `always`: ensures all white and black color-format values either match or are darker/ lighter than the minimum recommended values. For white the minimum value is `#DBDBDB` and for black the minimum value is `#161616`
- `always`: ensures all white and black color-format values either match or are darker/ lighter than the minimum recommended values. For white the maximum value is `#EBEBEB` and for black the minimum value is `#161616`
- `off`: do not validate (**default**)

### Strictness rules
Expand Down
146 changes: 42 additions & 104 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rokucommunity/bslint",
"version": "0.8.16",
"version": "0.8.19",
"description": "BrighterScript linter plugin",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"@types/node": "^14.6.0",
"@typescript-eslint/eslint-plugin": "^3.10.1",
"@typescript-eslint/parser": "^3.10.1",
"brighterscript": "^0.65.18",
"brighterscript": "^0.65.25",
"chai": "^4.3.6",
"coveralls-next": "^4.2.0",
"eslint": "^7.7.0",
Expand Down
4 changes: 2 additions & 2 deletions src/createColorValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function createColorValidator(severity: Readonly<BsLintRules>) {
return (text, range, diagnostics) => {
const len = text.length;
if (len < 7 || len > 12) {
// we're only interested in string length is between 7 (#DBDBDB) to 12 ("0xDBDBDBff") chars long
// we're only interested in string length is between 7 (#EBEBEB) to 12 ("0xEBEBEBFF") chars long
return;
}

Expand Down Expand Up @@ -82,7 +82,7 @@ function validateColorCertCompliance(matches: RegExpMatchArray, range: Range, di
const validateCertCompliant = certCompliant === 'always';
if (validateCertCompliant && matches) {
const BROADCAST_SAFE_BLACK = '161616';
const BROADCAST_SAFE_WHITE = 'DBDBDB';
const BROADCAST_SAFE_WHITE = 'EBEBEB';
const MAX_BLACK_LUMA = getColorLuma(BROADCAST_SAFE_BLACK);
const MAX_WHITE_LUMA = getColorLuma(BROADCAST_SAFE_WHITE);
let colorValue = matches[0];
Expand Down
6 changes: 3 additions & 3 deletions src/plugins/codeStyle/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -775,9 +775,9 @@ describe('codeStyle', () => {
});
program.setFile('source/main.bs', `
sub init()
color = "0xDBDBDC"
color = "0xEBEBEC"
color = "0x161616"
color = "0xDBDBDBFF"
color = "0xEBEBEBFF"
color = "0x161615"
longStringWithColors = "Long string value with 0x161615 non broadcast safe color values defined"
end sub
Expand All @@ -798,7 +798,7 @@ describe('codeStyle', () => {
sub init()
color = "0xDBDBDC"
color = "0x161616"
color = "0xDBDBDBFF"
color = "0xEBEBEBFF"
color = "0x161615"
longStringWithColors = "Long string value with 0x161615 non broadcast safe color values defined"
end sub
Expand Down

0 comments on commit 452c22e

Please sign in to comment.