Skip to content

Commit

Permalink
AG-36175 Add ext_chromium_mv3 to known platforms
Browse files Browse the repository at this point in the history
Merge in ADGUARD-FILTERS/aglint from fix/AG-36175 to master

Squashed commit of the following:

commit 065bef8
Author: Slava Leleka <[email protected]>
Date:   Fri Sep 20 22:54:16 2024 +0300

    update changelog

commit be8e5a6
Author: Slava Leleka <[email protected]>
Date:   Fri Sep 20 22:51:24 2024 +0300

    bump version, update changelog

commit aec0824
Author: Adam Wróblewski <[email protected]>
Date:   Fri Sep 20 21:43:50 2024 +0200

    Add ext_chromium_mv3 to known platforms
  • Loading branch information
AdamWr committed Sep 20, 2024
1 parent 12b72d8 commit c245157
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ The format is based on [Keep a Changelog][keepachangelog], and this project adhe
[keepachangelog]: https://keepachangelog.com/en/1.0.0/
[semver]: https://semver.org/spec/v2.0.0.html

## [2.1.1] - 2024-09-20

### Added

- Support of `ext_chromium_mv3` as a known platform for `PLATFORM` and `NOT_PLATFORM` hints [#220].

[2.1.1]: https://github.com/AdguardTeam/AGLint/compare/v2.1.0...v2.1.1
[#220]: https://github.com/AdguardTeam/AGLint/issues/220

## [2.1.0] - 2024-09-11

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adguard/aglint",
"version": "2.1.0",
"version": "2.1.1",
"description": "Universal adblock filter list linter.",
"keywords": [
"adblock",
Expand Down
1 change: 1 addition & 0 deletions src/linter/rules/unknown-hints-and-platforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const KNOWN_PLATFORMS = new Set([
'mac',
'android',
'ios',
'ext_chromium_mv3',
'ext_chromium',
'ext_ff',
'ext_edge',
Expand Down
6 changes: 4 additions & 2 deletions test/linter/rules/unknown-hints-and-platforms.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('unknown-hints-and-platforms', () => {
expect(linter.lint('!+ PLATFORM(mac)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(android)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(ios)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(ext_chromium_mv3)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(ext_chromium)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(ext_ff)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ PLATFORM(ext_edge)')).toMatchObject({ problems: [] });
Expand All @@ -31,7 +32,7 @@ describe('unknown-hints-and-platforms', () => {
expect(
linter.lint(
// eslint-disable-next-line max-len
'!+ PLATFORM(windows, mac, android, ios, ext_chromium, ext_ff, ext_edge, ext_opera, ext_safari, ext_android_cb, ext_ublock)',
'!+ PLATFORM(windows, mac, android, ios, ext_chromium_mv3, ext_chromium, ext_ff, ext_edge, ext_opera, ext_safari, ext_android_cb, ext_ublock)',
),
).toMatchObject({ problems: [] });

Expand All @@ -40,6 +41,7 @@ describe('unknown-hints-and-platforms', () => {
expect(linter.lint('!+ NOT_PLATFORM(mac)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(android)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(ios)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(ext_chromium_mv3)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(ext_chromium)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(ext_ff)')).toMatchObject({ problems: [] });
expect(linter.lint('!+ NOT_PLATFORM(ext_edge)')).toMatchObject({ problems: [] });
Expand All @@ -52,7 +54,7 @@ describe('unknown-hints-and-platforms', () => {
expect(
linter.lint(
// eslint-disable-next-line max-len
'!+ NOT_PLATFORM(windows, mac, android, ios, ext_chromium, ext_ff, ext_edge, ext_opera, ext_safari, ext_android_cb, ext_ublock)',
'!+ NOT_PLATFORM(windows, mac, android, ios, ext_chromium_mv3, ext_chromium, ext_ff, ext_edge, ext_opera, ext_safari, ext_android_cb, ext_ublock)',
),
).toMatchObject({ problems: [] });
});
Expand Down

0 comments on commit c245157

Please sign in to comment.