uBlock/.eslintrc.yml
Raymond Hill b7ed3b45ed
Add ability to directly evaluate static network filtering engine
Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/3362

There used to be a way to test URL against the network filtering engine,
but this was removed in a distant past during refactoring.

The ability has been brought back through uBO's own developer tools,
accessible through the _More_ button in the _Support_ pane in the
dashboard.

To query the static network filtering engine, enter the following
in the text editor:

snfe?url-to-test [type] [url-of-context]

`snfe?` is a prompt indicating the intent to query the static network
filtering engine.

At a minimum there must be a URL to test.

Optionally the type of the resource to match, default to `xhr` if
none specified. Also optionally, the context from within which the
request is made. Example:

Enter:
snfe?https://www.google-analytics.com/analytics.js

Result:
url: https://www.google-analytics.com/analytics.js
blocked: ||google-analytics.com^

Enter:
snfe?https://www.google-analytics.com/analytics.js script

Result:
url: https://www.google-analytics.com/analytics.js
type: script
blocked: ||google-analytics.com^
modified: ||google-analytics.com/analytics.js$script,redirect-rule=google-analytics_analytics.js:5

Enter:
snfe?https://example.com/

Result:
url: https://example.com/
not blocked

Enter:
snfe?https://example.com/ ping

Result:
url: https://example.com/
type: ping
blocked: *$ping,3p
2024-09-02 19:32:56 -04:00

29 lines
744 B
YAML

env:
browser: true
es2022: true
extends: eslint:recommended
parserOptions:
sourceType: module
rules:
eqeqeq:
- warn
- always
indent:
- error
- 4
- ignoredNodes:
- Program > BlockStatement
- Program > IfStatement > BlockStatement
- Program > ExpressionStatement > CallExpression > ArrowFunctionExpression > BlockStatement
- Program > ExpressionStatement > CallExpression > FunctionExpression > BlockStatement
- CallExpression > MemberExpression
- ArrayExpression > *
- ObjectExpression > *
no-control-regex: off
no-empty: off
sort-imports: warn
strict: warn
globals:
browser: readonly
chrome: readonly
vAPI: readonly