@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,98 @@
|
|
|
1
|
+
allowed_words = ["CSS"]
|
|
2
|
+
[configuration]
|
|
3
|
+
title = "CSS"
|
|
4
|
+
description = "CSS files and the style blocks of Vue and Svelte components: Stylelint with the standard rules, Prettier for layout, and CSS module classes that are both defined and used. SCSS receives formatting only."
|
|
5
|
+
|
|
6
|
+
[detect]
|
|
7
|
+
extensions = [".css", ".vue", ".svelte"]
|
|
8
|
+
|
|
9
|
+
[files]
|
|
10
|
+
extensions = [".css"]
|
|
11
|
+
|
|
12
|
+
[[tool]]
|
|
13
|
+
name = "stylelint"
|
|
14
|
+
suppression = { marker = "^(?:/\\*|//)\\s*stylelint-disable(?:-next-line|-line)?(?=\\s|$)", reason = " -- (?<reason>\\S(?:[\\s\\S]*?\\S)?)\\s*(?:\\*/)?$" }
|
|
15
|
+
version = "16.23.1"
|
|
16
|
+
npm = "stylelint"
|
|
17
|
+
[[tool.replace]]
|
|
18
|
+
file = ".stylelintrc"
|
|
19
|
+
shared = false
|
|
20
|
+
|
|
21
|
+
[[tool.replace]]
|
|
22
|
+
file = ".stylelintrc.json"
|
|
23
|
+
shared = false
|
|
24
|
+
|
|
25
|
+
[[tool.replace]]
|
|
26
|
+
file = ".stylelintrc.js"
|
|
27
|
+
shared = false
|
|
28
|
+
|
|
29
|
+
[[tool.replace]]
|
|
30
|
+
file = ".stylelintrc.cjs"
|
|
31
|
+
shared = false
|
|
32
|
+
|
|
33
|
+
[[tool.replace]]
|
|
34
|
+
file = ".stylelintrc.mjs"
|
|
35
|
+
shared = false
|
|
36
|
+
|
|
37
|
+
[[tool.replace]]
|
|
38
|
+
file = ".stylelintrc.yml"
|
|
39
|
+
shared = false
|
|
40
|
+
|
|
41
|
+
[[tool.replace]]
|
|
42
|
+
file = ".stylelintrc.yaml"
|
|
43
|
+
shared = false
|
|
44
|
+
|
|
45
|
+
[[tool.replace]]
|
|
46
|
+
file = "stylelint.config.js"
|
|
47
|
+
shared = false
|
|
48
|
+
|
|
49
|
+
[[tool.replace]]
|
|
50
|
+
file = "stylelint.config.cjs"
|
|
51
|
+
shared = false
|
|
52
|
+
|
|
53
|
+
[[tool.replace]]
|
|
54
|
+
file = "stylelint.config.mjs"
|
|
55
|
+
shared = false
|
|
56
|
+
|
|
57
|
+
[[tool.replace]]
|
|
58
|
+
file = "package.json"
|
|
59
|
+
key = "stylelint"
|
|
60
|
+
redirect = true
|
|
61
|
+
shared = true
|
|
62
|
+
|
|
63
|
+
[[tool]]
|
|
64
|
+
name = "stylelint-config-standard"
|
|
65
|
+
kind = "library"
|
|
66
|
+
version = "39.0.0"
|
|
67
|
+
npm = "stylelint-config-standard"
|
|
68
|
+
|
|
69
|
+
[[tool]]
|
|
70
|
+
name = "postcss-html"
|
|
71
|
+
kind = "library"
|
|
72
|
+
version = "2.0.0"
|
|
73
|
+
npm = "postcss-html"
|
|
74
|
+
|
|
75
|
+
[[tool_file]]
|
|
76
|
+
target = ".gspot/config/stylelint.json"
|
|
77
|
+
tool = "stylelint"
|
|
78
|
+
rule_keys = ["rules"]
|
|
79
|
+
per_scope = true
|
|
80
|
+
pointer = { path = ".stylelintrc.json", body = "{\n \"extends\": \"{target}\"\n}\n" }
|
|
81
|
+
|
|
82
|
+
[[check]]
|
|
83
|
+
name = "stylelint"
|
|
84
|
+
tool = ["stylelint", "stylelint-config-standard"]
|
|
85
|
+
example = "The declaration `color: #ggg` uses an invalid hexadecimal color and reports a Stylelint finding. Replace it with a valid intended color such as `#abc`."
|
|
86
|
+
level = "recommended"
|
|
87
|
+
stage = "commit"
|
|
88
|
+
command = ["stylelint", "--config", "{tool_file:stylelint}", "--config-basedir", "{root}/.gspot", "--formatter", "unix", "--allow-empty-input", "{files}"]
|
|
89
|
+
fix = ["stylelint", "--config", "{tool_file:stylelint}", "--config-basedir", "{root}/.gspot", "--fix", "--allow-empty-input", "{files}"]
|
|
90
|
+
exit_codes = [2]
|
|
91
|
+
files = { extensions = [".css", ".vue", ".svelte"] }
|
|
92
|
+
output = { format = "regex", pattern = "^(?<file>.+?):(?<line>\\d+):(?<column>\\d+): (?<message>.*) \\((?<rule>[\\w/@-]+)\\) \\[\\w+\\]$" }
|
|
93
|
+
summary = "Lints every stylesheet with the standard stylelint rules: unknown properties, overridden selectors, and invalid values."
|
|
94
|
+
why = "A browser skips a declaration it cannot read without a word, so a typo in a property ships as a missing style."
|
|
95
|
+
help = "Run gspot check --fix for the rules that fix themselves. Turn one rule off with gspot ignore css/stylelint --rule `<name>` --reason \"`<why>`\"."
|
|
96
|
+
|
|
97
|
+
[rules]
|
|
98
|
+
"TAILWIND.md" = { dependencies = ["tailwindcss"] }
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# CSS
|
|
2
|
+
|
|
3
|
+
## Correctness and accessibility
|
|
4
|
+
|
|
5
|
+
- Use logical properties where layout follows the writing direction.
|
|
6
|
+
- Use relative units and wrapping so long text and large fonts fit.
|
|
7
|
+
|
|
8
|
+
## Structure
|
|
9
|
+
|
|
10
|
+
<!-- level: all -->
|
|
11
|
+
|
|
12
|
+
- Keep shared color, spacing, type, radius, and motion tokens in one owner.
|
|
13
|
+
- Keep feature styles with their component or import them through the stylesheet entry.
|
|
14
|
+
- Order rules from general styles to component states.
|
|
15
|
+
|
|
16
|
+
## Selectors and layout
|
|
17
|
+
|
|
18
|
+
<!-- level: all -->
|
|
19
|
+
|
|
20
|
+
- Prefer class selectors with low specificity.
|
|
21
|
+
- Prefer grid and flexbox for layout. Keep flow content in normal document flow.
|
|
22
|
+
|
|
23
|
+
## Files
|
|
24
|
+
|
|
25
|
+
<!-- level: all -->
|
|
26
|
+
|
|
27
|
+
- Keep presentation in stylesheets or framework-owned component style blocks.
|
|
28
|
+
- Let the framework own style scoping rather than duplicating selectors manually.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# CSS Naming
|
|
2
|
+
|
|
3
|
+
## Selector and file names
|
|
4
|
+
|
|
5
|
+
<!-- level: all -->
|
|
6
|
+
|
|
7
|
+
- Name classes for the component or state, such as `order-card`, `order-card-title`, `is-active`, or `has-error`.
|
|
8
|
+
- A state class starts with `is-` or `has-`. A script toggles it. Never style it alone.
|
|
9
|
+
- Custom properties name the role of the value, not its appearance:
|
|
10
|
+
`--color-surface`, `--space-2`, `--font-size-body`, never `--blue` or `--big-margin`.
|
|
11
|
+
- Theme overrides reuse the same property names under a theme selector; they never introduce
|
|
12
|
+
theme-specific property names.
|
|
13
|
+
- Keyframe names describe the motion, such as `fade-in` or `slide-from-start`.
|
|
14
|
+
- Name stylesheet files for what they hold such as `order-card.css`,
|
|
15
|
+
`tokens.css`, `layout.css`.
|
|
16
|
+
- Utility classes, when the project uses a utility system, keep that system's names; hand-written
|
|
17
|
+
do not add utilities beside it.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Tailwind CSS
|
|
2
|
+
|
|
3
|
+
## Generated styles
|
|
4
|
+
|
|
5
|
+
- Verify that source detection covers templates and content containing class names. Tailwind CSS 4
|
|
6
|
+
detects sources automatically; register excluded sources with `@source`. Tailwind CSS 3 uses
|
|
7
|
+
`content` configuration.
|
|
8
|
+
- Keep complete class names in source so the scanner can find them.
|
|
9
|
+
- Preserve the application's configured dark-mode strategy.
|
|
10
|
+
- When the project configures a class-ordering formatter plugin, let that formatter own ordering.
|
|
11
|
+
|
|
12
|
+
Use the [source detection documentation](https://tailwindcss.com/docs/detecting-classes-in-source-files)
|
|
13
|
+
for the installed major version.
|
|
14
|
+
|
|
15
|
+
## Styling conventions
|
|
16
|
+
|
|
17
|
+
<!-- level: all -->
|
|
18
|
+
|
|
19
|
+
- Use theme tokens for colors, spacing, radii, fonts, and breakpoints. Explain deliberate values
|
|
20
|
+
outside those tokens at their owner.
|
|
21
|
+
- Compose component styles with utility classes. Keep reusable theme and utility declarations
|
|
22
|
+
in their configured style owner.
|
|
23
|
+
- Use the project's adopted class-merging function when conditional utilities conflict.
|
|
24
|
+
Do not introduce a separate merging implementation.
|
|
25
|
+
- Avoid handwritten CSS that duplicates an existing utility without a component requirement.
|
|
26
|
+
- Follow the installed Tailwind version's syntax for custom utilities, variants, and plugins.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "stylelint-config-standard",
|
|
3
|
+
"version": "39.0.0",
|
|
4
|
+
"source": "resolveConfig.rules",
|
|
5
|
+
"rules": [
|
|
6
|
+
"alpha-value-notation",
|
|
7
|
+
"annotation-no-unknown",
|
|
8
|
+
"at-rule-descriptor-no-unknown",
|
|
9
|
+
"at-rule-descriptor-value-no-unknown",
|
|
10
|
+
"at-rule-empty-line-before",
|
|
11
|
+
"at-rule-no-deprecated",
|
|
12
|
+
"at-rule-no-unknown",
|
|
13
|
+
"at-rule-no-vendor-prefix",
|
|
14
|
+
"at-rule-prelude-no-invalid",
|
|
15
|
+
"block-no-empty",
|
|
16
|
+
"block-no-redundant-nested-style-rules",
|
|
17
|
+
"color-function-alias-notation",
|
|
18
|
+
"color-function-notation",
|
|
19
|
+
"color-hex-length",
|
|
20
|
+
"comment-empty-line-before",
|
|
21
|
+
"comment-no-empty",
|
|
22
|
+
"comment-whitespace-inside",
|
|
23
|
+
"container-name-pattern",
|
|
24
|
+
"custom-media-pattern",
|
|
25
|
+
"custom-property-empty-line-before",
|
|
26
|
+
"custom-property-no-missing-var-function",
|
|
27
|
+
"custom-property-pattern",
|
|
28
|
+
"declaration-block-no-duplicate-custom-properties",
|
|
29
|
+
"declaration-block-no-duplicate-properties",
|
|
30
|
+
"declaration-block-no-redundant-longhand-properties",
|
|
31
|
+
"declaration-block-no-shorthand-property-overrides",
|
|
32
|
+
"declaration-block-single-line-max-declarations",
|
|
33
|
+
"declaration-empty-line-before",
|
|
34
|
+
"declaration-property-value-keyword-no-deprecated",
|
|
35
|
+
"declaration-property-value-no-unknown",
|
|
36
|
+
"font-family-name-quotes",
|
|
37
|
+
"font-family-no-duplicate-names",
|
|
38
|
+
"font-family-no-missing-generic-family-keyword",
|
|
39
|
+
"function-calc-no-unspaced-operator",
|
|
40
|
+
"function-name-case",
|
|
41
|
+
"function-url-quotes",
|
|
42
|
+
"hue-degree-notation",
|
|
43
|
+
"import-notation",
|
|
44
|
+
"keyframe-block-no-duplicate-selectors",
|
|
45
|
+
"keyframe-declaration-no-important",
|
|
46
|
+
"keyframe-selector-notation",
|
|
47
|
+
"keyframes-name-pattern",
|
|
48
|
+
"layer-name-pattern",
|
|
49
|
+
"length-zero-no-unit",
|
|
50
|
+
"lightness-notation",
|
|
51
|
+
"media-feature-name-no-unknown",
|
|
52
|
+
"media-feature-name-no-vendor-prefix",
|
|
53
|
+
"media-feature-name-value-no-unknown",
|
|
54
|
+
"media-feature-range-notation",
|
|
55
|
+
"media-query-no-invalid",
|
|
56
|
+
"media-type-no-deprecated",
|
|
57
|
+
"named-grid-areas-no-invalid",
|
|
58
|
+
"nesting-selector-no-missing-scoping-root",
|
|
59
|
+
"no-descending-specificity",
|
|
60
|
+
"no-duplicate-at-import-rules",
|
|
61
|
+
"no-duplicate-selectors",
|
|
62
|
+
"no-empty-source",
|
|
63
|
+
"no-invalid-double-slash-comments",
|
|
64
|
+
"no-invalid-position-at-import-rule",
|
|
65
|
+
"no-invalid-position-declaration",
|
|
66
|
+
"no-irregular-whitespace",
|
|
67
|
+
"number-max-precision",
|
|
68
|
+
"property-no-deprecated",
|
|
69
|
+
"property-no-unknown",
|
|
70
|
+
"property-no-vendor-prefix",
|
|
71
|
+
"rule-empty-line-before",
|
|
72
|
+
"selector-anb-no-unmatchable",
|
|
73
|
+
"selector-attribute-quotes",
|
|
74
|
+
"selector-class-pattern",
|
|
75
|
+
"selector-id-pattern",
|
|
76
|
+
"selector-no-vendor-prefix",
|
|
77
|
+
"selector-not-notation",
|
|
78
|
+
"selector-pseudo-class-no-unknown",
|
|
79
|
+
"selector-pseudo-element-colon-notation",
|
|
80
|
+
"selector-pseudo-element-no-unknown",
|
|
81
|
+
"selector-type-case",
|
|
82
|
+
"selector-type-no-unknown",
|
|
83
|
+
"shorthand-property-no-redundant-values",
|
|
84
|
+
"string-no-newline",
|
|
85
|
+
"syntax-string-no-invalid",
|
|
86
|
+
"value-keyword-case",
|
|
87
|
+
"value-no-vendor-prefix"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
allowed_words = ["HTML"]
|
|
2
|
+
[configuration]
|
|
3
|
+
title = "HTML"
|
|
4
|
+
description = "HTML files: html-validate for structure and accessibility, no inline script or handler, and templates that hold placeholders in place of copy."
|
|
5
|
+
|
|
6
|
+
[files]
|
|
7
|
+
extensions = [".html", ".htm"]
|
|
8
|
+
|
|
9
|
+
[[tool]]
|
|
10
|
+
name = "html-validate"
|
|
11
|
+
suppression = { marker = "^<!--\\s*\\[?html-validate-disable(?:-next|-block)?(?=\\s|\\]|$)", reason = "(?: -- |: )(?<reason>\\S(?:[\\s\\S]*?\\S)?)\\s*\\]?\\s*(?:--!?>)?$" }
|
|
12
|
+
version = "11.6.1"
|
|
13
|
+
npm = "html-validate"
|
|
14
|
+
[[tool.replace]]
|
|
15
|
+
file = ".htmlvalidate.json"
|
|
16
|
+
shared = false
|
|
17
|
+
|
|
18
|
+
[[tool.replace]]
|
|
19
|
+
file = ".htmlvalidate.js"
|
|
20
|
+
shared = false
|
|
21
|
+
|
|
22
|
+
[[tool.replace]]
|
|
23
|
+
file = ".htmlvalidate.cjs"
|
|
24
|
+
shared = false
|
|
25
|
+
|
|
26
|
+
[[tool_file]]
|
|
27
|
+
target = ".gspot/config/html-validate-source.json"
|
|
28
|
+
tool = "html-validate"
|
|
29
|
+
check = "html/validate"
|
|
30
|
+
rule_keys = ["rules"]
|
|
31
|
+
|
|
32
|
+
[[check]]
|
|
33
|
+
name = "validate"
|
|
34
|
+
example = "An `<img src=\"logo.png\">` element without alternative text reports an accessibility finding under the configured rules. Add meaningful `alt` text, or an empty `alt` value for a decorative image."
|
|
35
|
+
level = "recommended"
|
|
36
|
+
stage = "commit"
|
|
37
|
+
command = ["html-validate", "--config", "{tool_file:html-validate-source}", "--formatter", "json", "{files}"]
|
|
38
|
+
output = { format = "json", children = "messages", fields = { file = "filePath", line = "line", column = "column", rule = "ruleId", message = "message" } }
|
|
39
|
+
summary = "Validates every HTML file: elements where they may sit, required attributes, text alternatives, and one style for void elements."
|
|
40
|
+
why = "A browser repairs broken markup in its own way, and a screen reader reads what the repair left."
|
|
41
|
+
help = "Change the markup the way the rule page says. Turn one rule off with gspot ignore html/validate --rule `<name>` --reason \"`<why>`\"."
|
|
42
|
+
|
|
43
|
+
[[check]]
|
|
44
|
+
name = "scripts"
|
|
45
|
+
example = "A button using an inline `onclick` attribute reports embedded executable code. Remove the attribute and attach the event listener from a separate script file."
|
|
46
|
+
level = "all"
|
|
47
|
+
stage = "commit"
|
|
48
|
+
summary = "Refuses executable inline script, event handler attributes, and executable script or data URLs in HTML files."
|
|
49
|
+
why = "A content security policy that allows inline script allows an injected one too, so the policy only holds when the pages hold none."
|
|
50
|
+
help = "Move the script into a file, and attach the handler from that file. Structured data of type application/ld+json stays inline."
|
|
51
|
+
|
|
52
|
+
[[check]]
|
|
53
|
+
name = "template-text"
|
|
54
|
+
example = "Text written into a file listed in html.templates reports a literal. Move the text to its content file and use a placeholder in the template."
|
|
55
|
+
level = "all"
|
|
56
|
+
stage = "commit"
|
|
57
|
+
summary = "In the template files named by html.templates, checks that text a person reads is a placeholder and never a literal."
|
|
58
|
+
why = "Copy written into a template is copy no translator and no content file ever sees."
|
|
59
|
+
help = "Replace the text with a placeholder and put the words in the content file. Remove files that are not templates from html.templates."
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# HTML
|
|
2
|
+
|
|
3
|
+
## Document
|
|
4
|
+
|
|
5
|
+
- `<html lang="...">` names the page language; set `dir` for a right-to-left language.
|
|
6
|
+
- One `<title>` that names the page, a `<meta name="viewport">`, and a `<meta charset="utf-8">`
|
|
7
|
+
first in `<head>`.
|
|
8
|
+
- Landmarks such as `header`, `nav`, `main`, `footer`, and `aside` structure the page. One `main`.
|
|
9
|
+
|
|
10
|
+
## Elements
|
|
11
|
+
|
|
12
|
+
- Use the element that means the thing: `button` for actions, `a` for navigation with a real
|
|
13
|
+
`href`, `nav` for navigation, `ul` and `ol` for lists, `table` for data, `time` with `datetime`
|
|
14
|
+
for dates, `figure` and `figcaption` for captioned media.
|
|
15
|
+
- Never a `div` or `span` with a click handler standing in for a button or link.
|
|
16
|
+
- `target="_blank"` links carry `rel="noopener"`.
|
|
17
|
+
|
|
18
|
+
## Script safety
|
|
19
|
+
|
|
20
|
+
- Use `defer` or `type="module"` for scripts that do not need to block parsing.
|
|
21
|
+
|
|
22
|
+
## Templates and copy
|
|
23
|
+
|
|
24
|
+
<!-- level: all -->
|
|
25
|
+
|
|
26
|
+
- A template stays declarative: no logic beyond conditionals and loops the engine provides.
|
|
27
|
+
- Generate deterministic HTML: the same inputs produce byte-identical output.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# HTML Naming
|
|
2
|
+
|
|
3
|
+
## Route and attribute names
|
|
4
|
+
|
|
5
|
+
<!-- level: all -->
|
|
6
|
+
|
|
7
|
+
- Use kebab-case file names that match the public route: `about-us.html`, `pricing/index.html`.
|
|
8
|
+
Directory routes end in `index.html` in generated output.
|
|
9
|
+
- Name public route segments in lowercase kebab-case with no trailing slash ambiguity: one
|
|
10
|
+
canonical form, with the other redirected.
|
|
11
|
+
- Use `id` attributes for anchors, labels, and descriptions, not for styling.
|
|
12
|
+
- Name `data-*` attributes in kebab-case for their value, such as `data-device-class`.
|
|
13
|
+
- Placeholders follow the engine's convention and name the value.
|
|
14
|
+
- Name content files for the route or content they serve, such as `content/legal/privacy.md`.
|
|
15
|
+
- Name asset files in kebab-case for their subject and role, such as `hero-phone-dark.webp`. Never use
|
|
16
|
+
`image1.png` or `final-v2.svg`. Generate hashed names rather than writing them by hand.
|