@peerigon/configs 1.0.1 → 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,34 @@
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
+
22
+ # [1.1.0](https://github.com/peerigon/configs/compare/v1.0.1...v1.1.0) (2025-02-08)
23
+
24
+ ### Bug Fixes
25
+
26
+ - Do not complain about export default in config.ts files ([1e8b762](https://github.com/peerigon/configs/commit/1e8b762a6afe362f75e9095d25962864d10c3565))
27
+
28
+ ### Features
29
+
30
+ - Disable "max-nested-callbacks" in tests ([1690ac4](https://github.com/peerigon/configs/commit/1690ac493cdc0ed55b91f4c83a73c4b713bd3a6b))
31
+
1
32
  ## [1.0.1](https://github.com/peerigon/configs/compare/v1.0.0...v1.0.1) (2025-02-04)
2
33
 
3
34
  ### 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/README.md CHANGED
@@ -27,7 +27,7 @@ export default [
27
27
  ];
28
28
  ```
29
29
 
30
- Recommended configuration in your `package.json` (using [`npm-run-all`](https://www.npmjs.com/package/npm-run-all)):
30
+ Recommended configuration in your `package.json` (using [`npm-run-all2`](https://www.npmjs.com/package/npm-run-all2)):
31
31
 
32
32
  ```json
33
33
  {
@@ -146,6 +146,8 @@ export const javascript = [
146
146
  rules: {
147
147
  // Top-level await might slow down the test suite start up
148
148
  "unicorn/prefer-top-level-await": "off",
149
+ // Nesting is pretty common in tests when you group tests
150
+ "max-nested-callbacks": "off",
149
151
  },
150
152
  },
151
153
  ];
@@ -2,7 +2,7 @@
2
2
  export const noDefaultExport = [
3
3
  {
4
4
  // Config files often have a single default export
5
- ignores: ["*.config.js"],
5
+ ignores: ["*.config.{js,ts}"],
6
6
  rules: {
7
7
  "no-restricted-syntax": [
8
8
  "error",
@@ -0,0 +1 @@
1
+ export default {};
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.0.1",
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",
@@ -23,7 +23,7 @@ Recommended configuration in your `package.json`:
23
23
  "release": "semantic-release"
24
24
  },
25
25
  "publishConfig": {
26
- "//": "only if the package is supposed to be public"
26
+ "//": "only if the package is supposed to be public",
27
27
  "access": "public",
28
28
  "provenance": true
29
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../../eslint/rules/javascript.js"],"names":[],"mappings":"AAKA,+CAA+C;AAC/C,yBADW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAiJzC"}
1
+ {"version":3,"file":"javascript.d.ts","sourceRoot":"","sources":["../../../eslint/rules/javascript.js"],"names":[],"mappings":"AAKA,+CAA+C;AAC/C,yBADW,OAAO,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAmJzC"}
@@ -0,0 +1,3 @@
1
+ declare const _default: {};
2
+ export default _default;
3
+ //# sourceMappingURL=vitest.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../../../../eslint/styles/no-default-export.test/vitest.config.ts"],"names":[],"mappings":";AAAA,wBAAkB"}
@@ -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"