
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
vue-tsc-files
Advanced tools
A tiny tool to run tsc on specific files without ignoring tsconfig.json
A tiny tool to run tsc
on specific files without ignoring tsconfig.json
.
English | 简体中文
Fork from gustavopch/tsc-files, and support the Typescript in Vue.
npm i -D vue-tsc-files
yarn add -D vue-tsc-files
I wanted to type-check only the staged files with lint-staged.
Unfortunately passing specific files like tsc --noEmit file1.ts file2.ts
will cause TypeScript to simply ignore your tsconfig.json
.
There's already an open issue in the TypeScript repo to support this use case — you may want to give a 👍 there: https://github.com/microsoft/TypeScript/issues/27379
With lint-staged:
{
"lint-staged": {
"*.{vue,ts}": "vue-tsc-files --noEmit"
}
}
Vue-tsc-files can auto search d.ts from root or src dir. If you have more, you can add there in lint-staged.config.js
const declarationFiles = ['src/global.d.ts', 'src/shims-vue.d.ts']
module.exports = {
'*.{vue,ts}': (filenames) => {
const files = [...filenames, ...declarationFiles]
return `vue-tsc-files ${files.join(' ')} --noEmit --skipLibCheck`
},
}
For the most part, it just forwards all arguments to tsc
with one exception: the specified files will not be forwarded — instead, they will be put at the files
property of a temporary config that will be generated next to your original tsconfig.json
. Other than that, just read tsc --help
.
Released under the MIT License.
FAQs
A tiny tool to run tsc on specific files without ignoring tsconfig.json
The npm package vue-tsc-files receives a total of 366 weekly downloads. As such, vue-tsc-files popularity was classified as not popular.
We found that vue-tsc-files demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.