Skip to content

Commit c26556d

Browse files
committed
Remove updateTsconfig from fix.js, simplify eslint config
1 parent be4be59 commit c26556d

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

epicshop/fix.js

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ function relativeToWorkshopRoot(dir) {
4949
}
5050

5151
await updatePkgNames()
52-
await updateTsconfig()
5352

5453
async function updatePkgNames() {
5554
for (const file of appsWithPkgJson) {
@@ -66,30 +65,6 @@ async function updatePkgNames() {
6665
}
6766
}
6867

69-
async function updateTsconfig() {
70-
const tsconfig = {
71-
files: [],
72-
exclude: ['node_modules'],
73-
references: appsWithPkgJson.map((a) => ({
74-
path: relativeToWorkshopRoot(a).replace(/\\/g, '/'),
75-
})),
76-
}
77-
const written = await writeIfNeeded(
78-
path.join(workshopRoot, 'tsconfig.json'),
79-
`${JSON.stringify(tsconfig, null, 2)}\n`,
80-
{ parser: 'json' },
81-
)
82-
83-
if (written) {
84-
// delete node_modules/.cache
85-
const cacheDir = path.join(workshopRoot, 'node_modules', '.cache')
86-
if (exists(cacheDir)) {
87-
await fs.promises.rm(cacheDir, { recursive: true })
88-
}
89-
console.log('all fixed up')
90-
}
91-
}
92-
9368
async function writeIfNeeded(filepath, content) {
9469
const oldContent = await fs.promises.readFile(filepath, 'utf8')
9570
if (oldContent !== content) {

eslint.config.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ import defaultConfig from '@epic-web/config/eslint'
33
/** @type {import("eslint").Linter.Config} */
44
export default [
55
...defaultConfig,
6-
{
7-
files: ['**/*.ts?(x)'],
8-
languageOptions: {
9-
parserOptions: {
10-
projectService: false,
11-
project: './tsconfig.json',
12-
tsconfigRootDir: import.meta.dirname,
13-
},
14-
},
15-
},
166
{
177
rules: {
188
// we leave unused vars around for the exercises

0 commit comments

Comments
 (0)