@peerigon/configs 1.1.0 → 2.0.2

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,30 @@
1
+ ## [2.0.2](https://github.com/peerigon/configs/compare/v2.0.1...v2.0.2) (2025-02-11)
2
+
3
+ ### Bug Fixes
4
+
5
+ - Refactor module settings in tsconfig ([4bce2f2](https://github.com/peerigon/configs/commit/4bce2f21317463625e27f5b47077db215f19af9d))
6
+
7
+ ## [2.0.1](https://github.com/peerigon/configs/compare/v2.0.0...v2.0.1) (2025-02-08)
8
+
9
+ ### Bug Fixes
10
+
11
+ - Type errors ([5ec3ee8](https://github.com/peerigon/configs/commit/5ec3ee8fdb4ff45fb63e67cc791e499bac8917ce))
12
+
13
+ # [2.0.0](https://github.com/peerigon/configs/compare/v1.1.0...v2.0.0) (2025-02-08)
14
+
15
+ ### Bug Fixes
16
+
17
+ - Add missing checkJs: true to TypeScript base config ([6dbd0dc](https://github.com/peerigon/configs/commit/6dbd0dcfa9eaf43efe7d8dac74bcf5e4ca4929ae))
18
+
19
+ ### Features
20
+
21
+ - Update TypeScript base config ([60843de](https://github.com/peerigon/configs/commit/60843de02fa0a5fc751a15d310e9f5afe0fad055))
22
+
23
+ ### BREAKING CHANGES
24
+
25
+ - Added noFallthroughCasesInSwitch: true
26
+ - Switched skipLibCheck to false
27
+
1
28
  # [1.1.0](https://github.com/peerigon/configs/compare/v1.0.1...v1.1.0) (2025-02-08)
2
29
 
3
30
  ### 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.2",
4
4
  "description": "Configs for ESLint, Prettier, TypeScript & friends",
5
5
  "keywords": [
6
6
  "eslint",
@@ -98,7 +98,7 @@
98
98
  "README.md"
99
99
  ],
100
100
  "scripts": {
101
- "test": "run-p test:presets:* test:styles:*",
101
+ "test": "run-p test:*",
102
102
  "test:presets:javascript": "cd eslint/presets/javascript.test; eslint --max-warnings 0 .",
103
103
  "test:presets:typescript": "cd eslint/presets/typescript.test; eslint --max-warnings 0 .",
104
104
  "test:presets:typescript-react": "cd eslint/presets/typescript-react.test; eslint --max-warnings 0 .",
@@ -122,9 +122,9 @@
122
122
  "*.{js,jsx,ts,tsx,css,md,yml,yaml}": "prettier --write"
123
123
  },
124
124
  "dependencies": {
125
- "@eslint-react/eslint-plugin": "^1.26.1",
125
+ "@eslint-react/eslint-plugin": "^1.26.2",
126
126
  "@eslint/compat": "^1.2.6",
127
- "@eslint/js": "^9.19.0",
127
+ "@eslint/js": "^9.20.0",
128
128
  "@ianvs/prettier-plugin-sort-imports": "^4.4.1",
129
129
  "@semantic-release/changelog": "^6.0.3",
130
130
  "@semantic-release/exec": "^7.0.3",
@@ -138,32 +138,33 @@
138
138
  "eslint-plugin-react": "^7.37.4",
139
139
  "eslint-plugin-react-compiler": "^19.0.0-beta-714736e-20250131",
140
140
  "eslint-plugin-react-hooks": "^5.1.0",
141
- "eslint-plugin-react-refresh": "^0.4.18",
141
+ "eslint-plugin-react-refresh": "^0.4.19",
142
142
  "eslint-plugin-unicorn": "^56.0.1",
143
143
  "globals": "^15.14.0",
144
144
  "prettier-plugin-css-order": "^2.1.2",
145
145
  "prettier-plugin-jsdoc": "^1.3.2",
146
146
  "prettier-plugin-packagejson": "^2.5.8",
147
147
  "prettier-plugin-tailwindcss": "^0.6.11",
148
- "typescript-eslint": "^8.23.0"
148
+ "typescript-eslint": "^8.24.0"
149
149
  },
150
150
  "devDependencies": {
151
151
  "@types/node": "^22.13.1",
152
152
  "@types/react": "^19.0.8",
153
- "eslint": "^9.19.0",
153
+ "@types/signale": "^1.4.7",
154
+ "eslint": "^9.20.1",
154
155
  "husky": "^9.1.7",
155
156
  "lint-staged": "^15.4.3",
156
- "npm-run-all": "^4.1.5",
157
+ "npm-run-all2": "^7.0.2",
157
158
  "pin-github-action": "^2.1.0",
158
- "prettier": "^3.4.2",
159
+ "prettier": "^3.5.0",
159
160
  "react": "^19.0.0",
160
- "semantic-release": "^24.2.1",
161
+ "semantic-release": "^24.2.2",
161
162
  "typescript": "^5.7.3"
162
163
  },
163
164
  "peerDependencies": {
164
- "eslint": "^9.19.0",
165
- "prettier": "^3.4.2",
166
- "semantic-release": "^24.2.1",
165
+ "eslint": "^9.20.1",
166
+ "prettier": "^3.5.0",
167
+ "semantic-release": "^24.2.2",
167
168
  "typescript": "^5.7.3"
168
169
  },
169
170
  "peerDependenciesMeta": {
@@ -12,7 +12,7 @@ Then create a `prettier.config.js` next to your `package.json`:
12
12
  export { default } from "@peerigon/configs/prettier";
13
13
  ```
14
14
 
15
- Recommended configuration in your `package.json` (using [`npm-run-all`](https://www.npmjs.com/package/npm-run-all)):
15
+ Recommended configuration in your `package.json` (using [`npm-run-all2`](https://www.npmjs.com/package/npm-run-all2)):
16
16
 
17
17
  ```json
18
18
  {
@@ -14,7 +14,7 @@ Then create a `tsconfig.json` just for type-checking next to your `package.json`
14
14
  }
15
15
  ```
16
16
 
17
- Recommended configuration in your `package.json` (using [`npm-run-all`](https://www.npmjs.com/package/npm-run-all)):
17
+ Recommended configuration in your `package.json` (using [`npm-run-all2`](https://www.npmjs.com/package/npm-run-all2)):
18
18
 
19
19
  ```json
20
20
  {
@@ -1,28 +1,39 @@
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": "Preserve",
9
+ "moduleDetection": "force",
10
+ "lib": ["ES2022"],
11
+
12
+ // == Strictness settings ==
13
+ "strict": true,
17
14
  "noImplicitOverride": true,
18
15
  "noImplicitReturns": true,
19
- "noPropertyAccessFromIndexSignature": true,
20
16
  "noUncheckedIndexedAccess": true,
17
+ "noUncheckedSideEffectImports": true,
18
+ "noFallthroughCasesInSwitch": true,
19
+ // We decided to turn off `exactOptionalPropertyTypes` because it's too strict
20
+ // by complaining about too much unproblematic code. We may revisit this decision later.
21
+ "exactOptionalPropertyTypes": false,
22
+
23
+ // == Module resolution settings ==
21
24
  "resolveJsonModule": true,
22
25
  "rewriteRelativeImportExtensions": true,
23
- "skipLibCheck": true,
24
- "strict": true,
25
- "target": "ESNext",
26
+ "allowImportingTsExtensions": true,
27
+
28
+ // == Other settings ==
29
+ "checkJs": true,
30
+ "forceConsistentCasingInFileNames": true,
31
+ // Using noEmit true here because you should have a separate build config anyway
32
+ "noEmit": true,
33
+ "noPropertyAccessFromIndexSignature": true,
34
+ // Not setting skipLibCheck: true for now because it can hide type conflicts in dependencies
35
+ // You can override this in your app if you can't fix it with your package manager.
36
+ "skipLibCheck": false,
26
37
  "verbatimModuleSyntax": true
27
38
  },
28
39
  "$schema": "https://json.schemastore.org/tsconfig"