AdguardTeam / AdguardTeam/AGLint

Linter rule ideas

オープン
#13 コメント 47 件 リアクション 1 件 担当者 1 名 @scripthunter7 が担当を希望しています GitHub で見る
enhancement help wanted P: High question Status: In progress T: Linter T: Linter rule
主要言語
TypeScript
スター
70
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

説明

In this issue, we can collect the main linter rule ideas. A linter rule basically targets a specific problem and the rules can be enabled / disabled individually in the linter config. Let's try to define each rule as best as possible.

Example rules:
- Check unopened / unclosed if directives. For example:
```adblock
! Unopened if:
!#endif
rule
! Unclosed if:
!#if (adguard)
rule
```
- Warning on multilple selectors. For example:
```adblock
! Multiple selectors are used simultaneously within the rule:
example.com##.ad, .ad2
! But this is ok:
example.net###.ad
```
- Suggest fix (the linter can suggest a fix):
```adblock
example.com##.ad
example.com##.ad2
example.net###.ad
```
- Check redundant wildcards. For example:
```adblock
! Redundant *^
example.*^
! Redundant *
ex**ample.com
```

@ameshkov
@Alex-302

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。