-
-
Notifications
You must be signed in to change notification settings - Fork 919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
infra: use eslint.config.ts #3044
Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #3044 +/- ##
========================================
Coverage 99.97% 99.97%
========================================
Files 2776 2776
Lines 226262 226262
Branches 942 591 -351
========================================
+ Hits 226199 226204 +5
+ Misses 63 58 -5 |
Somehow there is a problem with the > @faker-js/faker@9.0.0-rc.0 lint /home/runner/work/faker/faker
> eslint --cache --cache-strategy content --flag unstable_ts_config .
Oops! Something went wrong! :(
ESLint: 9.9.0
TypeError: Cannot read properties of undefined (reading 'rules')
at fixupPluginRules (/home/runner/work/faker/faker/node_modules/.pnpm/@eslint+compat@1.1.1/node_modules/@eslint/compat/dist/cjs/index.cjs:214:44)
at /home/runner/work/faker/faker/eslint.config.ts:137:36
at evalModule (/home/runner/work/faker/faker/node_modules/.pnpm/jiti@1.21.6/node_modules/jiti/dist/jiti.js:1:247313)
at jiti (/home/runner/work/faker/faker/node_modules/.pnpm/jiti@1.21.6/node_modules/jiti/dist/jiti.js:1:245241)
at /home/runner/work/faker/faker/node_modules/.pnpm/jiti@1.21.6/node_modules/jiti/dist/jiti.js:1:24[8](https://github.com/faker-js/faker/actions/runs/10329602297/job/28597594550?pr=3044#step:6:9)272
at Generator.next (<anonymous>)
at /home/runner/work/faker/faker/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:238153
at new Promise (<anonymous>)
at __awaiter (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:237714)
at jiti.import (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected]/node_modules/jiti/dist/jiti.js:1:248217)
at loadFlatConfigFile (/home/runner/work/faker/faker/node_modules/.pnpm/eslint@[9](https://github.com/faker-js/faker/actions/runs/10329602297/job/28597594550?pr=3044#step:6:10)[email protected]/node_modules/eslint/lib/eslint/eslint.js:383:41)
at async calculateConfigArray (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint.js:473:28)
at async ESLint.lintFiles (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/eslint/eslint.js:905:25)
at async Object.execute (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/lib/cli.js:502:23)
at async main (/home/runner/work/faker/faker/node_modules/.pnpm/[email protected][email protected]/node_modules/eslint/bin/eslint.js:[15](https://github.com/faker-js/faker/actions/runs/10329602297/job/28597594550?pr=3044#step:6:16)3:22)
ELIFECYCLE Command failed with exit code 2. Lines 131 to 150 in cdf54e4
|
When using |
Try the following settings for vscode {
"eslint.options": {
"flags": ["unstable_ts_config"]
}
} |
3232e7e
to
03e2cb4
Compare
fbe241f
to
9d684ea
Compare
9d684ea
to
c32ac78
Compare
659fbb9
to
3ba0721
Compare
1dd9db3
1eb18c0
to
1dd9db3
Compare
Merging this already, because it had approvals in the past, but we just focused on v9.0.1 |
This PR switched to
eslint.config.ts
so we can benefit from TypeScript checks and don't need to rely anymore on a// @ts-check
comment at the top of the fileAlso it serves as a one-of-the-first examples in big Open Source adopting it and ensure stability for eslint/eslint#18134
Right now we CANT merge this, because VSCode extension is not possible to pick-up the new eslint.config.ts fileAlso the feature should be stable and not require a flag