@gspothq/cli 0.1.1 → 0.2.0
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 +58 -11
- package/configurations/database/postgres/manifest.toml +51 -57
- package/configurations/database/postgres/rules/POSTGRES.md +14 -13
- package/configurations/framework/astro/manifest.toml +33 -35
- package/configurations/framework/astro/rules/ASTRO.md +2 -2
- package/configurations/framework/expo/manifest.toml +19 -19
- package/configurations/framework/express/manifest.toml +10 -4
- package/configurations/framework/express/rules/EXPRESS.md +9 -7
- package/configurations/framework/fastapi/manifest.toml +9 -3
- package/configurations/framework/fastapi/rules/FASTAPI.md +19 -18
- package/configurations/framework/nestjs/manifest.toml +12 -12
- package/configurations/framework/nestjs/rules/NESTJS.md +9 -9
- package/configurations/framework/nextjs/manifest.toml +39 -79
- package/configurations/framework/nextjs/rules/NEXTJS.md +9 -7
- package/configurations/framework/nextjs/tool-files/semgrep/nextjs.yml +35 -0
- package/configurations/framework/react/manifest.toml +33 -43
- package/configurations/framework/react/rules/REACT.md +14 -20
- package/configurations/framework/react-dom/manifest.toml +6 -6
- package/configurations/framework/react-native/manifest.toml +11 -11
- package/configurations/framework/react-native/rules/REACT-NATIVE.md +3 -5
- package/configurations/framework/site/manifest.toml +57 -110
- package/configurations/framework/site/rules/SITE.md +1 -1
- package/configurations/framework/svelte/manifest.toml +29 -31
- package/configurations/framework/svelte/rules/SVELTE.md +6 -6
- package/configurations/framework/vue/manifest.toml +37 -37
- package/configurations/framework/vue/rules/VUE.md +6 -6
- package/configurations/general/commits/manifest.toml +20 -84
- package/configurations/general/commits/rules/GIT.md +24 -13
- package/configurations/general/coverage/manifest.toml +1 -1
- package/configurations/general/dependencies/manifest.toml +47 -107
- package/configurations/general/dependencies/rules/DEPENDENCIES.md +13 -7
- package/configurations/general/docs/manifest.toml +28 -43
- package/configurations/general/docs/rules/DOCS.md +16 -9
- package/configurations/general/duplication/manifest.toml +12 -14
- package/configurations/general/engineering/manifest.toml +6 -2
- package/configurations/general/engineering/rules/agent/PLANNING.md +9 -6
- package/configurations/general/engineering/rules/agent/SUPPRESSIONS.md +20 -11
- package/configurations/general/engineering/rules/agent/TASKS.md +6 -2
- package/configurations/general/engineering/rules/agent/WORKING.md +34 -29
- package/configurations/general/engineering/rules/code/ACCESSIBILITY.md +9 -7
- package/configurations/general/engineering/rules/code/CLI.md +12 -9
- package/configurations/general/engineering/rules/code/COMMENTS.md +11 -1
- package/configurations/general/engineering/rules/code/CONFIGURATION.md +2 -0
- package/configurations/general/engineering/rules/code/ERRORS.md +5 -3
- package/configurations/general/engineering/rules/code/HTTP.md +9 -10
- package/configurations/general/engineering/rules/code/LOGGING.md +10 -9
- package/configurations/general/engineering/rules/code/TESTING.md +18 -11
- package/configurations/general/files/manifest.toml +45 -73
- package/configurations/general/files/rules/YAML.md +20 -10
- package/configurations/general/format/manifest.toml +53 -106
- package/configurations/general/gspot/manifest.toml +19 -39
- package/configurations/general/gspot/rules/GENERATED.md +14 -4
- package/configurations/general/licenses/manifest.toml +12 -14
- package/configurations/general/naming/defaults.json +14 -13
- package/configurations/general/naming/manifest.toml +17 -17
- package/configurations/general/naming/rules/NAMING.md +87 -67
- package/configurations/general/prose/manifest.toml +166 -25
- package/configurations/general/prose/rules/WRITING.md +6 -2
- package/configurations/general/repository/manifest.toml +12 -12
- package/configurations/general/secrets/manifest.toml +52 -73
- package/configurations/general/secrets/rules/SECRETS.md +3 -1
- package/configurations/general/security/manifest.toml +29 -52
- package/configurations/general/security/rules/SECURITY.md +8 -6
- package/configurations/general/spelling/manifest.toml +15 -25
- package/configurations/general/structure/manifest.toml +31 -31
- package/configurations/infrastructure/ansible/manifest.toml +15 -15
- package/configurations/infrastructure/docker/manifest.toml +55 -67
- package/configurations/infrastructure/docker/rules/DOCKER.md +15 -13
- package/configurations/infrastructure/github-actions/manifest.toml +21 -41
- package/configurations/infrastructure/github-actions/rules/GITHUB-ACTIONS.md +16 -12
- package/configurations/infrastructure/github-actions/tool-files/zizmor.yml +5 -0
- package/configurations/infrastructure/nginx/manifest.toml +20 -20
- package/configurations/infrastructure/nginx/rules/NGINX.md +5 -4
- package/configurations/infrastructure/openapi/manifest.toml +20 -20
- package/configurations/infrastructure/openapi/rules/OPENAPI.md +3 -1
- package/configurations/infrastructure/xcode/manifest.toml +55 -75
- package/configurations/infrastructure/xcode/rules/XCODE.md +5 -3
- package/configurations/language/bash/manifest.toml +89 -170
- package/configurations/language/bash/rules/BASH.md +79 -17
- package/configurations/language/bash/rules/LANGUAGE.md +30 -26
- package/configurations/language/bash/rules/OPERATIONS.md +10 -8
- package/configurations/language/bash/rules/SAFETY.md +39 -35
- package/configurations/language/css/manifest.toml +22 -61
- package/configurations/language/css/rules/CSS.md +21 -2
- package/configurations/language/css/rules/TAILWIND.md +7 -5
- package/configurations/language/html/manifest.toml +16 -35
- package/configurations/language/html/rules/HTML.md +23 -5
- package/configurations/language/javascript/eslint-runtime-names.json +66 -61
- package/configurations/language/javascript/eslint-runtime.mjs +118 -0
- package/configurations/language/javascript/manifest.toml +135 -207
- package/configurations/language/javascript/rules/BUN.md +2 -2
- package/configurations/language/javascript/rules/COMPONENTS.md +4 -4
- package/configurations/language/javascript/rules/DENO.md +1 -1
- package/configurations/language/javascript/rules/JAVASCRIPT.md +30 -17
- package/configurations/language/javascript/rules/NODE.md +2 -2
- package/configurations/language/javascript/rules/PLAYWRIGHT.md +10 -9
- package/configurations/language/markdown/manifest.toml +20 -51
- package/configurations/language/python/manifest.toml +231 -342
- package/configurations/language/python/rules/DESIGN.md +40 -33
- package/configurations/language/python/rules/FLOW.md +8 -6
- package/configurations/language/python/rules/PACKAGING.md +14 -7
- package/configurations/language/python/rules/PYTHON.md +83 -33
- package/configurations/language/python/rules/TYPING.md +25 -23
- package/configurations/language/sql/manifest.toml +19 -37
- package/configurations/language/sql/rules/SQL.md +90 -2
- package/configurations/language/swift/manifest.toml +67 -78
- package/configurations/language/swift/rules/SWIFT.md +138 -40
- package/configurations/language/swift/rules/SWIFTUI.md +11 -9
- package/configurations/language/swift/rules/UIKIT.md +21 -19
- package/configurations/language/typescript/manifest.toml +34 -34
- package/configurations/language/typescript/rules/TYPESCRIPT.md +62 -10
- package/configurations/library/drizzle/manifest.toml +25 -38
- package/configurations/library/drizzle/rules/DRIZZLE.md +4 -2
- package/configurations/library/react-hook-form/manifest.toml +4 -4
- package/configurations/library/react-hook-form/rules/REACT-HOOK-FORM.md +15 -13
- package/configurations/library/tanstack-query/manifest.toml +6 -6
- package/configurations/library/tanstack-query/rules/TANSTACK-QUERY.md +5 -3
- package/configurations/library/testing-library/manifest.toml +6 -6
- package/configurations/library/translations/manifest.toml +22 -22
- package/configurations/library/translations/rules/NEXT-INTL.md +6 -8
- package/configurations/library/translations/rules/TRANSLATIONS.md +22 -23
- package/configurations/library/trpc/manifest.toml +3 -3
- package/configurations/library/trpc/rules/TRPC.md +8 -6
- package/configurations/library/zod/manifest.toml +6 -6
- package/configurations/library/zod/rules/ZOD.md +4 -2
- package/configurations/library/zustand/manifest.toml +4 -4
- package/configurations/library/zustand/rules/ZUSTAND.md +16 -14
- package/configurations/platform/cloudflare/manifest.toml +28 -47
- package/configurations/platform/cloudflare/rules/CLOUDFLARE.md +11 -6
- package/configurations/platform/supabase/manifest.toml +48 -61
- package/configurations/platform/supabase/rules/SUPABASE.md +27 -28
- package/configurations/testing/jest/manifest.toml +21 -22
- package/configurations/testing/pytest/manifest.toml +28 -28
- package/configurations/testing/swift-tests/manifest.toml +18 -29
- package/configurations/testing/swift-tests/rules/SWIFT-TESTS.md +7 -5
- package/configurations/testing/vitest/manifest.toml +32 -32
- package/configurations/testing/vitest/rules/VITEST.md +3 -1
- package/dist/gspot.js +22297 -24707
- package/dist/{linkinator-program.js → linkinator-process.js} +5 -7
- package/dist/{purgecss-program.js → purgecss-process.js} +12 -12
- package/package.json +7 -9
- package/configurations/infrastructure/github-actions/zizmor.yml +0 -3
- package/configurations/language/bash/rules/NAMING.md +0 -62
- package/configurations/language/css/rules/NAMING.md +0 -17
- package/configurations/language/html/rules/NAMING.md +0 -16
- package/configurations/language/javascript/rules/NAMING.md +0 -31
- package/configurations/language/markdown/markdownlint-cli2.mjs +0 -19
- package/configurations/language/python/rules/NAMING.md +0 -53
- package/configurations/language/sql/rules/NAMING.md +0 -90
- package/configurations/language/swift/rules/NAMING.md +0 -88
- package/configurations/language/typescript/rules/NAMING.md +0 -73
- package/configurations/library/swift-snapshot-testing/manifest.toml +0 -32
- package/dist/THIRD-PARTY-NOTICES.md +0 -25
- package/dist/eslint-rule-levels.json +0 -10
- package/dist/tool-versions.json +0 -3
- package/gspot.schema.json +0 -45991
- /package/{dist/LICENSE.md → LICENSE.md} +0 -0
- /package/configurations/framework/express/{semgrep → tool-files/semgrep}/express.yml +0 -0
- /package/configurations/framework/fastapi/{semgrep → tool-files/semgrep}/fastapi.yml +0 -0
- /package/configurations/general/dependencies/{syncpack.json → tool-files/syncpack.json} +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/LICENSES.md +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ampm.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/conscious-language.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/contractions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/currency.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dashes.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/date-ordinals.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/dates.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/file-paths.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/future.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/hedging.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/history.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/idioms.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/interface-verbs.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/jargon.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/leading-conjunctions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/link-text.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/locations.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/marketing.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/merge-conflict-markers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/militaristic-language.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/modals.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/numbered-units.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/obvious-fields.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/ordinal-adverbs.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/percentage-numbers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/placeholders.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/product-centric-writing.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/punctuated-headings.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/self-reference.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/session-identifiers.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/since.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/straight-quotes.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/suspended-hyphens.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/symbols.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/time-ranges.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/url-prepositions.yml +0 -0
- /package/configurations/general/prose/{vale → tool-files/vale}/styles/gspot/version-range.yml +0 -0
- /package/configurations/general/secrets/{gitleaks.toml → tool-files/gitleaks.toml} +0 -0
- /package/configurations/infrastructure/docker/{trivyignore → tool-files/trivyignore} +0 -0
- /package/configurations/language/bash/{semgrep → tool-files/semgrep}/bash.yml +0 -0
- /package/configurations/language/javascript/{semgrep → tool-files/semgrep}/javascript.yml +0 -0
- /package/configurations/language/swift/{semgrep → tool-files/semgrep}/swift.yml +0 -0
- /package/configurations/platform/cloudflare/{semgrep → tool-files/semgrep}/cloudflare.yml +0 -0
- /package/configurations/platform/supabase/{semgrep → tool-files/semgrep}/supabase.yml +0 -0
|
@@ -1,191 +1,164 @@
|
|
|
1
1
|
allowed_words = ["JavaScript", "ESLint"]
|
|
2
2
|
ignored_folders = ["node_modules", "bower_components"]
|
|
3
3
|
|
|
4
|
-
[prefix_collisions]
|
|
5
|
-
prefixes = ["jsconfig", "eslint", "playwright"]
|
|
6
|
-
|
|
7
4
|
[configuration]
|
|
8
|
-
title = "JavaScript"
|
|
9
|
-
suggests = []
|
|
10
5
|
description = "ESLint with the shipped rule set over every JavaScript file, type checking through JSDoc, and knip for dead code."
|
|
6
|
+
suggests = []
|
|
7
|
+
title = "JavaScript"
|
|
11
8
|
|
|
12
9
|
[detect]
|
|
13
|
-
project_files = ["package.json"]
|
|
14
10
|
extensions = [".js", ".jsx", ".mjs", ".cjs"]
|
|
11
|
+
project_files = ["package.json"]
|
|
15
12
|
shebangs = ["node"]
|
|
16
13
|
|
|
17
14
|
[files]
|
|
15
|
+
eslint_plugins = true
|
|
18
16
|
extensions = [".js", ".jsx", ".mjs", ".cjs"]
|
|
19
17
|
tags = ["shebang:node"]
|
|
20
|
-
eslint_plugins = true
|
|
21
18
|
|
|
22
|
-
[
|
|
23
|
-
|
|
24
|
-
rule_url = "https://eslint.org/docs/latest/rules/{rule}"
|
|
25
|
-
crash_pattern = "^(?:Oops! Something went wrong|Error: Cannot find module|ERR_MODULE_NOT_FOUND|ConfigError:)"
|
|
26
|
-
diagnostic_header_pattern = "^(?:Oops!|ESLint: )"
|
|
27
|
-
version = "9.39.5"
|
|
28
|
-
npm = "eslint"
|
|
29
|
-
[[tool.replace]]
|
|
30
|
-
file = "eslint.config.js"
|
|
31
|
-
shared = false
|
|
32
|
-
|
|
33
|
-
[[tool.replace]]
|
|
34
|
-
file = "eslint.config.mjs"
|
|
35
|
-
shared = false
|
|
36
|
-
|
|
37
|
-
[[tool.replace]]
|
|
38
|
-
file = "eslint.config.cjs"
|
|
39
|
-
shared = false
|
|
40
|
-
|
|
41
|
-
[[tool.replace]]
|
|
42
|
-
file = "eslint.config.ts"
|
|
43
|
-
shared = false
|
|
44
|
-
|
|
45
|
-
[[tool.replace]]
|
|
46
|
-
file = "eslint.config.mts"
|
|
47
|
-
shared = false
|
|
48
|
-
|
|
49
|
-
[[tool.replace]]
|
|
50
|
-
file = "eslint.config.cts"
|
|
51
|
-
shared = false
|
|
19
|
+
[shared_prefixes]
|
|
20
|
+
prefixes = ["jsconfig", "eslint", "playwright"]
|
|
52
21
|
|
|
53
|
-
[
|
|
54
|
-
|
|
55
|
-
shared = false
|
|
22
|
+
[rules."PLAYWRIGHT.md"]
|
|
23
|
+
dependencies = ["@playwright/test", "playwright"]
|
|
56
24
|
|
|
57
|
-
[
|
|
58
|
-
|
|
59
|
-
|
|
25
|
+
[rules."NODE.md"]
|
|
26
|
+
absent_dependencies = ["react-native", "expo"]
|
|
27
|
+
runtimes = ["node"]
|
|
60
28
|
|
|
61
|
-
[
|
|
62
|
-
|
|
63
|
-
shared = false
|
|
29
|
+
[rules."DENO.md"]
|
|
30
|
+
runtimes = ["deno"]
|
|
64
31
|
|
|
65
|
-
[
|
|
66
|
-
|
|
67
|
-
shared = false
|
|
32
|
+
[rules."COMPONENTS.md"]
|
|
33
|
+
dependencies = ["astro", "svelte", "vue", "react"]
|
|
68
34
|
|
|
69
|
-
[
|
|
70
|
-
|
|
71
|
-
shared = false
|
|
35
|
+
[rules."BUN.md"]
|
|
36
|
+
filenames = ["bun.lock", "bun.lockb", "bunfig.toml"]
|
|
72
37
|
|
|
73
|
-
[[
|
|
74
|
-
|
|
75
|
-
|
|
38
|
+
[[naming.override]]
|
|
39
|
+
categories = ["functions", "methods"]
|
|
40
|
+
ignored_prefix = "^handle(?=[A-Z])"
|
|
41
|
+
languages = ["typescript", "javascript"]
|
|
42
|
+
paths = ["**"]
|
|
43
|
+
reason = "A handler starts with handle and then names the event."
|
|
76
44
|
|
|
77
|
-
[[tool
|
|
78
|
-
|
|
79
|
-
|
|
45
|
+
[[tool]]
|
|
46
|
+
crash_pattern = "^(?:Oops! Something went wrong|Error: Cannot find module|ERR_MODULE_NOT_FOUND|ConfigError:)"
|
|
47
|
+
finding_header_pattern = "^(?:Oops!|ESLint: )"
|
|
48
|
+
name = "eslint"
|
|
49
|
+
npm = "eslint"
|
|
50
|
+
replace = ["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs", "eslint.config.ts", "eslint.config.mts", "eslint.config.cts", ".eslintrc", ".eslintrc.js", ".eslintrc.cjs", ".eslintrc.json", ".eslintrc.yml", ".eslintrc.yaml", ".eslintignore"]
|
|
51
|
+
rule_url = "https://eslint.org/docs/latest/rules/{rule}"
|
|
52
|
+
version = "9.39.5"
|
|
80
53
|
|
|
81
54
|
[[tool.refused_options]]
|
|
55
|
+
message = "ESLint rule selection comes from level recommended or all. Use tools.eslint.rules and tools.eslint.override for ESLint options, or gspot ignore javascript/eslint --rule <rule> --reason <why> to accept a finding."
|
|
82
56
|
paths = ["rules", "overrides", "extends"]
|
|
83
|
-
message = "ESLint rule selection comes from level recommended or all. Use tools.eslint.rules and tools.eslint.override for native options, or gspot ignore javascript/eslint --rule <rule> --reason <why> to accept a finding."
|
|
84
57
|
|
|
85
58
|
[tool.suppression]
|
|
86
59
|
marker = "^(?:/\\*\\s*eslint-disable(?:-next-line|-line)?|//\\s*eslint-disable-(?:next-)?line)(?=\\s|$)"
|
|
87
60
|
reason = " -- (?<reason>\\S.*)"
|
|
88
61
|
|
|
89
|
-
[[tool.
|
|
62
|
+
[[tool.replace_key]]
|
|
90
63
|
file = "package.json"
|
|
91
64
|
key = "eslintConfig"
|
|
92
|
-
shared = true
|
|
93
65
|
|
|
94
66
|
[[tool]]
|
|
95
|
-
name = "@eslint/js"
|
|
96
67
|
kind = "library"
|
|
97
|
-
|
|
68
|
+
name = "@eslint/js"
|
|
98
69
|
npm = "@eslint/js"
|
|
70
|
+
version = "9.39.5"
|
|
99
71
|
|
|
100
72
|
[[tool]]
|
|
101
|
-
name = "@gspothq/eslint-plugin"
|
|
102
|
-
rule_prefix = "gspot"
|
|
103
73
|
kind = "library"
|
|
74
|
+
name = "@gspothq/eslint-plugin"
|
|
104
75
|
npm = "@gspothq/eslint-plugin"
|
|
76
|
+
version = "0.2.0"
|
|
77
|
+
rule_prefix = "gspot"
|
|
105
78
|
rule_url = "https://generativespotting.com/reference/eslint-plugin/{rule}/"
|
|
106
79
|
|
|
107
80
|
[[tool]]
|
|
81
|
+
kind = "library"
|
|
108
82
|
name = "eslint-plugin-sonarjs"
|
|
83
|
+
npm = "eslint-plugin-sonarjs"
|
|
109
84
|
rule_prefix = "sonarjs"
|
|
110
|
-
kind = "library"
|
|
111
85
|
version = "4.2.0"
|
|
112
|
-
npm = "eslint-plugin-sonarjs"
|
|
113
86
|
|
|
114
87
|
[[tool]]
|
|
88
|
+
kind = "library"
|
|
115
89
|
name = "eslint-plugin-unicorn"
|
|
90
|
+
npm = "eslint-plugin-unicorn"
|
|
116
91
|
rule_prefix = "unicorn"
|
|
117
92
|
rule_url = "https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/{rule}.md"
|
|
118
|
-
kind = "library"
|
|
119
93
|
version = "65.0.1"
|
|
120
|
-
npm = "eslint-plugin-unicorn"
|
|
121
94
|
|
|
122
95
|
[[tool]]
|
|
96
|
+
kind = "library"
|
|
123
97
|
name = "eslint-plugin-security"
|
|
98
|
+
npm = "eslint-plugin-security"
|
|
124
99
|
rule_prefix = "security"
|
|
125
|
-
kind = "library"
|
|
126
100
|
version = "4.0.1"
|
|
127
|
-
npm = "eslint-plugin-security"
|
|
128
101
|
|
|
129
102
|
[[tool]]
|
|
103
|
+
kind = "library"
|
|
130
104
|
name = "eslint-plugin-barrel-files"
|
|
105
|
+
npm = "eslint-plugin-barrel-files"
|
|
131
106
|
rule_prefix = "barrel-files"
|
|
132
|
-
kind = "library"
|
|
133
107
|
version = "3.0.1"
|
|
134
|
-
npm = "eslint-plugin-barrel-files"
|
|
135
108
|
|
|
136
109
|
[[tool]]
|
|
137
|
-
name = "eslint-plugin-perfectionist"
|
|
138
|
-
rule_prefix = "perfectionist"
|
|
139
110
|
kind = "library"
|
|
111
|
+
name = "eslint-plugin-perfectionist"
|
|
140
112
|
npm = "eslint-plugin-perfectionist"
|
|
113
|
+
rule_prefix = "perfectionist"
|
|
141
114
|
version = "5.12.1"
|
|
142
115
|
|
|
143
116
|
[[tool]]
|
|
117
|
+
kind = "library"
|
|
144
118
|
name = "eslint-plugin-n"
|
|
119
|
+
npm = "eslint-plugin-n"
|
|
145
120
|
rule_prefix = "n"
|
|
146
|
-
kind = "library"
|
|
147
121
|
version = "18.3.0"
|
|
148
|
-
npm = "eslint-plugin-n"
|
|
149
122
|
|
|
150
123
|
[[tool]]
|
|
124
|
+
kind = "library"
|
|
151
125
|
name = "eslint-plugin-jsdoc"
|
|
126
|
+
npm = "eslint-plugin-jsdoc"
|
|
152
127
|
rule_prefix = "jsdoc"
|
|
153
|
-
kind = "library"
|
|
154
128
|
version = "64.3.9"
|
|
155
|
-
npm = "eslint-plugin-jsdoc"
|
|
156
129
|
|
|
157
130
|
[[tool]]
|
|
131
|
+
kind = "library"
|
|
158
132
|
name = "eslint-plugin-regexp"
|
|
133
|
+
npm = "eslint-plugin-regexp"
|
|
159
134
|
rule_prefix = "regexp"
|
|
160
|
-
kind = "library"
|
|
161
135
|
version = "3.3.0"
|
|
162
|
-
npm = "eslint-plugin-regexp"
|
|
163
136
|
|
|
164
137
|
[[tool]]
|
|
138
|
+
kind = "library"
|
|
165
139
|
name = "eslint-plugin-import-x"
|
|
140
|
+
npm = "eslint-plugin-import-x"
|
|
166
141
|
rule_prefix = "import-x"
|
|
167
|
-
kind = "library"
|
|
168
142
|
version = "4.17.1"
|
|
169
|
-
npm = "eslint-plugin-import-x"
|
|
170
143
|
|
|
171
144
|
[[tool]]
|
|
172
|
-
name = "picomatch"
|
|
173
145
|
kind = "library"
|
|
174
|
-
|
|
146
|
+
name = "picomatch"
|
|
175
147
|
npm = "picomatch"
|
|
148
|
+
version = "4.0.7"
|
|
176
149
|
|
|
177
150
|
[[tool]]
|
|
178
|
-
name = "eslint-import-resolver-typescript"
|
|
179
151
|
kind = "library"
|
|
180
|
-
|
|
152
|
+
name = "eslint-import-resolver-typescript"
|
|
181
153
|
npm = "eslint-import-resolver-typescript"
|
|
154
|
+
version = "4.4.5"
|
|
182
155
|
|
|
183
156
|
[[tool]]
|
|
157
|
+
kind = "library"
|
|
184
158
|
name = "eslint-plugin-boundaries"
|
|
159
|
+
npm = "eslint-plugin-boundaries"
|
|
185
160
|
rule_prefix = "boundaries"
|
|
186
|
-
kind = "library"
|
|
187
161
|
version = "7.2.0"
|
|
188
|
-
npm = "eslint-plugin-boundaries"
|
|
189
162
|
|
|
190
163
|
[[tool.when]]
|
|
191
164
|
setting = "architecture.module"
|
|
@@ -194,135 +167,136 @@ setting = "architecture.module"
|
|
|
194
167
|
level = "all"
|
|
195
168
|
|
|
196
169
|
[[tool]]
|
|
170
|
+
kind = "library"
|
|
197
171
|
name = "eslint-plugin-package-json"
|
|
172
|
+
npm = "eslint-plugin-package-json"
|
|
198
173
|
rule_prefix = "package-json"
|
|
199
|
-
kind = "library"
|
|
200
174
|
version = "1.8.0"
|
|
201
|
-
npm = "eslint-plugin-package-json"
|
|
202
175
|
|
|
203
176
|
[[tool]]
|
|
204
|
-
name = "eslint-config-prettier"
|
|
205
177
|
kind = "library"
|
|
206
|
-
|
|
178
|
+
name = "eslint-config-prettier"
|
|
207
179
|
npm = "eslint-config-prettier"
|
|
180
|
+
version = "10.1.8"
|
|
208
181
|
|
|
209
182
|
[[tool]]
|
|
210
|
-
name = "globals"
|
|
211
183
|
kind = "library"
|
|
212
|
-
|
|
184
|
+
name = "globals"
|
|
213
185
|
npm = "globals"
|
|
186
|
+
version = "17.12.0"
|
|
214
187
|
|
|
215
188
|
[[tool]]
|
|
216
189
|
name = "knip"
|
|
217
|
-
version = "6.35.1"
|
|
218
190
|
npm = "knip"
|
|
219
|
-
[
|
|
220
|
-
|
|
221
|
-
shared = false
|
|
222
|
-
|
|
223
|
-
[[tool.replace]]
|
|
224
|
-
file = "knip.jsonc"
|
|
225
|
-
shared = false
|
|
226
|
-
|
|
227
|
-
[[tool.replace]]
|
|
228
|
-
file = ".knip.json"
|
|
229
|
-
shared = false
|
|
230
|
-
|
|
231
|
-
[[tool.replace]]
|
|
232
|
-
file = ".knip.jsonc"
|
|
233
|
-
shared = false
|
|
234
|
-
|
|
235
|
-
[[tool.replace]]
|
|
236
|
-
file = "knip.ts"
|
|
237
|
-
shared = false
|
|
238
|
-
|
|
239
|
-
[[tool.replace]]
|
|
240
|
-
file = "knip.js"
|
|
241
|
-
shared = false
|
|
242
|
-
|
|
243
|
-
[[tool.replace]]
|
|
244
|
-
file = "knip.config.js"
|
|
245
|
-
shared = false
|
|
246
|
-
|
|
247
|
-
[[tool.replace]]
|
|
248
|
-
file = "knip.config.ts"
|
|
249
|
-
shared = false
|
|
191
|
+
replace = ["knip.json", "knip.jsonc", ".knip.json", ".knip.jsonc", "knip.ts", "knip.js", "knip.config.js", "knip.config.ts"]
|
|
192
|
+
version = "6.35.1"
|
|
250
193
|
|
|
251
194
|
[[tool]]
|
|
252
|
-
name = "tsc"
|
|
253
195
|
install_hint = "Run: npm install --save-dev typescript"
|
|
196
|
+
name = "tsc"
|
|
197
|
+
npm = "typescript"
|
|
254
198
|
system = true
|
|
255
199
|
version = "5.9.3"
|
|
256
|
-
npm = "typescript"
|
|
257
200
|
version_command = ["--version"]
|
|
258
201
|
|
|
259
202
|
[tool.suppression]
|
|
260
203
|
marker = "@ts-(?:ignore|expect-error|nocheck)\\b"
|
|
261
204
|
reason = "@ts-(?:ignore|expect-error|nocheck):?\\s+(?<reason>\\S.*)"
|
|
262
205
|
|
|
206
|
+
[eslint]
|
|
207
|
+
all_level_rules = ["import-x/first", "import-x/newline-after-import", "barrel-files/avoid-barrel-files", "perfectionist/sort-imports", "perfectionist/sort-named-imports", "perfectionist/sort-exports", "perfectionist/sort-named-exports", "complexity", "import-x/exports-last", "jsdoc/no-types", "jsdoc/require-description", "jsdoc/require-jsdoc", "jsdoc/require-param", "jsdoc/match-name", "jsdoc/informative-docs", "jsdoc/require-param-description", "jsdoc/require-returns", "jsdoc/require-returns-description", "max-depth", "max-lines", "max-lines-per-function", "max-nested-callbacks", "max-params", "max-statements", "n/no-process-exit", "n/prefer-global/buffer", "n/prefer-global/console", "n/prefer-global/process", "n/prefer-global/url", "n/prefer-global/url-search-params", "n/prefer-promises/dns", "n/prefer-promises/fs", "no-console", "no-param-reassign", "package-json/repository-shorthand", "package-json/require-attribution", "package-json/require-description", "package-json/require-exports", "package-json/require-files", "package-json/require-name", "package-json/require-repository", "package-json/require-sideEffects", "package-json/require-type", "package-json/require-version", "package-json/sort-collections", "security/detect-child-process", "security/detect-possible-timing-attacks", "sonarjs/bitwise-operators", "sonarjs/class-name", "sonarjs/cognitive-complexity", "sonarjs/constructor-for-side-effects", "sonarjs/fixme-tag", "sonarjs/hooks-before-test-cases", "sonarjs/max-switch-cases", "sonarjs/no-clear-text-protocols", "sonarjs/no-commented-code", "sonarjs/no-default-utility-imports", "sonarjs/no-fixed-wait-in-tests", "sonarjs/no-global-this", "sonarjs/no-hardcoded-ip", "sonarjs/no-identical-functions", "sonarjs/no-inverted-boolean-check", "sonarjs/no-labels", "sonarjs/no-nested-assignment", "sonarjs/no-nested-conditional", "sonarjs/no-nested-functions", "sonarjs/no-nested-switch", "sonarjs/no-nested-template-literals", "sonarjs/no-os-command-from-path", "sonarjs/no-same-line-conditional", "sonarjs/no-selector-parameter", "sonarjs/no-small-switch", "sonarjs/no-undefined-argument", "sonarjs/parameterized-tests", "sonarjs/prefer-default-last", "sonarjs/prefer-immediate-return", "sonarjs/prefer-native-lodash-alternative", "sonarjs/prefer-object-literal", "sonarjs/prefer-promise-shorthand", "sonarjs/prefer-read-only-props", "sonarjs/prefer-regexp-exec", "sonarjs/prefer-single-boolean-return", "sonarjs/prefer-specific-assertions", "sonarjs/prefer-type-guard", "sonarjs/prefer-while", "sonarjs/pseudo-random", "sonarjs/public-static-readonly", "sonarjs/publicly-writable-directories", "sonarjs/regex-complexity", "sonarjs/todo-tag", "sonarjs/use-type-alias", "unicorn/better-dom-traversing", "unicorn/catch-error-name", "unicorn/consistent-assert", "unicorn/consistent-compound-words", "unicorn/consistent-date-clone", "unicorn/consistent-empty-array-spread", "unicorn/consistent-function-scoping", "unicorn/consistent-json-file-read", "unicorn/consistent-template-literal-escape", "unicorn/dom-node-dataset", "unicorn/expiring-todo-comments", "unicorn/explicit-length-check", "unicorn/isolated-functions", "unicorn/no-anonymous-default-export", "unicorn/no-array-for-each", "unicorn/no-array-from-fill", "unicorn/no-array-method-this-argument", "unicorn/no-array-reduce", "unicorn/no-array-reverse", "unicorn/no-array-sort", "unicorn/no-await-expression-member", "unicorn/no-blob-to-file", "unicorn/no-canvas-to-image", "unicorn/no-confusing-array-splice", "unicorn/no-document-cookie", "unicorn/no-empty-file", "unicorn/no-exports-in-scripts", "unicorn/no-for-loop", "unicorn/no-hex-escape", "unicorn/no-immediate-mutation", "unicorn/no-magic-array-flat-depth", "unicorn/no-named-default", "unicorn/no-negated-condition", "unicorn/no-negation-in-equality-check", "unicorn/no-nested-ternary", "unicorn/no-new-array", "unicorn/no-process-exit", "unicorn/no-single-promise-in-promise-methods", "unicorn/no-static-only-class", "unicorn/no-this-assignment", "unicorn/no-typeof-undefined", "unicorn/no-unnecessary-array-flat-depth", "unicorn/no-unnecessary-array-splice-count", "unicorn/no-unnecessary-nested-ternary", "unicorn/no-unnecessary-slice-end", "unicorn/no-unreadable-array-destructuring", "unicorn/no-unreadable-iife", "unicorn/no-useless-switch-case", "unicorn/prefer-add-event-listener", "unicorn/prefer-array-find", "unicorn/prefer-array-flat", "unicorn/prefer-array-flat-map", "unicorn/prefer-array-index-of", "unicorn/prefer-array-last-methods", "unicorn/prefer-array-some", "unicorn/prefer-at", "unicorn/prefer-bigint-literals", "unicorn/prefer-blob-reading-methods", "unicorn/prefer-class-fields", "unicorn/prefer-classlist-toggle", "unicorn/prefer-date-now", "unicorn/prefer-default-parameters", "unicorn/prefer-dom-node-append", "unicorn/prefer-dom-node-remove", "unicorn/prefer-dom-node-text-content", "unicorn/prefer-event-target", "unicorn/prefer-get-or-insert-computed", "unicorn/prefer-global-this", "unicorn/prefer-includes", "unicorn/prefer-includes-over-repeated-comparisons", "unicorn/prefer-iterator-to-array-at-end", "unicorn/prefer-keyboard-event-key", "unicorn/prefer-logical-operator-over-ternary", "unicorn/prefer-math-abs", "unicorn/prefer-math-min-max", "unicorn/prefer-math-trunc", "unicorn/prefer-modern-dom-apis", "unicorn/prefer-modern-math-apis", "unicorn/prefer-module", "unicorn/prefer-native-coercion-functions", "unicorn/prefer-negative-index", "unicorn/prefer-number-properties", "unicorn/prefer-object-from-entries", "unicorn/prefer-optional-catch-binding", "unicorn/prefer-prototype-methods", "unicorn/prefer-query-selector", "unicorn/prefer-queue-microtask", "unicorn/prefer-reflect-apply", "unicorn/prefer-regexp-test", "unicorn/prefer-response-static-json", "unicorn/prefer-set-has", "unicorn/prefer-set-size", "unicorn/prefer-simple-condition-first", "unicorn/prefer-single-call", "unicorn/prefer-split-limit", "unicorn/prefer-spread", "unicorn/prefer-string-match-all", "unicorn/prefer-string-pad-start-end", "unicorn/prefer-string-raw", "unicorn/prefer-string-repeat", "unicorn/prefer-string-replace-all", "unicorn/prefer-string-slice", "unicorn/prefer-string-starts-ends-with", "unicorn/prefer-string-trim-start-end", "unicorn/prefer-structured-clone", "unicorn/prefer-switch", "unicorn/prefer-ternary", "unicorn/prefer-top-level-await", "unicorn/prefer-type-error", "unicorn/relative-url-style", "unicorn/require-passive-events"]
|
|
208
|
+
|
|
209
|
+
[eslint.presets.eslint]
|
|
210
|
+
package = "@eslint/js"
|
|
211
|
+
source = "configs.recommended"
|
|
212
|
+
|
|
213
|
+
[eslint.presets.sonar]
|
|
214
|
+
package = "eslint-plugin-sonarjs"
|
|
215
|
+
source = "configs.recommended"
|
|
216
|
+
|
|
217
|
+
[eslint.presets.unicorn]
|
|
218
|
+
package = "eslint-plugin-unicorn"
|
|
219
|
+
source = "configs.recommended"
|
|
220
|
+
|
|
221
|
+
[eslint.presets.packageJson]
|
|
222
|
+
package = "eslint-plugin-package-json"
|
|
223
|
+
source = "configs.recommended"
|
|
224
|
+
|
|
225
|
+
[eslint.presets.prettier]
|
|
226
|
+
package = "eslint-config-prettier"
|
|
227
|
+
source = ""
|
|
228
|
+
|
|
263
229
|
[[tool_file]]
|
|
264
|
-
target = ".gspot/config/eslint.config.mjs"
|
|
265
230
|
required_tools = ["@eslint/js", "@gspothq/eslint-plugin", "eslint-plugin-sonarjs", "eslint-plugin-unicorn", "eslint-plugin-security", "eslint-plugin-barrel-files", "eslint-plugin-perfectionist", "eslint-plugin-n", "eslint-plugin-jsdoc", "eslint-plugin-regexp", "eslint-plugin-import-x", "eslint-import-resolver-typescript", "eslint-plugin-boundaries", "eslint-plugin-package-json", "eslint-config-prettier", "globals", "picomatch"]
|
|
266
|
-
|
|
231
|
+
target = ".gspot/config/eslint.config.mjs"
|
|
267
232
|
tool = "eslint"
|
|
268
|
-
rule_keys = ["rules"]
|
|
269
233
|
|
|
270
234
|
[tool_file.pointer]
|
|
271
|
-
path = "eslint.config.mjs"
|
|
272
235
|
body = "export { default } from {target_module};"
|
|
236
|
+
path = "eslint.config.mjs"
|
|
273
237
|
|
|
274
238
|
[[tool_file]]
|
|
275
|
-
target = ".gspot/config/jsconfig.json"
|
|
276
|
-
tool = "tsc"
|
|
277
239
|
check = "javascript/tsc"
|
|
278
240
|
per_scope = true
|
|
241
|
+
target = ".gspot/config/jsconfig.json"
|
|
242
|
+
tool = "tsc"
|
|
279
243
|
|
|
280
244
|
[[tool_file]]
|
|
281
245
|
target = ".gspot/config/knip.json"
|
|
282
246
|
tool = "knip"
|
|
283
247
|
|
|
248
|
+
[[tool_file]]
|
|
249
|
+
per_scope = true
|
|
250
|
+
target = ".gspot/config/semgrep/javascript.yml"
|
|
251
|
+
tool = "semgrep"
|
|
252
|
+
when = { configuration = "security" }
|
|
253
|
+
|
|
254
|
+
[[tool_file]]
|
|
255
|
+
target = ".gspot/config/eslint-runtime.mjs"
|
|
256
|
+
tool = "eslint"
|
|
257
|
+
|
|
284
258
|
[[check]]
|
|
285
|
-
|
|
286
|
-
tool = ["eslint", "node"]
|
|
259
|
+
command = ["eslint", "--max-warnings", "0", "--no-warn-ignored", "--config", "{tool_file:eslint}", "--format", "json", "{files}"]
|
|
287
260
|
example = "The declaration `const unused = 1;` reports no-unused-vars. Delete the variable."
|
|
261
|
+
exit_codes = [1]
|
|
262
|
+
fix = ["eslint", "--fix", "--config", "{tool_file:eslint}", "{files}"]
|
|
263
|
+
help = "Run `gspot check --fix` for the rules that fix themselves, then read each remaining line; `gspot explain <rule>` links the rule documentation."
|
|
288
264
|
level = "recommended"
|
|
265
|
+
name = "eslint"
|
|
289
266
|
stage = "commit"
|
|
290
|
-
command = ["eslint", "--max-warnings", "0", "--no-warn-ignored", "--config", "{tool_file:eslint}", "--format", "json", "{files}"]
|
|
291
|
-
fix = ["eslint", "--fix", "--config", "{tool_file:eslint}", "{files}"]
|
|
292
|
-
exit_codes = [1]
|
|
293
267
|
summary = "Runs the shipped ESLint rules on JavaScript, TypeScript, component files, and package.json."
|
|
294
|
-
|
|
295
|
-
|
|
268
|
+
tool = ["eslint", "node"]
|
|
269
|
+
why = "ESLint catches mistakes that the runtime accepts: unused code, unsafe patterns, and functions that only forward."
|
|
296
270
|
|
|
297
271
|
[check.files]
|
|
272
|
+
eslint_plugins = true
|
|
298
273
|
extensions = [".js", ".jsx", ".mjs", ".cjs"]
|
|
299
274
|
filenames = ["package.json"]
|
|
300
275
|
tags = ["shebang:node"]
|
|
301
|
-
eslint_plugins = true
|
|
302
276
|
|
|
303
277
|
[check.output]
|
|
304
|
-
format = "json"
|
|
305
278
|
children = "messages"
|
|
279
|
+
format = "json"
|
|
306
280
|
|
|
307
281
|
[check.output.fields]
|
|
282
|
+
column = "column"
|
|
308
283
|
file = "filePath"
|
|
284
|
+
fixable = "fix"
|
|
309
285
|
line = "line"
|
|
310
|
-
column = "column"
|
|
311
|
-
rule = "ruleId"
|
|
312
286
|
message = "message"
|
|
313
|
-
|
|
287
|
+
rule = "ruleId"
|
|
314
288
|
|
|
315
289
|
[[check]]
|
|
316
|
-
|
|
317
|
-
example = "
|
|
290
|
+
cwd = "scope"
|
|
291
|
+
example = "Passing a number to a JSDoc `string` parameter reports a type error. Pass a string, or fix the JSDoc."
|
|
292
|
+
help = "Add or fix the JSDoc type that the error names."
|
|
318
293
|
level = "recommended"
|
|
319
|
-
|
|
294
|
+
name = "tsc"
|
|
320
295
|
runs = "scope"
|
|
321
|
-
|
|
322
|
-
tool = "tsc"
|
|
296
|
+
stage = "push"
|
|
323
297
|
summary = "Type-checks plain JavaScript through its JSDoc comments."
|
|
324
|
-
|
|
325
|
-
|
|
298
|
+
tool = "tsc"
|
|
299
|
+
why = "A wrong call in JavaScript crashes at run time, and written types let the checker catch it first."
|
|
326
300
|
|
|
327
301
|
[check.files]
|
|
328
302
|
extensions = [".js", ".mjs", ".cjs", ".jsx"]
|
|
@@ -332,62 +306,16 @@ format = "regex"
|
|
|
332
306
|
pattern = "^(?<file>[^(]+)\\((?<line>\\d+),(?<column>\\d+)\\): error (?<rule>TS\\d+): (?<message>.*)$"
|
|
333
307
|
|
|
334
308
|
[[check]]
|
|
335
|
-
name = "knip"
|
|
336
|
-
example = "An exported declaration that no selected entry point uses reports an unused export. Remove the export or declaration and update consumers. If the file is dynamically loaded, add its entry point in tools.knip.extra with a reason."
|
|
337
|
-
level = "recommended"
|
|
338
|
-
stage = "push"
|
|
339
|
-
runs = "scope"
|
|
340
309
|
command = ["knip", "--config", "{tool_file:knip}", "--no-progress", "--reporter", "json", "{workspace:--workspace}"]
|
|
341
310
|
cwd = "root"
|
|
311
|
+
example = "An export that no entry point uses reports a finding. Remove it, or list a dynamically loaded file in `tools.knip.entry`."
|
|
312
|
+
help = "Delete what knip names. For a file loaded in a way that knip cannot trace, add an entry point in `tools.knip.entry`."
|
|
313
|
+
level = "recommended"
|
|
314
|
+
name = "knip"
|
|
315
|
+
runs = "scope"
|
|
316
|
+
stage = "push"
|
|
342
317
|
summary = "Finds files, exports, and dependencies nothing uses."
|
|
343
|
-
why = "
|
|
344
|
-
help = "Delete what knip names, or add a knip entry point in tools.knip.extra with a reason if the file is loaded in a way knip cannot see."
|
|
318
|
+
why = "Teams read, maintain, and ship dead code for nobody."
|
|
345
319
|
|
|
346
320
|
[check.output]
|
|
347
321
|
format = "knip"
|
|
348
|
-
|
|
349
|
-
[[naming.override]]
|
|
350
|
-
paths = ["**"]
|
|
351
|
-
languages = ["typescript", "javascript"]
|
|
352
|
-
categories = ["functions", "methods"]
|
|
353
|
-
ignored_prefix = "^handle(?=[A-Z])"
|
|
354
|
-
reason = "A handler starts with handle and then names the event."
|
|
355
|
-
|
|
356
|
-
[rules."PLAYWRIGHT.md"]
|
|
357
|
-
dependencies = ["@playwright/test", "playwright"]
|
|
358
|
-
|
|
359
|
-
[rules."NODE.md"]
|
|
360
|
-
runtimes = ["node"]
|
|
361
|
-
absent_dependencies = ["react-native", "expo"]
|
|
362
|
-
|
|
363
|
-
[rules."DENO.md"]
|
|
364
|
-
runtimes = ["deno"]
|
|
365
|
-
|
|
366
|
-
[rules."COMPONENTS.md"]
|
|
367
|
-
dependencies = ["astro", "svelte", "vue", "react"]
|
|
368
|
-
|
|
369
|
-
[rules."BUN.md"]
|
|
370
|
-
filenames = ["bun.lock", "bun.lockb", "bunfig.toml"]
|
|
371
|
-
|
|
372
|
-
[eslint]
|
|
373
|
-
all_level_rules = ["import-x/first", "import-x/newline-after-import", "barrel-files/avoid-barrel-files", "perfectionist/sort-imports", "perfectionist/sort-named-imports", "perfectionist/sort-exports", "perfectionist/sort-named-exports", "complexity", "import-x/exports-last", "jsdoc/no-types", "jsdoc/require-description", "jsdoc/require-jsdoc", "jsdoc/require-param", "jsdoc/require-param-description", "jsdoc/require-returns", "jsdoc/require-returns-description", "max-depth", "max-lines", "max-lines-per-function", "max-nested-callbacks", "max-params", "max-statements", "n/no-process-exit", "n/prefer-global/buffer", "n/prefer-global/console", "n/prefer-global/process", "n/prefer-global/url", "n/prefer-global/url-search-params", "n/prefer-promises/dns", "n/prefer-promises/fs", "no-console", "no-param-reassign", "package-json/repository-shorthand", "package-json/require-attribution", "package-json/require-description", "package-json/require-exports", "package-json/require-files", "package-json/require-name", "package-json/require-repository", "package-json/require-sideEffects", "package-json/require-type", "package-json/require-version", "package-json/sort-collections", "security/detect-child-process", "security/detect-possible-timing-attacks", "sonarjs/bitwise-operators", "sonarjs/class-name", "sonarjs/cognitive-complexity", "sonarjs/constructor-for-side-effects", "sonarjs/fixme-tag", "sonarjs/hooks-before-test-cases", "sonarjs/max-switch-cases", "sonarjs/no-clear-text-protocols", "sonarjs/no-commented-code", "sonarjs/no-default-utility-imports", "sonarjs/no-fixed-wait-in-tests", "sonarjs/no-global-this", "sonarjs/no-hardcoded-ip", "sonarjs/no-identical-functions", "sonarjs/no-inverted-boolean-check", "sonarjs/no-labels", "sonarjs/no-nested-assignment", "sonarjs/no-nested-conditional", "sonarjs/no-nested-functions", "sonarjs/no-nested-switch", "sonarjs/no-nested-template-literals", "sonarjs/no-os-command-from-path", "sonarjs/no-same-line-conditional", "sonarjs/no-selector-parameter", "sonarjs/no-small-switch", "sonarjs/no-undefined-argument", "sonarjs/parameterized-tests", "sonarjs/prefer-default-last", "sonarjs/prefer-immediate-return", "sonarjs/prefer-native-lodash-alternative", "sonarjs/prefer-object-literal", "sonarjs/prefer-promise-shorthand", "sonarjs/prefer-read-only-props", "sonarjs/prefer-regexp-exec", "sonarjs/prefer-single-boolean-return", "sonarjs/prefer-specific-assertions", "sonarjs/prefer-type-guard", "sonarjs/prefer-while", "sonarjs/pseudo-random", "sonarjs/public-static-readonly", "sonarjs/publicly-writable-directories", "sonarjs/regex-complexity", "sonarjs/todo-tag", "sonarjs/use-type-alias", "unicorn/better-dom-traversing", "unicorn/catch-error-name", "unicorn/consistent-assert", "unicorn/consistent-compound-words", "unicorn/consistent-date-clone", "unicorn/consistent-empty-array-spread", "unicorn/consistent-function-scoping", "unicorn/consistent-json-file-read", "unicorn/consistent-template-literal-escape", "unicorn/dom-node-dataset", "unicorn/expiring-todo-comments", "unicorn/explicit-length-check", "unicorn/isolated-functions", "unicorn/no-anonymous-default-export", "unicorn/no-array-for-each", "unicorn/no-array-from-fill", "unicorn/no-array-method-this-argument", "unicorn/no-array-reduce", "unicorn/no-array-reverse", "unicorn/no-array-sort", "unicorn/no-await-expression-member", "unicorn/no-blob-to-file", "unicorn/no-canvas-to-image", "unicorn/no-confusing-array-splice", "unicorn/no-document-cookie", "unicorn/no-empty-file", "unicorn/no-exports-in-scripts", "unicorn/no-for-loop", "unicorn/no-hex-escape", "unicorn/no-immediate-mutation", "unicorn/no-magic-array-flat-depth", "unicorn/no-named-default", "unicorn/no-negated-condition", "unicorn/no-negation-in-equality-check", "unicorn/no-nested-ternary", "unicorn/no-new-array", "unicorn/no-process-exit", "unicorn/no-single-promise-in-promise-methods", "unicorn/no-static-only-class", "unicorn/no-this-assignment", "unicorn/no-typeof-undefined", "unicorn/no-unnecessary-array-flat-depth", "unicorn/no-unnecessary-array-splice-count", "unicorn/no-unnecessary-nested-ternary", "unicorn/no-unnecessary-slice-end", "unicorn/no-unreadable-array-destructuring", "unicorn/no-unreadable-iife", "unicorn/no-useless-switch-case", "unicorn/prefer-add-event-listener", "unicorn/prefer-array-find", "unicorn/prefer-array-flat", "unicorn/prefer-array-flat-map", "unicorn/prefer-array-index-of", "unicorn/prefer-array-last-methods", "unicorn/prefer-array-some", "unicorn/prefer-at", "unicorn/prefer-bigint-literals", "unicorn/prefer-blob-reading-methods", "unicorn/prefer-class-fields", "unicorn/prefer-classlist-toggle", "unicorn/prefer-date-now", "unicorn/prefer-default-parameters", "unicorn/prefer-dom-node-append", "unicorn/prefer-dom-node-remove", "unicorn/prefer-dom-node-text-content", "unicorn/prefer-event-target", "unicorn/prefer-get-or-insert-computed", "unicorn/prefer-global-this", "unicorn/prefer-includes", "unicorn/prefer-includes-over-repeated-comparisons", "unicorn/prefer-iterator-to-array-at-end", "unicorn/prefer-keyboard-event-key", "unicorn/prefer-logical-operator-over-ternary", "unicorn/prefer-math-abs", "unicorn/prefer-math-min-max", "unicorn/prefer-math-trunc", "unicorn/prefer-modern-dom-apis", "unicorn/prefer-modern-math-apis", "unicorn/prefer-module", "unicorn/prefer-native-coercion-functions", "unicorn/prefer-negative-index", "unicorn/prefer-number-properties", "unicorn/prefer-object-from-entries", "unicorn/prefer-optional-catch-binding", "unicorn/prefer-prototype-methods", "unicorn/prefer-query-selector", "unicorn/prefer-queue-microtask", "unicorn/prefer-reflect-apply", "unicorn/prefer-regexp-test", "unicorn/prefer-response-static-json", "unicorn/prefer-set-has", "unicorn/prefer-set-size", "unicorn/prefer-simple-condition-first", "unicorn/prefer-single-call", "unicorn/prefer-split-limit", "unicorn/prefer-spread", "unicorn/prefer-string-match-all", "unicorn/prefer-string-pad-start-end", "unicorn/prefer-string-raw", "unicorn/prefer-string-repeat", "unicorn/prefer-string-replace-all", "unicorn/prefer-string-slice", "unicorn/prefer-string-starts-ends-with", "unicorn/prefer-string-trim-start-end", "unicorn/prefer-structured-clone", "unicorn/prefer-switch", "unicorn/prefer-ternary", "unicorn/prefer-top-level-await", "unicorn/prefer-type-error", "unicorn/relative-url-style", "unicorn/require-passive-events"]
|
|
374
|
-
|
|
375
|
-
[eslint.presets.eslint]
|
|
376
|
-
package = "@eslint/js"
|
|
377
|
-
source = "configs.recommended"
|
|
378
|
-
|
|
379
|
-
[eslint.presets.sonar]
|
|
380
|
-
package = "eslint-plugin-sonarjs"
|
|
381
|
-
source = "configs.recommended"
|
|
382
|
-
|
|
383
|
-
[eslint.presets.unicorn]
|
|
384
|
-
package = "eslint-plugin-unicorn"
|
|
385
|
-
source = "configs.recommended"
|
|
386
|
-
|
|
387
|
-
[eslint.presets.packageJson]
|
|
388
|
-
package = "eslint-plugin-package-json"
|
|
389
|
-
source = "configs.recommended"
|
|
390
|
-
|
|
391
|
-
[eslint.presets.prettier]
|
|
392
|
-
package = "eslint-config-prettier"
|
|
393
|
-
source = ""
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Bun
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Read this rule when code runs on Bun.
|
|
4
4
|
|
|
5
5
|
## Module resolution
|
|
6
6
|
|
|
7
7
|
- Match internal imports to the project entry point and TypeScript configuration. Bun
|
|
8
8
|
[resolves TypeScript directly](https://bun.sh/docs/runtime/module-resolution), including
|
|
9
|
-
explicit `.ts` imports and extensionless paths. Do not assume the project
|
|
9
|
+
explicit `.ts` imports and extensionless paths. Do not assume the project outputs `.js` files.
|
|
10
10
|
|
|
11
11
|
## APIs
|
|
12
12
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Read this rule when you change an Astro, Svelte, Vue, or React component.
|
|
4
4
|
|
|
5
5
|
## Props and tests
|
|
6
6
|
|
|
7
7
|
- Keep markup declarative. Move an expression longer than one operator into a derived value.
|
|
8
8
|
- Do not reach into a child to change its state.
|
|
9
|
-
- Do not copy a prop into local state and
|
|
9
|
+
- Do not copy a prop into local state and sync it by hand.
|
|
10
10
|
- Pass the fields a child reads. Avoid passing a whole store or parent object.
|
|
11
|
-
- Test a component through what the application shows
|
|
11
|
+
- Test a component through what the application shows and how the user acts, not its internal state.
|
|
12
12
|
|
|
13
13
|
## Component conventions
|
|
14
14
|
|
|
15
15
|
<!-- level: all -->
|
|
16
16
|
|
|
17
17
|
- One component has one job. Split a component when its markup holds two unrelated regions.
|
|
18
|
-
- Name a component in PascalCase and
|
|
18
|
+
- Name a component in PascalCase and its file to match.
|