Skip to content

Commit 060f63b

Browse files
authored
Fetched template changes (#7)
1 parent 49fe863 commit 060f63b

File tree

4 files changed

+136
-46
lines changed

4 files changed

+136
-46
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: NixOS configs template ❄️
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
import docusauruseslint from "@docusaurus/eslint-plugin";
1+
import { FlatCompat } from "@eslint/eslintrc";
22
import eslint from "@eslint/js";
33
import perfectionisteslint from "eslint-plugin-perfectionist";
44
import globals from "globals";
55
import tseslint from "typescript-eslint";
66

7+
const compat = new FlatCompat({
8+
baseDirectory: import.meta.dirname,
9+
});
10+
711
export default tseslint.config(
812
// Use recommended eslint rules
913
eslint.configs.recommended,
1014

11-
// Use strict type-checked typescript-eslint rules
12-
tseslint.configs.strictTypeChecked,
15+
// Use recommended type-checked typescript-eslint rules
16+
tseslint.configs.recommendedTypeChecked,
1317

1418
// Use stylistic type-checked typescript-eslint rules
1519
tseslint.configs.stylisticTypeChecked,
1620

21+
// Use recommended Docusaurus rules
22+
...compat.extends("plugin:@docusaurus/recommended"),
23+
1724
// Use recommended perfectionist rules
1825
perfectionisteslint.configs["recommended-alphabetical"],
1926

@@ -24,6 +31,9 @@ export default tseslint.config(
2431
// Support browser globals
2532
...globals.browser,
2633

34+
// Support ES2023 globals
35+
...globals.es2023,
36+
2737
// Support node globals
2838
...globals.node,
2939
},
@@ -33,20 +43,63 @@ export default tseslint.config(
3343
// Needed for type-aware linting
3444
projectService: true,
3545

46+
// Allow ES2022 syntax
47+
sourceType: "module",
48+
3649
// Set the root directory of the project
3750
// Needed for type-aware linting
3851
tsconfigRootDir: import.meta.dirname,
3952
},
4053
},
4154

42-
plugins: {
43-
// Enable docusaurus plugin
44-
"@docusaurus": docusauruseslint,
45-
},
46-
4755
rules: {
48-
// Use recommended docusaurus rules
49-
...docusauruseslint.configs.recommended.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",
50103
},
51104
},
52105
);

src/{% if docs %}docs{% endif %}/package-lock.json

+71-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/{% if docs %}docs{% endif %}/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"@docusaurus/module-type-aliases": "^3.7.0",
2222
"@docusaurus/tsconfig": "^3.7.0",
2323
"@docusaurus/types": "^3.7.0",
24+
"@eslint/eslintrc": "^3.3.0",
2425
"@eslint/js": "^9.21.0",
2526
"@types/react": "^18.3.18",
2627
"eslint-plugin-perfectionist": "^4.9.0",

0 commit comments

Comments
 (0)