Skip to content

Commit 7644018

Browse files
committed
reanswer questions post var rename
1 parent 8bc5e1d commit 7644018

5 files changed

Lines changed: 73 additions & 5 deletions

File tree

.copier-answers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ template_might_want_to_install_aws_ssm_port_forwarding_plugin: false
1414
template_publishes_releases: false
1515
template_uses_pulumi: false
1616
template_uses_python: false
17-
template_uses_typescript: false
17+
template_uses_typescript: true
18+
template_uses_vuejs: true
1819

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import vitest from "@vitest/eslint-plugin";
2+
import withNuxt from "./.nuxt/eslint.config.mjs";
3+
export default withNuxt(
4+
{
5+
ignores: [
6+
"**/generated/**", // ignore linting autogenerated files
7+
],
8+
},
9+
{
10+
// Disallow <script lang="js"> in Vue files
11+
files: ["**/*.vue"],
12+
rules: {
13+
"vue/block-lang": [
14+
"error",
15+
{
16+
script: {
17+
lang: "ts",
18+
},
19+
},
20+
],
21+
},
22+
},
23+
{
24+
// Disallow .js files in favor of typescript
25+
files: ["**/*.js"],
26+
rules: {
27+
"no-restricted-syntax": [
28+
"error",
29+
{
30+
selector: "Program",
31+
message: "Use .ts instead of .js.",
32+
},
33+
],
34+
},
35+
},
36+
{
37+
files: ["**/*.{test,spec}.ts"],
38+
plugins: {
39+
vitest,
40+
},
41+
rules: {
42+
...vitest.configs.all.rules,
43+
"vitest/unbound-method": "off", // requires typed linting (parserOptions.project), not configured in this project
44+
"vitest/require-mock-type-parameters": "off", // stylistic; vi.fn() inferred type is sufficient and explicit generics add noise on trivial mocks
45+
"vitest/prefer-describe-function-title": "off", // autofix rewrites string titles to identifier references, which then conflicts with vitest/valid-title for default-imported functions
46+
"vitest/padding-around-all": "off", // project test style keeps blank lines minimal (see AGENTS.md); these rules pad every block boundary
47+
"vitest/padding-around-after-all-blocks": "off",
48+
"vitest/padding-around-after-each-blocks": "off",
49+
"vitest/padding-around-before-all-blocks": "off",
50+
"vitest/padding-around-before-each-blocks": "off",
51+
"vitest/padding-around-describe-blocks": "off",
52+
"vitest/padding-around-expect-groups": "off",
53+
"vitest/padding-around-test-blocks": "off",
54+
"vitest/no-focused-tests": ["error", { fixable: false }], // automatically fixing this could confuse the user
55+
"vitest/consistent-test-filename": ["error", { pattern: ".*\\.spec\\.ts$" }],
56+
"vitest/prefer-lowercase-title": "off", // no reason to force lowercase titles
57+
"vitest/consistent-test-it": "off", // consistency for this is overrated, let the dev choose what's most readable based on the test title
58+
"vitest/prefer-to-be-falsy": "off", // sometimes you want to check explicitly for false and not just falsy
59+
"vitest/prefer-to-be-truthy": "off", // sometimes you want to check explicitly for true and not just truthy
60+
},
61+
},
62+
{
63+
files: ["tests/e2e/**/*.spec.ts"],
64+
rules: {
65+
"vitest/prefer-expect-assertions": "off", // E2E tests use Playwright's expect (for web-first auto-retrying matchers like toBeVisible), which vitest's `expect.assertions()` counter cannot track.
66+
"vitest/prefer-importing-vitest-globals": "off", // E2E tests import `expect` from Playwright, not vitest; autofix would shadow the Playwright import
67+
},
68+
},
69+
);

extensions/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def hook( # noqa: PLR0915 # yes, this is a lot of statements, but it's all just
130130
context["py314_version"] = "3.14.0"
131131

132132
# Kludge to be able to help symlinked jinja files in the child and grandchild templates
133-
context["template_uses_vuejs"] = False
134-
context["template_uses_typescript"] = False
133+
context["template_uses_vuejs"] = True
134+
context["template_uses_typescript"] = True
135135

136136
npm_pkg = context.get("npm_package_name", context.get("repo_name", ""))
137137
bare = npm_pkg.split("/")[-1] if npm_pkg.startswith("@") else npm_pkg

tests/copier_data/data1.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use_windows_in_ci: false
1212

1313

1414

15-
1615
# Data added based on the specifics of this template
1716
node_version: 24.11.0
1817
npm_org_name: great-company-npm

tests/copier_data/data2.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use_windows_in_ci: true
1212

1313

1414

15-
1615
# Data added based on the specifics of this template
1716
node_version: 24.11.1
1817
npm_org_name: ''

0 commit comments

Comments
 (0)