Revert 09c36781 & tweak linting (#1501)

This diff reverts 09c36781 and tweaks how some of our linting was
working.

I'm not actually sure what caused the regression that 09c36781 was
fixing - it was something to do with typescript being used to transpile
eslintrc.js, but that being excluded from the tsconfig for those
projects. I fixed that by removing `rootDir` from those, but that
revealed some other issues with files not getting ignored correctly.

I fixed the ignoring issue with a change I've wanted to make to these
scripts for a while: only running them on files that are actually
tracked by git, instead of on everything with a relevant extension. A
side effect of that is that we have to re-implement .eslintignore
support ourselves, but that's very straight forward: the `ignore`
package that eslint uses is very easy to include.

### Change Type
- [x] `internal` — Any other changes that don't affect the published
package (will not publish a new version)

### Test Plan
-

### Release Notes
[internal-only]
This commit is contained in:
alex 2023-06-02 11:45:51 +01:00 committed by GitHub
parent da35e0da27
commit 640bc9de24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 35 deletions

View file

@ -30,7 +30,7 @@
"build": "yarn run -T tsx scripts/build.ts",
"dev": "yarn run -T tsx scripts/dev.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
"lint": "yarn run -T eslint --report-unused-disable-directives --ignore-path ../../../.eslintignore"
"lint": "yarn run -T tsx ../../../scripts/lint.ts"
},
"devDependencies": {
"@tldraw/assets": "workspace:*",

View file

@ -21,8 +21,7 @@
"composite": true,
"importHelpers": false,
"skipDefaultLibCheck": true,
"experimentalDecorators": true,
"rootDir": ".."
"experimentalDecorators": true
},
"include": ["src", "../messages", "scripts", "../vscode-script-utils"],
"references": [

View file

@ -126,7 +126,7 @@
"build": "cd ../editor && yarn build && cd ../extension && tsx scripts/build.ts",
"package": "yarn build && tsx scripts/package.ts",
"publish": "vsce publish",
"lint": "yarn run -T eslint --report-unused-disable-directives --ignore-path ../../../.eslintignore",
"lint": "yarn run -T tsx ../../../scripts/lint.ts",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf editor && rm -rf temp & yarn"
},
"devDependencies": {

View file

@ -21,8 +21,7 @@
"composite": true,
"importHelpers": false,
"skipDefaultLibCheck": true,
"experimentalDecorators": true,
"rootDir": ".."
"experimentalDecorators": true
},
"include": ["src", "../messages", "scripts", "../vscode-script-utils"],
"references": [{ "path": "../../../packages/file-format" }]