Skip to content

Commit 6107c05

Browse files
authored
Fetched template changes (#42)
1 parent 2e3e636 commit 6107c05

File tree

5 files changed

+19253
-4
lines changed

5 files changed

+19253
-4
lines changed

.copier-answers.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2-
_commit: 0.9.0
2+
_commit: 0.10.0
33
_src_path: gh:quickplates/meta
44
accountname: quickplates
55
description: React app template ⚛️

src/eslint.config.mjs

+19-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default tseslint.config(
1010
eslint.configs.recommended,
1111

1212
// Use recommended type-checked typescript-eslint rules
13-
tseslint.configs.strictTypeChecked,
13+
tseslint.configs.recommendedTypeChecked,
1414

1515
// Use stylistic type-checked typescript-eslint rules
1616
tseslint.configs.stylisticTypeChecked,
@@ -73,12 +73,25 @@ export default tseslint.config(
7373
},
7474
],
7575

76-
// Allow non-null assertions
77-
"@typescript-eslint/no-non-null-assertion": "off",
76+
// Allow nullish coalescing operator for primitive types
77+
"@typescript-eslint/prefer-nullish-coalescing": [
78+
"error",
79+
{
80+
ignorePrimitives: true,
81+
},
82+
],
7883

7984
// Allow async functions without await
8085
"@typescript-eslint/require-await": "off",
8186

87+
// Skip checking whether static methods are bound
88+
"@typescript-eslint/unbound-method": [
89+
"error",
90+
{
91+
ignoreStatic: true,
92+
},
93+
],
94+
8295
// Allow anonymous default exports
8396
"import/no-anonymous-default-export": "off",
8497

@@ -87,6 +100,9 @@ export default tseslint.config(
87100

88101
// Allow empty destructuring patterns
89102
"no-empty-pattern": "off",
103+
104+
// Don't sort module members
105+
"perfectionist/sort-modules": "off",
90106
},
91107
},
92108

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import eslint from "@eslint/js";
3+
import perfectionisteslint from "eslint-plugin-perfectionist";
4+
import globals from "globals";
5+
import tseslint from "typescript-eslint";
6+
7+
const compat = new FlatCompat({
8+
baseDirectory: import.meta.dirname,
9+
});
10+
11+
export default tseslint.config(
12+
// Use recommended eslint rules
13+
eslint.configs.recommended,
14+
15+
// Use recommended type-checked typescript-eslint rules
16+
tseslint.configs.recommendedTypeChecked,
17+
18+
// Use stylistic type-checked typescript-eslint rules
19+
tseslint.configs.stylisticTypeChecked,
20+
21+
// Use recommended Docusaurus rules
22+
...compat.extends("plugin:@docusaurus/recommended"),
23+
24+
// Use recommended perfectionist rules
25+
perfectionisteslint.configs["recommended-alphabetical"],
26+
27+
// Custom configuration
28+
{
29+
languageOptions: {
30+
globals: {
31+
// Support browser globals
32+
...globals.browser,
33+
34+
// Support ES2023 globals
35+
...globals.es2023,
36+
37+
// Support node globals
38+
...globals.node,
39+
},
40+
41+
parserOptions: {
42+
// Use project service to build type information
43+
// Needed for type-aware linting
44+
projectService: true,
45+
46+
// Allow ES2022 syntax
47+
sourceType: "module",
48+
49+
// Set the root directory of the project
50+
// Needed for type-aware linting
51+
tsconfigRootDir: import.meta.dirname,
52+
},
53+
},
54+
55+
rules: {
56+
// Use objects instead of records for empty types
57+
"@typescript-eslint/consistent-indexed-object-style": [
58+
"error",
59+
"index-signature",
60+
],
61+
62+
// Use types instead of interfaces
63+
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
64+
65+
// Allow promises in callbacks
66+
"@typescript-eslint/no-misused-promises": [
67+
"error",
68+
{
69+
checksVoidReturn: false,
70+
},
71+
],
72+
73+
// Allow nullish coalescing operator for primitive types
74+
"@typescript-eslint/prefer-nullish-coalescing": [
75+
"error",
76+
{
77+
ignorePrimitives: true,
78+
},
79+
],
80+
81+
// Allow async functions without await
82+
"@typescript-eslint/require-await": "off",
83+
84+
// Skip checking whether static methods are bound
85+
"@typescript-eslint/unbound-method": [
86+
"error",
87+
{
88+
ignoreStatic: true,
89+
},
90+
],
91+
92+
// Allow anonymous default exports
93+
"import/no-anonymous-default-export": "off",
94+
95+
// Allow empty block statements
96+
"no-empty": "off",
97+
98+
// Allow empty destructuring patterns
99+
"no-empty-pattern": "off",
100+
101+
// Don't sort module members
102+
"perfectionist/sort-modules": "off",
103+
},
104+
},
105+
);

0 commit comments

Comments
 (0)