Skip to content

Commit 98fc076

Browse files
committed
Update base configs from spautz/limited-cache#60
1 parent e50acef commit 98fc076

File tree

8 files changed

+34
-34
lines changed

8 files changed

+34
-34
lines changed

.eslintrc.cjs

+2
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,7 @@ module.exports = {
4747
'lib-dist/',
4848
'node_modules/',
4949
'storybook-static/',
50+
// Each demo app has its own eslint config, following the conventions of its build system
51+
'demos/'
5052
],
5153
};

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
"@changesets/cli": "^2.26.1",
6464
"@changesets/types": "^5.2.1",
6565
"@size-limit/preset-small-lib": "^8.2.4",
66-
"@tsconfig/recommended": "^1.0.2",
6766
"@types/testing-library__jest-dom": "^5.14.5",
6867
"@typescript-eslint/eslint-plugin": "^5.59.2",
6968
"@typescript-eslint/parser": "^5.59.2",

packages/node-library-template/src/__tests__/helloWorld.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { describe, expect, test } from 'vitest';
22

3-
import { helloWorld } from '../index';
3+
import { helloWorld } from '../index.js';
44

55
describe('helloWorld', () => {
66
test('is exported', () => {

packages/react-library-template/src/__tests__/TodoProvider.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { describe, expect, test } from 'vitest';
33
import { render, screen } from '@testing-library/react';
44

5-
import { TodoProvider } from '../index';
5+
import { TodoProvider } from '../index.js';
66

77
describe('TodoProvider', () => {
88
test('Renders without error', () => {

tsconfig-base.build.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"declaration": true,
55
"declarationMap": true,
66
"noEmit": false,
7-
"sourceMap": true,
8-
"skipLibCheck": true
7+
"sourceMap": true
98
},
109
"exclude": ["node_modules", "**/*.stories.*", "**/__tests__", "**/*.test.*"]
1110
}

tsconfig-base.typecheck.json

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"extends": "@tsconfig/recommended/tsconfig.json",
3-
42
"compilerOptions": {
5-
/* Basic Options */
6-
"target": "ES2020",
3+
// Type Checking
4+
"allowUnreachableCode": false,
5+
"allowUnusedLabels": false,
6+
"alwaysStrict": true,
7+
"exactOptionalPropertyTypes": true,
8+
"noFallthroughCasesInSwitch": true,
9+
"noImplicitOverride": true,
10+
"noImplicitReturns": true,
11+
"noUnusedLocals": true,
12+
"noUnusedParameters": true,
13+
"strict": true,
14+
// Modules
715
"module": "ES2020",
8-
"lib": ["DOM", "DOM.Iterable", "ES2020"],
9-
"allowJs": true,
16+
"moduleResolution": "nodenext",
17+
// Emit
1018
"declaration": true,
11-
"jsx": "react",
1219
"noEmit": true,
13-
"sourceMap": true,
1420
"removeComments": false,
15-
/* Strict Type-Checking Options */
16-
"strict": true,
17-
"noImplicitAny": true,
18-
"strictNullChecks": true,
19-
"strictFunctionTypes": true,
20-
"strictBindCallApply": true,
21-
"strictPropertyInitialization": true,
22-
"noImplicitThis": true,
23-
"alwaysStrict": true,
24-
/* Additional Checks */
25-
"noUnusedLocals": true,
26-
"noUnusedParameters": true,
27-
"noImplicitReturns": true,
28-
"noFallthroughCasesInSwitch": true,
29-
/* Module Resolution Options */
30-
"moduleResolution": "node",
21+
"sourceMap": true,
22+
// Javascript Support
23+
"allowJs": true,
24+
"checkJs": true,
25+
// Interop Constraints
3126
"esModuleInterop": true,
32-
/* Advanced Options */
3327
"forceConsistentCasingInFileNames": true,
34-
"skipLibCheck": false
28+
"isolatedModules": true,
29+
// Language and Environment
30+
"jsx": "react",
31+
"lib": ["DOM", "DOM.Iterable", "ES2020"],
32+
"target": "ES2020",
33+
// Completeness
34+
"skipLibCheck": true
3535
}
3636
}

tsconfig.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "./tsconfig-base.typecheck.json",
33

4-
// Check the full project for each package, plus their consumption in the demos
5-
"include": ["packages", "demos/*/src"],
4+
// Check each package, plus all config files
5+
// Each demo app has its own tsconfig, follows the conventions of its build system
6+
"include": ["*.ts", "packages/*/*.ts", "packages/*/src"],
67
"exclude": ["node_modules"]
78
}

vitest.config.ts

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { configDefaults, defineConfig } from 'vitest/config';
33
export default defineConfig({
44
test: {
55
environment: 'jsdom',
6-
globals: true,
76

87
// This gets resolved *per project* (each package, plus the root)
98
setupFiles: './setupTests.ts',

0 commit comments

Comments
 (0)