@peerigon/configs 1.1.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [2.0.1](https://github.com/peerigon/configs/compare/v2.0.0...v2.0.1) (2025-02-08)
2
+
3
+ ### Bug Fixes
4
+
5
+ - Type errors ([5ec3ee8](https://github.com/peerigon/configs/commit/5ec3ee8fdb4ff45fb63e67cc791e499bac8917ce))
6
+
7
+ # [2.0.0](https://github.com/peerigon/configs/compare/v1.1.0...v2.0.0) (2025-02-08)
8
+
9
+ ### Bug Fixes
10
+
11
+ - Add missing checkJs: true to TypeScript base config ([6dbd0dc](https://github.com/peerigon/configs/commit/6dbd0dcfa9eaf43efe7d8dac74bcf5e4ca4929ae))
12
+
13
+ ### Features
14
+
15
+ - Update TypeScript base config ([60843de](https://github.com/peerigon/configs/commit/60843de02fa0a5fc751a15d310e9f5afe0fad055))
16
+
17
+ ### BREAKING CHANGES
18
+
19
+ - Added noFallthroughCasesInSwitch: true
20
+ - Switched skipLibCheck to false
21
+
1
22
  # [1.1.0](https://github.com/peerigon/configs/compare/v1.0.1...v1.1.0) (2025-02-08)
2
23
 
3
24
  ### Bug Fixes
package/README.md CHANGED
@@ -19,6 +19,7 @@ Also checkout the instructions for each respective config:
19
19
  - [Prettier](/prettier/README.md)
20
20
  - [TypeScript](/typescript/README.md)
21
21
  - [Semantic release](/semantic-release/README.md)
22
+ - [VSCode](/.vscode/README.md)
22
23
 
23
24
  ## Philosophy
24
25
 
package/eslint/types.d.ts CHANGED
@@ -5,14 +5,16 @@ declare module "eslint-plugin-react" {
5
5
  languageOptions: { [name: string]: any };
6
6
  };
7
7
 
8
- export default {
8
+ const configs: {
9
9
  configs: {
10
10
  flat: {
11
- recommended: config,
12
- ["jsx-runtime"]: config,
13
- },
14
- },
11
+ recommended: typeof config;
12
+ ["jsx-runtime"]: typeof config;
13
+ };
14
+ };
15
15
  };
16
+
17
+ export default configs;
16
18
  }
17
19
 
18
20
  declare module "eslint-plugin-prefer-arrow" {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerigon/configs",
3
- "version": "1.1.0",
3
+ "version": "2.0.1",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",
@@ -129,9 +129,9 @@
129
129
  "@semantic-release/changelog": "^6.0.3",
130
130
  "@semantic-release/exec": "^7.0.3",
131
131
  "@semantic-release/git": "^10.0.1",
132
+ "@types/eslint__js": "^8.42.3",
132
133
  "@types/eslint-config-prettier": "^6.11.3",
133
134
  "@types/eslint-plugin-jsx-a11y": "^6.10.0",
134
- "@types/eslint__js": "^8.42.3",
135
135
  "eslint-config-prettier": "^10.0.1",
136
136
  "eslint-plugin-jsx-a11y": "^6.10.2",
137
137
  "eslint-plugin-prefer-arrow": "^1.2.3",
@@ -150,6 +150,7 @@
150
150
  "devDependencies": {
151
151
  "@types/node": "^22.13.1",
152
152
  "@types/react": "^19.0.8",
153
+ "@types/signale": "^1.4.7",
153
154
  "eslint": "^9.19.0",
154
155
  "husky": "^9.1.7",
155
156
  "lint-staged": "^15.4.3",
@@ -1,28 +1,38 @@
1
1
  {
2
+ // Inspired by https://www.totaltypescript.com/tsconfig-cheat-sheet
3
+ // and https://2ality.com/2025/01/tsconfig-json.html
2
4
  "compilerOptions": {
3
- "allowImportingTsExtensions": true,
4
- "checkJs": true,
5
- // TODO: Enable erasableSyntaxOnly when TS 5.8 is released
6
- // https://www.totaltypescript.com/erasable-syntax-only
7
- // "erasableSyntaxOnly": true,
8
- "esModuleInterop": true,
9
- // by complaining about too much unproblematic code. We may revisit this decision later.
10
- // We decided to turn off `exactOptionalPropertyTypes` because it's too strict
11
- "exactOptionalPropertyTypes": false,
12
- "forceConsistentCasingInFileNames": true,
13
- "isolatedModules": true,
14
- "lib": ["DOM", "ESNext"],
15
- "module": "NodeNext",
16
- "noEmit": true,
5
+ // == Target and module settings ==
6
+ // Deliberately not using ESNext/NodeNext here to avoid breaking changes just by updating TypeScript.
7
+ "target": "ES2022",
8
+ "module": "Node16",
9
+ "lib": ["ES2022"],
10
+
11
+ // == Strictness settings ==
12
+ "strict": true,
17
13
  "noImplicitOverride": true,
18
14
  "noImplicitReturns": true,
19
- "noPropertyAccessFromIndexSignature": true,
20
15
  "noUncheckedIndexedAccess": true,
16
+ "noUncheckedSideEffectImports": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+ // We decided to turn off `exactOptionalPropertyTypes` because it's too strict
19
+ // by complaining about too much unproblematic code. We may revisit this decision later.
20
+ "exactOptionalPropertyTypes": false,
21
+
22
+ // == Module resolution settings ==
21
23
  "resolveJsonModule": true,
22
24
  "rewriteRelativeImportExtensions": true,
23
- "skipLibCheck": true,
24
- "strict": true,
25
- "target": "ESNext",
25
+ "allowImportingTsExtensions": true,
26
+
27
+ // == Other settings ==
28
+ "checkJs": true,
29
+ "forceConsistentCasingInFileNames": true,
30
+ // Using noEmit true here because you should have a separate build config anyway
31
+ "noEmit": true,
32
+ "noPropertyAccessFromIndexSignature": true,
33
+ // Not setting skipLibCheck: true for now because it can hide type conflicts in dependencies
34
+ // You can override this in your app if you can't fix it with your package manager.
35
+ "skipLibCheck": false,
26
36
  "verbatimModuleSyntax": true
27
37
  },
28
38
  "$schema": "https://json.schemastore.org/tsconfig"