Skip to content
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

Use tsconfig/bases/strictest #662

Open
devinrhode2 opened this issue May 7, 2022 · 2 comments
Open

Use tsconfig/bases/strictest #662

devinrhode2 opened this issue May 7, 2022 · 2 comments

Comments

@devinrhode2
Copy link
Contributor

devinrhode2 commented May 7, 2022

If we wanted to be maximally opinionated, use: https://github.com/tsconfig/bases/blob/main/bases/node16-strictest-esm.combined.json

I personally do not like unit testing (yet), so XO with the "strictest" base tsconfig I think would be amazing!

If we wanted to be slightly less opinionated, we can just use the "strictest" config here: https://github.com/tsconfig/bases/blob/main/bases/strictest.json

@sindresorhus
Copy link
Member

I believe we already have the strictest config:

xo/lib/constants.js

Lines 121 to 131 in f952701

const TSCONFIG_DEFAULTS = {
compilerOptions: {
target: 'es2018',
newLine: 'lf',
strict: true,
noImplicitReturns: true,
noUnusedLocals: true,
noUnusedParameters: true,
noFallthroughCasesInSwitch: true,
},
};

Not all compiler properties apply to the TS ESlint plugin.

@devinrhode2
Copy link
Contributor Author

Interesting. How can XO know what compiler settings have any effect on the TS ESLint plugin? The project could export an object type 💡

This gets me thinking,
What if instead of having ANY defaults here, we just fail and tell the user to add their own tsconfig

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants