@fabriziosalmi/slopless 1.4.4 → 1.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/engine/api.js +107 -107
- package/dist/index.d.ts +1 -0
- package/dist/index.js +178 -176
- package/package.json +3 -2
- package/rules/VBC-034.yaml +2 -1
- package/rules/VBC-913.yaml +20 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabriziosalmi/slopless",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"docs:preview": "vitepress preview docs",
|
|
22
22
|
"verify:bundle": "node scripts/verify-bundle.js",
|
|
23
23
|
"verify:action": "bash scripts/run-action-locally.sh . 'src/**/*.ts'",
|
|
24
|
-
"release:prep": "npm run docs:gen && npm run build && npm test && npm run verify:bundle"
|
|
24
|
+
"release:prep": "npm run docs:gen && npm run build && npm test && npm run verify:bundle",
|
|
25
|
+
"version": "npm run build && git add dist"
|
|
25
26
|
},
|
|
26
27
|
"keywords": [
|
|
27
28
|
"linter",
|
package/rules/VBC-034.yaml
CHANGED
|
@@ -6,7 +6,7 @@ tags:
|
|
|
6
6
|
- security
|
|
7
7
|
match:
|
|
8
8
|
regex: >-
|
|
9
|
-
http://(?!localhost|127\.|0\.0\.0\.0|169\.254\.|\[::1\]|test\b|example\.(?:com|org)|www\.w3\.org|schemas?\.|json-schema\.org|purl\.org|ns\.adobe|www\.apache\.org)
|
|
9
|
+
(?<!new URL\([^)]{0,200})http://(?!localhost|127\.|0\.0\.0\.0|169\.254\.|\[::1\]|test\b|example\.(?:com|org)|www\.w3\.org|schemas?\.|json-schema\.org|purl\.org|ns\.adobe|www\.apache\.org)
|
|
10
10
|
scan: strings
|
|
11
11
|
file_types:
|
|
12
12
|
- js
|
|
@@ -40,4 +40,5 @@ tests:
|
|
|
40
40
|
- const dev = 'http://localhost:3000';
|
|
41
41
|
- const dev2 = 'http://127.0.0.1:8000';
|
|
42
42
|
- "refuse http://169.254.169.254 (cloud metadata) before connecting"
|
|
43
|
+
- const parsed = new URL(req.url, `http://${req.headers.host}`);
|
|
43
44
|
- const svg = 'http://www.w3.org/2000/svg';
|
package/rules/VBC-913.yaml
CHANGED
|
@@ -9,6 +9,22 @@ match:
|
|
|
9
9
|
regex: >-
|
|
10
10
|
outline:\s*(?:none|0)\b(?![\s\S]{0,400}?:focus-visible[\s\S]{0,140}?outline\s*:\s*(?!none|0|\s*;))
|
|
11
11
|
multiline: true
|
|
12
|
+
# An outline only ever appears on focus, so removing one matters only where
|
|
13
|
+
# focus can land. `.card { outline: none }` on a div nobody can tab to removes
|
|
14
|
+
# nothing; the same line under `:focus-visible` removes the only thing telling
|
|
15
|
+
# a keyboard user where they are.
|
|
16
|
+
require_selectors:
|
|
17
|
+
- ':focus'
|
|
18
|
+
- ':active'
|
|
19
|
+
- a
|
|
20
|
+
- button
|
|
21
|
+
- input
|
|
22
|
+
- select
|
|
23
|
+
- textarea
|
|
24
|
+
- summary
|
|
25
|
+
- details
|
|
26
|
+
- '[tabindex]'
|
|
27
|
+
- '[contenteditable]'
|
|
12
28
|
file_types:
|
|
13
29
|
- css
|
|
14
30
|
- scss
|
|
@@ -19,8 +35,12 @@ message: >-
|
|
|
19
35
|
tests:
|
|
20
36
|
fire:
|
|
21
37
|
- 'a:focus { outline: none; }'
|
|
38
|
+
- 'input[type="range"]:focus-visible { outline: none; }'
|
|
39
|
+
- '.editor:focus-visible { outline: none !important; }'
|
|
22
40
|
quiet:
|
|
23
41
|
- 'a:focus { outline: 2px solid currentColor; }'
|
|
42
|
+
- '.card { cursor: default; outline: none; overflow: hidden; }'
|
|
43
|
+
- '.ProseMirror { outline: none; min-height: 100vh; }'
|
|
24
44
|
- |
|
|
25
45
|
*:focus {
|
|
26
46
|
outline: none;
|