feat(strictest): add noUncheckedSideEffectImports option#276
feat(strictest): add noUncheckedSideEffectImports option#276zanminkian wants to merge 1 commit intotsconfig:mainfrom
noUncheckedSideEffectImports option#276Conversation
|
I don't think this should be in strictest, I think it's something that a lot of people use for .css files etc - its useful as a linter but not something I'd say should be in strictest |
|
If people import // shims.d.ts
declare module "*.css" {
declare const css: unknown;
export default css;
}As for me, personally, I use triple slash directive at the beginning of the app entrance file. // main.tsx
/// <reference types="vite/client" />
import "tailwindcss/tailwind.css";
import ReactDOM from "react-dom/client";
import { App } from "./App.jsx";
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
ReactDOM.createRoot(document.getElementById("root")!).render(<App />); |
|
Yeah, this is what vite generates for you. I'd really like to make this flag enabled by default in strict mode at some point. |
|
Is it possible that we enable this flag when |
|
I'll try to see if it can be enabled in 6.0 but I don't quite know for sure. It's a very breaky flag for many people. |
|
It's unlikely we're going to try and have it enabled by default for 6.0; but having it be recommended is another story (and maybe we'll make |
|
microsoft/TypeScript#62443 TypeScript enable this flag by default in 6.0. Do we need this PR now? |
Closes #275.
This flag was introduced in TS 5.6