@gspothq/cli 0.0.0-stage → 0.1.1
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 +18 -2
- package/configurations/database/postgres/manifest.toml +114 -0
- package/configurations/database/postgres/rules/POSTGRES.md +78 -0
- package/configurations/framework/astro/eslint-presets.json +138 -0
- package/configurations/framework/astro/manifest.toml +95 -0
- package/configurations/framework/astro/rules/ASTRO.md +39 -0
- package/configurations/framework/expo/manifest.toml +43 -0
- package/configurations/framework/express/manifest.toml +17 -0
- package/configurations/framework/express/rules/EXPRESS.md +73 -0
- package/configurations/framework/express/semgrep/express.yml +71 -0
- package/configurations/framework/fastapi/manifest.toml +11 -0
- package/configurations/framework/fastapi/rules/FASTAPI.md +100 -0
- package/configurations/framework/fastapi/semgrep/fastapi.yml +44 -0
- package/configurations/framework/nestjs/eslint-presets.json +62 -0
- package/configurations/framework/nestjs/manifest.toml +52 -0
- package/configurations/framework/nestjs/rules/NESTJS.md +44 -0
- package/configurations/framework/nextjs/eslint-presets.json +73 -0
- package/configurations/framework/nextjs/manifest.toml +119 -0
- package/configurations/framework/nextjs/rules/NEXTJS.md +43 -0
- package/configurations/framework/react/eslint-presets.json +77 -0
- package/configurations/framework/react/manifest.toml +93 -0
- package/configurations/framework/react/rules/REACT.md +108 -0
- package/configurations/framework/react-dom/eslint-presets.json +110 -0
- package/configurations/framework/react-dom/manifest.toml +24 -0
- package/configurations/framework/react-native/manifest.toml +46 -0
- package/configurations/framework/react-native/rules/REACT-NATIVE.md +51 -0
- package/configurations/framework/site/manifest.toml +170 -0
- package/configurations/framework/site/rules/SITE.md +20 -0
- package/configurations/framework/svelte/eslint-presets.json +67 -0
- package/configurations/framework/svelte/manifest.toml +83 -0
- package/configurations/framework/svelte/rules/SVELTE.md +48 -0
- package/configurations/framework/vue/eslint-presets.json +180 -0
- package/configurations/framework/vue/manifest.toml +83 -0
- package/configurations/framework/vue/rules/VUE.md +41 -0
- package/configurations/general/commits/manifest.toml +111 -0
- package/configurations/general/commits/rules/GIT.md +31 -0
- package/configurations/general/coverage/manifest.toml +3 -0
- package/configurations/general/dependencies/manifest.toml +159 -0
- package/configurations/general/dependencies/rules/DEPENDENCIES.md +30 -0
- package/configurations/general/dependencies/syncpack.json +15 -0
- package/configurations/general/docs/manifest.toml +79 -0
- package/configurations/general/docs/rules/DOCS.md +86 -0
- package/configurations/general/duplication/manifest.toml +32 -0
- package/configurations/general/engineering/manifest.toml +8 -0
- package/configurations/general/engineering/rules/agent/PLANNING.md +42 -0
- package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +16 -0
- package/configurations/general/engineering/rules/agent/TALKING.md +3 -0
- package/configurations/general/engineering/rules/agent/TASKS.md +19 -0
- package/configurations/general/engineering/rules/agent/WORKING.md +83 -0
- package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +32 -0
- package/configurations/general/engineering/rules/code/CLI.md +37 -0
- package/configurations/general/engineering/rules/code/COMMENTS.md +38 -0
- package/configurations/general/engineering/rules/code/CONFIGURATION.md +25 -0
- package/configurations/general/engineering/rules/code/ERRORS.md +49 -0
- package/configurations/general/engineering/rules/code/HTTP.md +46 -0
- package/configurations/general/engineering/rules/code/LOGGING.md +55 -0
- package/configurations/general/engineering/rules/code/TESTING.md +58 -0
- package/configurations/general/files/manifest.toml +141 -0
- package/configurations/general/files/rules/YAML.md +19 -0
- package/configurations/general/format/manifest.toml +152 -0
- package/configurations/general/gspot/manifest.toml +65 -0
- package/configurations/general/gspot/rules/GENERATED.md +10 -0
- package/configurations/general/licenses/manifest.toml +33 -0
- package/configurations/general/naming/defaults.json +423 -0
- package/configurations/general/naming/manifest.toml +35 -0
- package/configurations/general/naming/rules/NAMING.md +179 -0
- package/configurations/general/prose/manifest.toml +86 -0
- package/configurations/general/prose/rules/WRITING.md +31 -0
- package/configurations/general/prose/vale/styles/LICENSES.md +55 -0
- package/configurations/general/prose/vale/styles/gspot/ampm.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/conscious-language.yml +16 -0
- package/configurations/general/prose/vale/styles/gspot/contractions.yml +43 -0
- package/configurations/general/prose/vale/styles/gspot/currency.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/dashes.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/date-ordinals.yml +41 -0
- package/configurations/general/prose/vale/styles/gspot/dates.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/file-paths.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/future.yml +17 -0
- package/configurations/general/prose/vale/styles/gspot/hedging.yml +22 -0
- package/configurations/general/prose/vale/styles/gspot/history.yml +16 -0
- package/configurations/general/prose/vale/styles/gspot/idioms.yml +21 -0
- package/configurations/general/prose/vale/styles/gspot/interface-verbs.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/jargon.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/leading-conjunctions.yml +12 -0
- package/configurations/general/prose/vale/styles/gspot/link-text.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/locations.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/marketing.yml +26 -0
- package/configurations/general/prose/vale/styles/gspot/merge-conflict-markers.yml +13 -0
- package/configurations/general/prose/vale/styles/gspot/militaristic-language.yml +22 -0
- package/configurations/general/prose/vale/styles/gspot/modals.yml +9 -0
- package/configurations/general/prose/vale/styles/gspot/numbered-units.yml +18 -0
- package/configurations/general/prose/vale/styles/gspot/obvious-fields.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/ordinal-adverbs.yml +15 -0
- package/configurations/general/prose/vale/styles/gspot/percentage-numbers.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/placeholders.yml +7 -0
- package/configurations/general/prose/vale/styles/gspot/product-centric-writing.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/punctuated-headings.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/self-reference.yml +15 -0
- package/configurations/general/prose/vale/styles/gspot/session-identifiers.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/since.yml +6 -0
- package/configurations/general/prose/vale/styles/gspot/straight-quotes.yml +11 -0
- package/configurations/general/prose/vale/styles/gspot/suspended-hyphens.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/symbols.yml +8 -0
- package/configurations/general/prose/vale/styles/gspot/time-ranges.yml +14 -0
- package/configurations/general/prose/vale/styles/gspot/url-prepositions.yml +10 -0
- package/configurations/general/prose/vale/styles/gspot/version-range.yml +8 -0
- package/configurations/general/repository/manifest.toml +24 -0
- package/configurations/general/secrets/gitleaks.toml +2 -0
- package/configurations/general/secrets/manifest.toml +125 -0
- package/configurations/general/secrets/rules/SECRETS.md +13 -0
- package/configurations/general/security/manifest.toml +77 -0
- package/configurations/general/security/rules/SECURITY.md +55 -0
- package/configurations/general/spelling/manifest.toml +46 -0
- package/configurations/general/structure/manifest.toml +70 -0
- package/configurations/infrastructure/ansible/manifest.toml +33 -0
- package/configurations/infrastructure/docker/manifest.toml +127 -0
- package/configurations/infrastructure/docker/rules/DOCKER.md +135 -0
- package/configurations/infrastructure/docker/trivyignore +2 -0
- package/configurations/infrastructure/github-actions/manifest.toml +76 -0
- package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +43 -0
- package/configurations/infrastructure/github-actions/zizmor.yml +3 -0
- package/configurations/infrastructure/nginx/manifest.toml +51 -0
- package/configurations/infrastructure/nginx/rules/NGINX.md +38 -0
- package/configurations/infrastructure/openapi/manifest.toml +50 -0
- package/configurations/infrastructure/openapi/rules/OPENAPI.md +39 -0
- package/configurations/infrastructure/xcode/manifest.toml +131 -0
- package/configurations/infrastructure/xcode/rules/XCODE.md +34 -0
- package/configurations/language/bash/manifest.toml +261 -0
- package/configurations/language/bash/rules/BASH.md +106 -0
- package/configurations/language/bash/rules/LANGUAGE.md +213 -0
- package/configurations/language/bash/rules/NAMING.md +62 -0
- package/configurations/language/bash/rules/OPERATIONS.md +77 -0
- package/configurations/language/bash/rules/SAFETY.md +222 -0
- package/configurations/language/bash/semgrep/bash.yml +30 -0
- package/configurations/language/css/manifest.toml +98 -0
- package/configurations/language/css/rules/CSS.md +28 -0
- package/configurations/language/css/rules/NAMING.md +17 -0
- package/configurations/language/css/rules/TAILWIND.md +26 -0
- package/configurations/language/css/stylelint-rule-names.json +89 -0
- package/configurations/language/html/manifest.toml +59 -0
- package/configurations/language/html/rules/HTML.md +27 -0
- package/configurations/language/html/rules/NAMING.md +16 -0
- package/configurations/language/javascript/eslint-presets.json +997 -0
- package/configurations/language/javascript/eslint-rule-names.json +299 -0
- package/configurations/language/javascript/eslint-runtime-names.json +61 -0
- package/configurations/language/javascript/manifest.toml +393 -0
- package/configurations/language/javascript/rules/BUN.md +13 -0
- package/configurations/language/javascript/rules/COMPONENTS.md +18 -0
- package/configurations/language/javascript/rules/DENO.md +15 -0
- package/configurations/language/javascript/rules/JAVASCRIPT.md +60 -0
- package/configurations/language/javascript/rules/NAMING.md +31 -0
- package/configurations/language/javascript/rules/NODE.md +21 -0
- package/configurations/language/javascript/rules/PLAYWRIGHT.md +34 -0
- package/configurations/language/javascript/semgrep/javascript.yml +84 -0
- package/configurations/language/markdown/manifest.toml +85 -0
- package/configurations/language/markdown/markdownlint-cli2.mjs +19 -0
- package/configurations/language/python/manifest.toml +621 -0
- package/configurations/language/python/rules/DESIGN.md +136 -0
- package/configurations/language/python/rules/FLOW.md +124 -0
- package/configurations/language/python/rules/NAMING.md +53 -0
- package/configurations/language/python/rules/PACKAGING.md +49 -0
- package/configurations/language/python/rules/PYTHON.md +136 -0
- package/configurations/language/python/rules/TYPING.md +132 -0
- package/configurations/language/sql/manifest.toml +68 -0
- package/configurations/language/sql/rules/NAMING.md +90 -0
- package/configurations/language/sql/rules/SQL.md +9 -0
- package/configurations/language/swift/manifest.toml +164 -0
- package/configurations/language/swift/rules/NAMING.md +88 -0
- package/configurations/language/swift/rules/SWIFT.md +134 -0
- package/configurations/language/swift/rules/SWIFTUI.md +61 -0
- package/configurations/language/swift/rules/UIKIT.md +99 -0
- package/configurations/language/swift/semgrep/swift.yml +126 -0
- package/configurations/language/typescript/eslint-presets.json +215 -0
- package/configurations/language/typescript/manifest.toml +72 -0
- package/configurations/language/typescript/rules/NAMING.md +73 -0
- package/configurations/language/typescript/rules/TYPESCRIPT.md +79 -0
- package/configurations/library/drizzle/manifest.toml +68 -0
- package/configurations/library/drizzle/rules/DRIZZLE.md +44 -0
- package/configurations/library/react-hook-form/manifest.toml +15 -0
- package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +48 -0
- package/configurations/library/swift-snapshot-testing/manifest.toml +32 -0
- package/configurations/library/tanstack-query/eslint-presets.json +21 -0
- package/configurations/library/tanstack-query/manifest.toml +26 -0
- package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +41 -0
- package/configurations/library/testing-library/eslint-presets.json +191 -0
- package/configurations/library/testing-library/manifest.toml +47 -0
- package/configurations/library/translations/manifest.toml +40 -0
- package/configurations/library/translations/rules/NEXT-INTL.md +33 -0
- package/configurations/library/translations/rules/TRANSLATIONS.md +102 -0
- package/configurations/library/trpc/manifest.toml +14 -0
- package/configurations/library/trpc/rules/TRPC.md +43 -0
- package/configurations/library/zod/manifest.toml +25 -0
- package/configurations/library/zod/rules/ZOD.md +44 -0
- package/configurations/library/zustand/manifest.toml +18 -0
- package/configurations/library/zustand/rules/ZUSTAND.md +106 -0
- package/configurations/platform/cloudflare/manifest.toml +94 -0
- package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +23 -0
- package/configurations/platform/cloudflare/semgrep/cloudflare.yml +12 -0
- package/configurations/platform/supabase/manifest.toml +112 -0
- package/configurations/platform/supabase/rules/SUPABASE.md +129 -0
- package/configurations/platform/supabase/semgrep/supabase.yml +60 -0
- package/configurations/testing/jest/manifest.toml +54 -0
- package/configurations/testing/pytest/manifest.toml +53 -0
- package/configurations/testing/swift-tests/manifest.toml +52 -0
- package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +79 -0
- package/configurations/testing/vitest/eslint-presets.json +22 -0
- package/configurations/testing/vitest/manifest.toml +69 -0
- package/configurations/testing/vitest/rules/VITEST.md +18 -0
- package/dist/LICENSE.md +201 -0
- package/dist/THIRD-PARTY-NOTICES.md +25 -0
- package/dist/eslint-rule-levels.json +10 -0
- package/dist/gspot.js +30740 -0
- package/dist/linkinator-program.js +65 -0
- package/dist/purgecss-program.js +51 -0
- package/dist/tool-versions.json +3 -0
- package/grammars/bash.wasm +0 -0
- package/grammars/css.wasm +0 -0
- package/grammars/html.wasm +0 -0
- package/grammars/javascript.wasm +0 -0
- package/grammars/licenses/tree-sitter-bash.txt +21 -0
- package/grammars/licenses/tree-sitter-css.txt +21 -0
- package/grammars/licenses/tree-sitter-html.txt +21 -0
- package/grammars/licenses/tree-sitter-javascript.txt +21 -0
- package/grammars/licenses/tree-sitter-python.txt +21 -0
- package/grammars/licenses/tree-sitter-swift.txt +21 -0
- package/grammars/licenses/tree-sitter-typescript.txt +21 -0
- package/grammars/python.wasm +0 -0
- package/grammars/swift.wasm +0 -0
- package/grammars/tsx.wasm +0 -0
- package/grammars/typescript.wasm +0 -0
- package/gspot.schema.json +45991 -0
- package/package.json +93 -5
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
[configuration]
|
|
2
|
+
title = "Static Site"
|
|
3
|
+
requires = ["html"]
|
|
4
|
+
suggests = ["css", "javascript"]
|
|
5
|
+
description = "A site built to a folder and served as files: its build, links, weight, and sitemap."
|
|
6
|
+
|
|
7
|
+
[detect]
|
|
8
|
+
paths = ["site.webmanifest", "sitemap.xml"]
|
|
9
|
+
|
|
10
|
+
[files]
|
|
11
|
+
filenames = ["site.webmanifest", "sitemap.xml", "robots.txt"]
|
|
12
|
+
extensions = [".svg"]
|
|
13
|
+
|
|
14
|
+
[[tool]]
|
|
15
|
+
name = "linkinator"
|
|
16
|
+
version = "8.1.0"
|
|
17
|
+
npm = "linkinator"
|
|
18
|
+
[[tool.replace]]
|
|
19
|
+
file = "linkinator.config.json"
|
|
20
|
+
shared = false
|
|
21
|
+
|
|
22
|
+
[[tool]]
|
|
23
|
+
name = "svgo"
|
|
24
|
+
version = "4.1.0"
|
|
25
|
+
npm = "svgo"
|
|
26
|
+
|
|
27
|
+
[[tool]]
|
|
28
|
+
name = "purgecss"
|
|
29
|
+
version = "7.0.2"
|
|
30
|
+
npm = "purgecss"
|
|
31
|
+
|
|
32
|
+
[[tool_file]]
|
|
33
|
+
target = ".gspot/config/html-validate-built.json"
|
|
34
|
+
per_scope = true
|
|
35
|
+
tool = "html-validate"
|
|
36
|
+
check = "site/html-validate"
|
|
37
|
+
rule_keys = ["rules"]
|
|
38
|
+
|
|
39
|
+
[[tool_file]]
|
|
40
|
+
target = ".gspot/config/purgecss.config.mjs"
|
|
41
|
+
per_scope = true
|
|
42
|
+
tool = "purgecss"
|
|
43
|
+
check = "site/purgecss"
|
|
44
|
+
|
|
45
|
+
[[check]]
|
|
46
|
+
name = "build"
|
|
47
|
+
example = "If the configured site build imports a missing template, the build check reports the command failure. Correct the template import or restore the template, then rerun the same configured build."
|
|
48
|
+
level = "recommended"
|
|
49
|
+
stage = "push"
|
|
50
|
+
runs = "scope"
|
|
51
|
+
needs = ["build"]
|
|
52
|
+
summary = "Runs the site build command and fails when it fails or writes no build folder."
|
|
53
|
+
why = "Other site checks read the built files, so a failed build hides their findings."
|
|
54
|
+
help = "Run the build command by hand and fix what it prints. Name the command under site.build_command."
|
|
55
|
+
|
|
56
|
+
[[check]]
|
|
57
|
+
name = "build-reproducible"
|
|
58
|
+
example = "A build that embeds the current timestamp produces different bytes across repeated builds. Remove the timestamp from built files or derive it from a stable declared input, then rerun the reproducibility check."
|
|
59
|
+
level = "all"
|
|
60
|
+
stage = "push"
|
|
61
|
+
runs = "scope"
|
|
62
|
+
needs = ["build"]
|
|
63
|
+
summary = "Builds the site twice and compares its files."
|
|
64
|
+
why = "A build that differs from run to run cannot be cached, compared, or trusted to hold what was reviewed."
|
|
65
|
+
help = "Take the timestamp, the random value, or the unordered list out of the build."
|
|
66
|
+
|
|
67
|
+
[[check]]
|
|
68
|
+
name = "html-validate"
|
|
69
|
+
tool = "html-validate"
|
|
70
|
+
example = "A template emitting `<img src=\"logo.png\">` without alternative text can produce an accessibility finding in the built HTML. Add meaningful `alt` text in the template, or `alt=\"\"` for a decorative image, and rebuild."
|
|
71
|
+
level = "recommended"
|
|
72
|
+
stage = "push"
|
|
73
|
+
runs = "scope"
|
|
74
|
+
needs = ["build"]
|
|
75
|
+
summary = "Validates every built page with html-validate."
|
|
76
|
+
why = "Templates can each be valid and still join into a page with two main elements or a missing label."
|
|
77
|
+
help = "Fix the template or the content that writes the markup the rule names."
|
|
78
|
+
|
|
79
|
+
[[check]]
|
|
80
|
+
name = "purgecss"
|
|
81
|
+
tool = "purgecss"
|
|
82
|
+
example = "A built stylesheet containing `.unused-banner` that no scanned HTML or script uses reports an unused selector. Delete the unused rule. For a class added at runtime, declare the actual class in the configured safelist with a reason."
|
|
83
|
+
level = "recommended"
|
|
84
|
+
stage = "push"
|
|
85
|
+
runs = "scope"
|
|
86
|
+
needs = ["build"]
|
|
87
|
+
summary = "Finds selectors of the built stylesheets that no built page or script uses."
|
|
88
|
+
why = "A selector nobody uses is downloaded by every visitor and read by every maintainer."
|
|
89
|
+
help = "Delete the rule, or list a name a script adds at run time under tools.purgecss.safelist with a reason."
|
|
90
|
+
|
|
91
|
+
[[check]]
|
|
92
|
+
name = "linkinator"
|
|
93
|
+
tool = "linkinator"
|
|
94
|
+
example = "A built page linking to `/missing/` reports a missing destination when no such page exists. Point the source link at an existing page or add the intended page, then rebuild."
|
|
95
|
+
level = "recommended"
|
|
96
|
+
stage = "push"
|
|
97
|
+
runs = "scope"
|
|
98
|
+
needs = ["build"]
|
|
99
|
+
summary = "Serves the built site and follows every link between its pages, stylesheets, and fragments."
|
|
100
|
+
why = "A broken internal link is a dead end a visitor finds before the author does."
|
|
101
|
+
help = "Fix the link, or the page it points at."
|
|
102
|
+
|
|
103
|
+
[[check]]
|
|
104
|
+
name = "linkinator-external"
|
|
105
|
+
tool = "linkinator"
|
|
106
|
+
example = "A built link to an external URL that responds with HTTP 404 reports a link failure. Replace it with the verified destination or remove the obsolete link, then rerun with network access."
|
|
107
|
+
level = "recommended"
|
|
108
|
+
stage = "manual"
|
|
109
|
+
runs = "scope"
|
|
110
|
+
needs = ["network"]
|
|
111
|
+
summary = "Follows every link of the built site, the ones that leave it included."
|
|
112
|
+
why = "Other sites move their pages, and a link nobody rechecks rots."
|
|
113
|
+
help = "Update the link, or allow its URL under docs.allowed_urls with a reason."
|
|
114
|
+
|
|
115
|
+
[[check]]
|
|
116
|
+
name = "size"
|
|
117
|
+
example = "A built page larger than its configured byte ceiling reports its measured size. Remove unused assets or reduce the page payload, rebuild, and rerun to verify it fits the ceiling."
|
|
118
|
+
level = "recommended"
|
|
119
|
+
when = { setting = "site.size_limit" }
|
|
120
|
+
stage = "push"
|
|
121
|
+
runs = "scope"
|
|
122
|
+
needs = ["build"]
|
|
123
|
+
summary = "Sums the compressed weight of the built paths each ceiling in site.size_limit names."
|
|
124
|
+
why = "Weight arrives a kilobyte at a time, and only a ceiling notices."
|
|
125
|
+
help = "Remove what the page does not need, or raise the ceiling with a reason."
|
|
126
|
+
|
|
127
|
+
[[check]]
|
|
128
|
+
name = "sitemap"
|
|
129
|
+
example = "A sitemap entry for `/removed/` with no corresponding built page reports a stale entry. Remove that entry from the sitemap source and rebuild. Add missing public pages to the sitemap instead of excluding them without a reason."
|
|
130
|
+
level = "recommended"
|
|
131
|
+
stage = "push"
|
|
132
|
+
runs = "scope"
|
|
133
|
+
needs = ["build"]
|
|
134
|
+
summary = "Compares the sitemap with the built pages: every listed route is a page, and every page is listed."
|
|
135
|
+
why = "A page outside the sitemap is found late by search engines, and a listed page that does not exist costs trust with them."
|
|
136
|
+
help = "Add the page to the sitemap, remove the dead entry, or leave a page out under site.allowed_unlisted_pages."
|
|
137
|
+
|
|
138
|
+
[[check]]
|
|
139
|
+
name = "unused-assets"
|
|
140
|
+
example = "An image in the build folder that no built page or stylesheet references reports an unused asset. Remove it from the source asset set and rebuild."
|
|
141
|
+
level = "all"
|
|
142
|
+
stage = "push"
|
|
143
|
+
runs = "scope"
|
|
144
|
+
files = { paths = ["**/*"], kinds = ["source", "binary"] }
|
|
145
|
+
summary = "Finds files under an assets folder that no page, stylesheet, or script names."
|
|
146
|
+
why = "An asset nobody references ships with every deploy and is kept by everyone who fears deleting it."
|
|
147
|
+
help = "Delete the file."
|
|
148
|
+
|
|
149
|
+
[[check]]
|
|
150
|
+
name = "svgo"
|
|
151
|
+
tool = "svgo"
|
|
152
|
+
example = "An SVG containing removable editor metadata differs from optimized output. Run the configured SVGO formatter on its source, inspect the result, and rebuild before checking again."
|
|
153
|
+
level = "recommended"
|
|
154
|
+
stage = "commit"
|
|
155
|
+
files = { extensions = [".svg"] }
|
|
156
|
+
fix = ["svgo", "--quiet", "{files}"]
|
|
157
|
+
summary = "Reports SVG byte reductions above tools.svgo.min_saving_percent, which defaults to 10 at level `recommended` and 0 at level `all`."
|
|
158
|
+
why = "An SVG straight from an editor carries metadata and precision a browser never needs."
|
|
159
|
+
help = "Run svgo over the file."
|
|
160
|
+
|
|
161
|
+
[[check]]
|
|
162
|
+
name = "webmanifest"
|
|
163
|
+
example = "A web manifest referencing `icon-192.png` reports a missing icon when no such file sits beside the manifest. Add the icon to the build or correct the manifest path, then rebuild."
|
|
164
|
+
level = "recommended"
|
|
165
|
+
stage = "commit"
|
|
166
|
+
runs = "scope"
|
|
167
|
+
files = { extensions = [".webmanifest", ".html", ".htm", ".json"] }
|
|
168
|
+
summary = "Checks that the web manifest parses, names the app, and lists icons that exist."
|
|
169
|
+
why = "A manifest with a missing icon installs an app with a blank tile."
|
|
170
|
+
help = "Correct the manifest, or add the icon."
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Static Site
|
|
2
|
+
|
|
3
|
+
Rules for a repository that produces HTML for a content delivery network (CDN) or an edge platform.
|
|
4
|
+
|
|
5
|
+
## Build
|
|
6
|
+
|
|
7
|
+
Escape every value the build writes into HTML. Keep public paths and internal links consistent
|
|
8
|
+
with the deployed site.
|
|
9
|
+
|
|
10
|
+
## Templates and browser assets
|
|
11
|
+
|
|
12
|
+
Templates and root HTML files stay declarative.
|
|
13
|
+
|
|
14
|
+
- Browser scripts check that required elements exist before binding behavior and do not
|
|
15
|
+
swallow programming errors.
|
|
16
|
+
- A plain script has no module system, so it uses no `import`. A module script resolves imports
|
|
17
|
+
as URLs or through an import map, and names the resource the server serves.
|
|
18
|
+
- Use the DOM in browser code. Browsers lack Node built-ins, so reject a `node:` import. Use the APIs
|
|
19
|
+
the declared browser support allows.
|
|
20
|
+
- Build navigation and fetch URLs from values the application controls.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommended": {
|
|
3
|
+
"package": "eslint-plugin-svelte",
|
|
4
|
+
"version": "3.23.0",
|
|
5
|
+
"source": "configs.recommended",
|
|
6
|
+
"blocks": [
|
|
7
|
+
{ "parser": false },
|
|
8
|
+
{
|
|
9
|
+
"files": ["*.svelte", "**/*.svelte"],
|
|
10
|
+
"parser": true,
|
|
11
|
+
"rules": {
|
|
12
|
+
"no-inner-declarations": "off",
|
|
13
|
+
"no-self-assign": "off",
|
|
14
|
+
"svelte/comment-directive": "error",
|
|
15
|
+
"svelte/system": "error"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"files": ["*.svelte.js", "*.svelte.ts", "**/*.svelte.js", "**/*.svelte.ts"],
|
|
20
|
+
"parser": true,
|
|
21
|
+
"rules": {}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"parser": false,
|
|
25
|
+
"rules": {
|
|
26
|
+
"svelte/comment-directive": "error",
|
|
27
|
+
"svelte/infinite-reactive-loop": "error",
|
|
28
|
+
"svelte/no-at-debug-tags": "warn",
|
|
29
|
+
"svelte/no-at-html-tags": "error",
|
|
30
|
+
"svelte/no-dom-manipulating": "error",
|
|
31
|
+
"svelte/no-dupe-else-if-blocks": "error",
|
|
32
|
+
"svelte/no-dupe-on-directives": "error",
|
|
33
|
+
"svelte/no-dupe-style-properties": "error",
|
|
34
|
+
"svelte/no-dupe-use-directives": "error",
|
|
35
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
36
|
+
"svelte/no-immutable-reactive-statements": "error",
|
|
37
|
+
"svelte/no-inner-declarations": "error",
|
|
38
|
+
"svelte/no-inspect": "warn",
|
|
39
|
+
"svelte/no-navigation-without-resolve": "error",
|
|
40
|
+
"svelte/no-not-function-handler": "error",
|
|
41
|
+
"svelte/no-object-in-text-mustaches": "error",
|
|
42
|
+
"svelte/no-raw-special-elements": "error",
|
|
43
|
+
"svelte/no-reactive-functions": "error",
|
|
44
|
+
"svelte/no-reactive-literals": "error",
|
|
45
|
+
"svelte/no-reactive-reassign": "error",
|
|
46
|
+
"svelte/no-shorthand-style-property-overrides": "error",
|
|
47
|
+
"svelte/no-store-async": "error",
|
|
48
|
+
"svelte/no-svelte-internal": "error",
|
|
49
|
+
"svelte/no-unknown-style-directive-property": "error",
|
|
50
|
+
"svelte/no-unnecessary-state-wrap": "error",
|
|
51
|
+
"svelte/no-unused-props": "error",
|
|
52
|
+
"svelte/no-unused-svelte-ignore": "error",
|
|
53
|
+
"svelte/no-useless-children-snippet": "error",
|
|
54
|
+
"svelte/no-useless-mustaches": "error",
|
|
55
|
+
"svelte/prefer-svelte-reactivity": "error",
|
|
56
|
+
"svelte/prefer-writable-derived": "error",
|
|
57
|
+
"svelte/require-each-key": "error",
|
|
58
|
+
"svelte/require-event-dispatcher-types": "error",
|
|
59
|
+
"svelte/require-store-reactive-access": "error",
|
|
60
|
+
"svelte/system": "error",
|
|
61
|
+
"svelte/valid-each-key": "error",
|
|
62
|
+
"svelte/valid-prop-names-in-kit-pages": "error"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
[configuration]
|
|
4
|
+
title = "Svelte"
|
|
5
|
+
requires = ["javascript"]
|
|
6
|
+
suggests = ["typescript", "css"]
|
|
7
|
+
description = "ESLint checks Svelte markup and scripts. DOM manipulation and event-dispatcher typing rules run at level all; HTML injection checks run at both levels."
|
|
8
|
+
|
|
9
|
+
[detect]
|
|
10
|
+
dependencies = ["svelte"]
|
|
11
|
+
extensions = [".svelte"]
|
|
12
|
+
|
|
13
|
+
[files]
|
|
14
|
+
extensions = [".svelte"]
|
|
15
|
+
filenames = ["svelte.config.js", "svelte.config.ts"]
|
|
16
|
+
|
|
17
|
+
[[tool]]
|
|
18
|
+
name = "eslint-plugin-svelte"
|
|
19
|
+
rule_prefix = "svelte"
|
|
20
|
+
kind = "library"
|
|
21
|
+
version = "3.23.0"
|
|
22
|
+
npm = "eslint-plugin-svelte"
|
|
23
|
+
|
|
24
|
+
[tool.eslint]
|
|
25
|
+
extensions = [".svelte"]
|
|
26
|
+
|
|
27
|
+
[[tool]]
|
|
28
|
+
name = "svelte-eslint-parser"
|
|
29
|
+
kind = "library"
|
|
30
|
+
version = "1.8.1"
|
|
31
|
+
npm = "svelte-eslint-parser"
|
|
32
|
+
|
|
33
|
+
[[tool]]
|
|
34
|
+
name = "svelte-check"
|
|
35
|
+
version = "4.7.6"
|
|
36
|
+
npm = "svelte-check"
|
|
37
|
+
|
|
38
|
+
[[tool]]
|
|
39
|
+
name = "prettier-plugin-svelte"
|
|
40
|
+
kind = "library"
|
|
41
|
+
version = "4.1.1"
|
|
42
|
+
npm = "prettier-plugin-svelte"
|
|
43
|
+
|
|
44
|
+
[tool.prettier]
|
|
45
|
+
entry = "plugin.js"
|
|
46
|
+
extensions = [".svelte"]
|
|
47
|
+
|
|
48
|
+
[[tool.prettier.overrides]]
|
|
49
|
+
files = "*.svelte"
|
|
50
|
+
|
|
51
|
+
[tool.prettier.overrides.options]
|
|
52
|
+
embeddedLanguageFormatting = "auto"
|
|
53
|
+
|
|
54
|
+
[[check]]
|
|
55
|
+
name = "svelte-check"
|
|
56
|
+
tool = "svelte-check"
|
|
57
|
+
example = "A component containing `<img src={source} />` reports `a11y_missing_attribute`. Give the image a text alternative, such as `<img src={source} alt={caption} />`."
|
|
58
|
+
level = "recommended"
|
|
59
|
+
stage = "push"
|
|
60
|
+
runs = "scope"
|
|
61
|
+
instead_of = "typescript/tsc"
|
|
62
|
+
summary = "Runs svelte-check over the scope: the warnings of the Svelte compiler, its accessibility warnings, and the types of every component and TypeScript file."
|
|
63
|
+
why = "The TypeScript compiler cannot read a component file, and the Svelte compiler warns about markup that no browser reports."
|
|
64
|
+
help = "Read the warning or error svelte-check prints for the file and fix it there; a warning fails the check as an error does."
|
|
65
|
+
|
|
66
|
+
[check.files]
|
|
67
|
+
extensions = [".svelte"]
|
|
68
|
+
|
|
69
|
+
[eslint]
|
|
70
|
+
all_level_rules = ["svelte/no-useless-mustaches", "svelte/prefer-const", "svelte/no-dom-manipulating", "svelte/require-event-dispatcher-types"]
|
|
71
|
+
|
|
72
|
+
[eslint.presets.recommended]
|
|
73
|
+
package = "eslint-plugin-svelte"
|
|
74
|
+
source = "configs.recommended"
|
|
75
|
+
|
|
76
|
+
[defaults]
|
|
77
|
+
"tools.eslint.import_extension" = "extensionless"
|
|
78
|
+
|
|
79
|
+
[[tool_file]]
|
|
80
|
+
target = ".gspot/config/eslint.config.mjs"
|
|
81
|
+
tool = "eslint"
|
|
82
|
+
fragment = true
|
|
83
|
+
required_tools = ["eslint-plugin-svelte", "svelte-eslint-parser"]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Svelte
|
|
2
|
+
|
|
3
|
+
These rules cover Svelte 5 components, runes, props and events, markup, and data loading in SvelteKit.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
<!-- level: all -->
|
|
8
|
+
|
|
9
|
+
- Use `$derived` for values used in markup.
|
|
10
|
+
- Pass a prop or callback instead of changing state through `bind:this`.
|
|
11
|
+
|
|
12
|
+
## Runes and reactivity
|
|
13
|
+
|
|
14
|
+
- Use `$state` for a value that changes and `$derived` for a value computed from others.
|
|
15
|
+
- Use `$effect` for work outside Svelte: a request, a timer, storage, the DOM. Do not use it to derive state.
|
|
16
|
+
- An `$effect` that starts something returns a function that stops it.
|
|
17
|
+
- Keep derived expressions free of side effects. Do not mutate state while computing a derivation.
|
|
18
|
+
- Temporarily override a mutable `$derived` value for optimistic UI only in Svelte 5.25 and later.
|
|
19
|
+
Reconcile it with the authoritative result and restore the prior value when the operation fails.
|
|
20
|
+
- Do not mix runes with `$:` statements or `export let` inside one component.
|
|
21
|
+
Components using different supported modes can coexist during a migration.
|
|
22
|
+
|
|
23
|
+
## Props and events
|
|
24
|
+
|
|
25
|
+
- Declare props through `$props()` with a type. Require a prop when it has no sensible default.
|
|
26
|
+
- Never mutate a prop object. Call a callback prop, or use `$bindable` for a two-way value.
|
|
27
|
+
|
|
28
|
+
### Callback naming
|
|
29
|
+
|
|
30
|
+
<!-- level: all -->
|
|
31
|
+
|
|
32
|
+
Name a callback prop for what happened: `onsave`, `onclose`.
|
|
33
|
+
|
|
34
|
+
## Data loading and the server
|
|
35
|
+
|
|
36
|
+
- Load data in `load` functions, never in `onMount` for a page that can render on the server.
|
|
37
|
+
- Code under `$lib/server` and in `+page.server` files stays on the server. Do not import it from a component.
|
|
38
|
+
- Read a secret from `$env/static/private` or `$env/dynamic/private`, and only on the server.
|
|
39
|
+
- A form posts to a form action and works with JavaScript off. Enhance it, do not replace it.
|
|
40
|
+
|
|
41
|
+
## Accessibility
|
|
42
|
+
|
|
43
|
+
- Fix the compiler's accessibility warnings. Suppress one only with a reason.
|
|
44
|
+
|
|
45
|
+
## References
|
|
46
|
+
|
|
47
|
+
- [Derived state and temporary overrides](https://svelte.dev/docs/svelte/$derived).
|
|
48
|
+
- [Svelte 5 migration and component modes](https://svelte.dev/docs/svelte/v5-migration-guide).
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommended": {
|
|
3
|
+
"package": "eslint-plugin-vue",
|
|
4
|
+
"version": "10.11.0",
|
|
5
|
+
"source": "configs.flat/recommended",
|
|
6
|
+
"blocks": [
|
|
7
|
+
{ "parser": false },
|
|
8
|
+
{
|
|
9
|
+
"files": ["*.vue", "**/*.vue"],
|
|
10
|
+
"parser": true,
|
|
11
|
+
"rules": { "vue/comment-directive": "error", "vue/jsx-uses-vars": "error" }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"parser": false,
|
|
15
|
+
"rules": {
|
|
16
|
+
"vue/multi-word-component-names": "error",
|
|
17
|
+
"vue/no-arrow-functions-in-watch": "error",
|
|
18
|
+
"vue/no-async-in-computed-properties": "error",
|
|
19
|
+
"vue/no-child-content": "error",
|
|
20
|
+
"vue/no-computed-properties-in-data": "error",
|
|
21
|
+
"vue/no-deprecated-data-object-declaration": "error",
|
|
22
|
+
"vue/no-deprecated-delete-set": "error",
|
|
23
|
+
"vue/no-deprecated-destroyed-lifecycle": "error",
|
|
24
|
+
"vue/no-deprecated-dollar-listeners-api": "error",
|
|
25
|
+
"vue/no-deprecated-dollar-scopedslots-api": "error",
|
|
26
|
+
"vue/no-deprecated-events-api": "error",
|
|
27
|
+
"vue/no-deprecated-filter": "error",
|
|
28
|
+
"vue/no-deprecated-functional-template": "error",
|
|
29
|
+
"vue/no-deprecated-html-element-is": "error",
|
|
30
|
+
"vue/no-deprecated-inline-template": "error",
|
|
31
|
+
"vue/no-deprecated-model-definition": "error",
|
|
32
|
+
"vue/no-deprecated-props-default-this": "error",
|
|
33
|
+
"vue/no-deprecated-router-link-tag-prop": "error",
|
|
34
|
+
"vue/no-deprecated-scope-attribute": "error",
|
|
35
|
+
"vue/no-deprecated-slot-attribute": "error",
|
|
36
|
+
"vue/no-deprecated-slot-scope-attribute": "error",
|
|
37
|
+
"vue/no-deprecated-v-bind-sync": "error",
|
|
38
|
+
"vue/no-deprecated-v-is": "error",
|
|
39
|
+
"vue/no-deprecated-v-on-native-modifier": "error",
|
|
40
|
+
"vue/no-deprecated-v-on-number-modifiers": "error",
|
|
41
|
+
"vue/no-deprecated-vue-config-keycodes": "error",
|
|
42
|
+
"vue/no-dupe-keys": "error",
|
|
43
|
+
"vue/no-dupe-v-else-if": "error",
|
|
44
|
+
"vue/no-duplicate-attributes": "error",
|
|
45
|
+
"vue/no-export-in-script-setup": "error",
|
|
46
|
+
"vue/no-expose-after-await": "error",
|
|
47
|
+
"vue/no-lifecycle-after-await": "error",
|
|
48
|
+
"vue/no-mutating-props": "error",
|
|
49
|
+
"vue/no-parsing-error": "error",
|
|
50
|
+
"vue/no-ref-as-operand": "error",
|
|
51
|
+
"vue/no-reserved-component-names": "error",
|
|
52
|
+
"vue/no-reserved-keys": "error",
|
|
53
|
+
"vue/no-reserved-props": "error",
|
|
54
|
+
"vue/no-shared-component-data": "error",
|
|
55
|
+
"vue/no-side-effects-in-computed-properties": "error",
|
|
56
|
+
"vue/no-template-key": "error",
|
|
57
|
+
"vue/no-textarea-mustache": "error",
|
|
58
|
+
"vue/no-unused-components": "error",
|
|
59
|
+
"vue/no-unused-vars": "error",
|
|
60
|
+
"vue/no-use-computed-property-like-method": "error",
|
|
61
|
+
"vue/no-use-v-if-with-v-for": "error",
|
|
62
|
+
"vue/no-useless-template-attributes": "error",
|
|
63
|
+
"vue/no-v-for-template-key-on-child": "error",
|
|
64
|
+
"vue/no-v-text-v-html-on-component": "error",
|
|
65
|
+
"vue/no-watch-after-await": "error",
|
|
66
|
+
"vue/prefer-import-from-vue": "error",
|
|
67
|
+
"vue/require-component-is": "error",
|
|
68
|
+
"vue/require-prop-type-constructor": "error",
|
|
69
|
+
"vue/require-render-return": "error",
|
|
70
|
+
"vue/require-slots-as-functions": "error",
|
|
71
|
+
"vue/require-toggle-inside-transition": "error",
|
|
72
|
+
"vue/require-v-for-key": "error",
|
|
73
|
+
"vue/require-valid-default-prop": "error",
|
|
74
|
+
"vue/return-in-computed-property": "error",
|
|
75
|
+
"vue/return-in-emits-validator": "error",
|
|
76
|
+
"vue/use-v-on-exact": "error",
|
|
77
|
+
"vue/valid-attribute-name": "error",
|
|
78
|
+
"vue/valid-define-emits": "error",
|
|
79
|
+
"vue/valid-define-options": "error",
|
|
80
|
+
"vue/valid-define-props": "error",
|
|
81
|
+
"vue/valid-next-tick": "error",
|
|
82
|
+
"vue/valid-template-root": "error",
|
|
83
|
+
"vue/valid-v-bind": "error",
|
|
84
|
+
"vue/valid-v-cloak": "error",
|
|
85
|
+
"vue/valid-v-else-if": "error",
|
|
86
|
+
"vue/valid-v-else": "error",
|
|
87
|
+
"vue/valid-v-for": "error",
|
|
88
|
+
"vue/valid-v-html": "error",
|
|
89
|
+
"vue/valid-v-if": "error",
|
|
90
|
+
"vue/valid-v-is": "error",
|
|
91
|
+
"vue/valid-v-memo": "error",
|
|
92
|
+
"vue/valid-v-model": "error",
|
|
93
|
+
"vue/valid-v-on": "error",
|
|
94
|
+
"vue/valid-v-once": "error",
|
|
95
|
+
"vue/valid-v-pre": "error",
|
|
96
|
+
"vue/valid-v-show": "error",
|
|
97
|
+
"vue/valid-v-slot": "error",
|
|
98
|
+
"vue/valid-v-text": "error"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"parser": false,
|
|
103
|
+
"rules": {
|
|
104
|
+
"vue/attribute-hyphenation": "warn",
|
|
105
|
+
"vue/component-definition-name-casing": "warn",
|
|
106
|
+
"vue/first-attribute-linebreak": "warn",
|
|
107
|
+
"vue/html-closing-bracket-newline": "warn",
|
|
108
|
+
"vue/html-closing-bracket-spacing": "warn",
|
|
109
|
+
"vue/html-end-tags": "warn",
|
|
110
|
+
"vue/html-indent": "warn",
|
|
111
|
+
"vue/html-quotes": "warn",
|
|
112
|
+
"vue/html-self-closing": "warn",
|
|
113
|
+
"vue/max-attributes-per-line": "warn",
|
|
114
|
+
"vue/multiline-html-element-content-newline": "warn",
|
|
115
|
+
"vue/mustache-interpolation-spacing": "warn",
|
|
116
|
+
"vue/no-multi-spaces": "warn",
|
|
117
|
+
"vue/no-spaces-around-equal-signs-in-attribute": "warn",
|
|
118
|
+
"vue/no-template-shadow": "warn",
|
|
119
|
+
"vue/one-component-per-file": "warn",
|
|
120
|
+
"vue/prop-name-casing": "warn",
|
|
121
|
+
"vue/require-default-prop": "warn",
|
|
122
|
+
"vue/require-explicit-emits": "warn",
|
|
123
|
+
"vue/require-prop-types": "warn",
|
|
124
|
+
"vue/singleline-html-element-content-newline": "warn",
|
|
125
|
+
"vue/v-bind-style": "warn",
|
|
126
|
+
"vue/v-on-event-hyphenation": ["warn", "always", { "autofix": true }],
|
|
127
|
+
"vue/v-on-style": "warn",
|
|
128
|
+
"vue/v-slot-style": "warn"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"parser": false,
|
|
133
|
+
"rules": {
|
|
134
|
+
"vue/attributes-order": "warn",
|
|
135
|
+
"vue/block-order": "warn",
|
|
136
|
+
"vue/no-lone-template": "warn",
|
|
137
|
+
"vue/no-multiple-slot-args": "warn",
|
|
138
|
+
"vue/no-required-prop-with-default": "warn",
|
|
139
|
+
"vue/no-v-html": "warn",
|
|
140
|
+
"vue/order-in-components": "warn",
|
|
141
|
+
"vue/this-in-template": "warn"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"accessibility": {
|
|
147
|
+
"package": "eslint-plugin-vuejs-accessibility",
|
|
148
|
+
"version": "2.6.0",
|
|
149
|
+
"source": "configs.flat/recommended",
|
|
150
|
+
"blocks": [
|
|
151
|
+
{ "parser": false },
|
|
152
|
+
{
|
|
153
|
+
"files": ["*.vue", "**/*.vue"],
|
|
154
|
+
"parser": true,
|
|
155
|
+
"rules": {
|
|
156
|
+
"vuejs-accessibility/alt-text": "error",
|
|
157
|
+
"vuejs-accessibility/anchor-has-content": "error",
|
|
158
|
+
"vuejs-accessibility/aria-props": "error",
|
|
159
|
+
"vuejs-accessibility/aria-role": "error",
|
|
160
|
+
"vuejs-accessibility/aria-unsupported-elements": "error",
|
|
161
|
+
"vuejs-accessibility/click-events-have-key-events": "error",
|
|
162
|
+
"vuejs-accessibility/form-control-has-label": "error",
|
|
163
|
+
"vuejs-accessibility/heading-has-content": "error",
|
|
164
|
+
"vuejs-accessibility/iframe-has-title": "error",
|
|
165
|
+
"vuejs-accessibility/interactive-supports-focus": "error",
|
|
166
|
+
"vuejs-accessibility/label-has-for": "error",
|
|
167
|
+
"vuejs-accessibility/media-has-caption": "error",
|
|
168
|
+
"vuejs-accessibility/mouse-events-have-key-events": "error",
|
|
169
|
+
"vuejs-accessibility/no-access-key": "error",
|
|
170
|
+
"vuejs-accessibility/no-autofocus": "error",
|
|
171
|
+
"vuejs-accessibility/no-distracting-elements": "error",
|
|
172
|
+
"vuejs-accessibility/no-redundant-roles": "error",
|
|
173
|
+
"vuejs-accessibility/no-static-element-interactions": "error",
|
|
174
|
+
"vuejs-accessibility/role-has-required-aria-props": "error",
|
|
175
|
+
"vuejs-accessibility/tabindex-no-positive": "error"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
[configuration]
|
|
2
|
+
title = "Vue"
|
|
3
|
+
requires = ["javascript"]
|
|
4
|
+
suggests = ["typescript", "css"]
|
|
5
|
+
description = "ESLint checks Vue templates, scripts, and accessibility. Attribute spelling, component names, declarations, ordering, and default props wait for level all. HTML injection checks run at both levels."
|
|
6
|
+
|
|
7
|
+
[detect]
|
|
8
|
+
dependencies = ["vue"]
|
|
9
|
+
extensions = [".vue"]
|
|
10
|
+
|
|
11
|
+
[files]
|
|
12
|
+
extensions = [".vue"]
|
|
13
|
+
|
|
14
|
+
[[tool]]
|
|
15
|
+
name = "eslint-plugin-vue"
|
|
16
|
+
rule_prefix = "vue"
|
|
17
|
+
kind = "library"
|
|
18
|
+
version = "10.11.0"
|
|
19
|
+
npm = "eslint-plugin-vue"
|
|
20
|
+
|
|
21
|
+
[tool.eslint]
|
|
22
|
+
extensions = [".vue"]
|
|
23
|
+
|
|
24
|
+
[[tool]]
|
|
25
|
+
name = "vue-eslint-parser"
|
|
26
|
+
kind = "library"
|
|
27
|
+
version = "10.4.1"
|
|
28
|
+
npm = "vue-eslint-parser"
|
|
29
|
+
|
|
30
|
+
[[tool]]
|
|
31
|
+
name = "eslint-plugin-vuejs-accessibility"
|
|
32
|
+
rule_prefix = "vuejs-accessibility"
|
|
33
|
+
kind = "library"
|
|
34
|
+
version = "2.6.0"
|
|
35
|
+
npm = "eslint-plugin-vuejs-accessibility"
|
|
36
|
+
|
|
37
|
+
[[tool]]
|
|
38
|
+
name = "vue-tsc"
|
|
39
|
+
version = "3.3.11"
|
|
40
|
+
npm = "vue-tsc"
|
|
41
|
+
|
|
42
|
+
[[check]]
|
|
43
|
+
name = "vue-tsc"
|
|
44
|
+
example = "A component script containing `const count: number = 'one';` reports an incompatible assignment. Correct it to `const count: number = 1;` when the contract requires a number."
|
|
45
|
+
level = "recommended"
|
|
46
|
+
stage = "push"
|
|
47
|
+
runs = "scope"
|
|
48
|
+
cwd = "scope"
|
|
49
|
+
tool = "vue-tsc"
|
|
50
|
+
instead_of = "typescript/tsc"
|
|
51
|
+
summary = "Type-checks every Vue component and TypeScript file of the scope with the strict compiler options."
|
|
52
|
+
why = "The TypeScript compiler cannot read a component file, so a type error inside one ships unless the Vue checker reads it."
|
|
53
|
+
help = "Read the first error vue-tsc prints and fix that file; later errors are often the same mistake."
|
|
54
|
+
|
|
55
|
+
[check.when]
|
|
56
|
+
configuration = "typescript"
|
|
57
|
+
|
|
58
|
+
[check.files]
|
|
59
|
+
extensions = [".vue"]
|
|
60
|
+
|
|
61
|
+
[check.output]
|
|
62
|
+
format = "regex"
|
|
63
|
+
pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"
|
|
64
|
+
|
|
65
|
+
[eslint]
|
|
66
|
+
all_level_rules = ["vue/no-useless-v-bind", "vue/prefer-true-attribute-shorthand", "vue/attribute-hyphenation", "vue/attributes-order", "vue/block-order", "vue/component-api-style", "vue/component-definition-name-casing", "vue/define-emits-declaration", "vue/define-props-declaration", "vue/multi-word-component-names", "vue/one-component-per-file", "vue/order-in-components", "vue/prop-name-casing", "vue/require-default-prop", "vue/this-in-template", "vue/v-bind-style", "vue/v-on-event-hyphenation", "vue/v-on-style", "vue/v-slot-style"]
|
|
67
|
+
|
|
68
|
+
[eslint.presets.recommended]
|
|
69
|
+
package = "eslint-plugin-vue"
|
|
70
|
+
source = "configs.flat/recommended"
|
|
71
|
+
|
|
72
|
+
[eslint.presets.accessibility]
|
|
73
|
+
package = "eslint-plugin-vuejs-accessibility"
|
|
74
|
+
source = "configs.flat/recommended"
|
|
75
|
+
|
|
76
|
+
[defaults]
|
|
77
|
+
"tools.eslint.import_extension" = "extensionless"
|
|
78
|
+
|
|
79
|
+
[[tool_file]]
|
|
80
|
+
target = ".gspot/config/eslint.config.mjs"
|
|
81
|
+
tool = "eslint"
|
|
82
|
+
fragment = true
|
|
83
|
+
required_tools = ["eslint-plugin-vue", "vue-eslint-parser", "eslint-plugin-vuejs-accessibility"]
|