惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

K
Kaspersky official blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
F
Full Disclosure
B
Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
Lohrmann on Cybersecurity
月光博客
月光博客
I
Intezer
博客园 - 三生石上(FineUI控件)
Hacker News - Newest:
Hacker News - Newest: "LLM"
D
Darknet – Hacking Tools, Hacker News & Cyber Security
博客园_首页
P
Proofpoint News Feed
C
Check Point Blog
N
News | PayPal Newsroom
H
Heimdal Security Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
G
GRAHAM CLULEY
WordPress大学
WordPress大学
C
CERT Recently Published Vulnerability Notes
Y
Y Combinator Blog
Recorded Future
Recorded Future
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
Tailwind CSS Blog
W
WeLiveSecurity
L
LINUX DO - 热门话题
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Schneier on Security
Schneier on Security
爱范儿
爱范儿
Martin Fowler
Martin Fowler
U
Unit 42
T
Troy Hunt's Blog
S
Securelist
V
V2EX
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
M
MIT News - Artificial intelligence
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News

Kent C. Dodds Blog

Implementing Hybrid Semantic + Lexical Search Simplifying Containers with Cloudflare Sandboxes Migrating to Workspaces and Nx Offloading FFmpeg with Cloudflare Building Semantic Search on my Content Helping YOU ask ME questions with AI How I used Cursor to Migrate Frameworks The Dow's Start on the Covenant Path 2025 in Review The next chapter: EpicAI.pro AI is taking your job How I increased my visibility Launching Epic Web 2023 in Review Stop Being a Junior RSC with Dan Abramov and Joe Savona Live Stream Fixing a Memory Leak in a Production Node.js App 2022 in Review My Car Accident I Migrated from a Postgres Cluster to Distributed SQLite with LiteFS I'm building EpicWeb.dev A review of my time at Remix Remix: The Yang to React's Yin How I help you build better websites Why I Love Remix The State Initializer Pattern How to React ⚛️ Get a catch block error message with TypeScript Building an awesome image loading experience How Remix makes CSS clashes predictable Introducing the new kentcdodds.com How I built a modern website in 2021 How to use React Context effectively Static vs Unit vs Integration vs E2E Testing for Frontend Apps The Testing Trophy and Testing Classifications Array reduce vs chaining vs for loop Don't Solve Problems, Eliminate Them Super Simple Start to Remix Super Simple Start to ESModules in Node.js JavaScript Pass By Value Function Parameters How to write a Constrained Identity Function (CIF) in TypeScript How to optimize your context value How to write a React Component in TypeScript TypeScript Function Syntaxes Listify a JavaScript Array Build vs Buy: Component Libraries edition Using fetch with TypeScript Wrapping React.useState with TypeScript Define function overload types with TypeScript 2020 in Review Business and Engineering alignment Hi, thanks for reaching out to me 👋 useEffect vs useLayoutEffect Super simple start to Firebase functions Super simple start to Netlify functions Super Simple Start to css variables Favor Progress Over Pride in Open Source Testing Implementation Details How getting into Open Source has been awesome for me useState lazy initialization and function updates Use ternaries rather than && in JSX Application State Management with React Use react-error-boundary to handle errors in React JavaScript to Know for React How I structure Express apps What open source project should I contribute to? When I follow TDD AHA Programming 💡 How I Record Educational Videos Should I write a test or fix a bug? Stop mocking fetch Intentional Career Building Improve test error messages of your abstractions Tracing user interactions with React Eliminate an entire category of bugs with a few simple tools Common mistakes with React Testing Library Super Simple Start to React Stop using client-side route redirects The State Reducer Pattern with React Hooks Function forms Replace axios with a simple custom fetch wrapper How to test custom React hooks React Production Performance Monitoring Should I useState or useReducer? Stop using isLoading booleans Make Your Test Fail Make your own DevTools An Argument for Automation Fix the "not wrapped in act(...)" warning Super Simple Start to ESModules in the Browser Implementing a simple state machine library in JavaScript 2010s Decade in Review Why users care about how you write code Why I avoid nesting closures Don't call a React function component Why your team needs TestingJavaScript.com Inversion of Control Understanding React's key prop How to Enable React Concurrent Mode Profile a React App for Performance
Tools without config 🛠📦
Kent C. Dodds 🏹 @kentcdodds · 2017-09-26 · via Kent C. Dodds Blog

I work on a team at PayPal that tries to make other teams more productive. One of the biggest problems we face is tooling. Every team has to set up and configure tooling for testing, client-side bundling, linting, etc. etc. etc. What invariably happens with this is developers have just enough time to get it working and then have to move on to other priorities. So the tooling is less than optimized. 😱 Webpack configs work, but could be improved. Linters fall out of date and bugs that a good linting rule could have prevented get shipped. And who has the time to even think about setting up a typing tool like Flow??

At PayPal we have a project "generator" (it's really just a repo that you clone). An unfortunate truth of generators is that they only bootstraps the project. They leave you with all the config and the burden of keeping things up to date. And if the generator authors update the generator, what about updating all the users? 😑

It's a Sisyphean task...

a dog trying to climb a slider but failing

One thing that has been awesome for the productivity of the entire React community has been create-react-app. If you're unfamiliar, create-react-app bootstraps react applications that have a great webpack build and jest for testing that supports babel and eslint. And it does this by leaving you with a single tool dependency and no configuration. That tool is called "react-scripts." This tool is a CLI with scripts for (among others) build and test. It couldn't be simpler (and if you think it could, then feel free to file an issue).

Inspired by this, I decided to start working on paypal-scripts. It's the same basic idea, with one major exception. According to create-react-app's core ideas:

The purpose of this tool is to provide the best experience for people getting started with React, and this will always be our first priority.

For PayPal however, the goal is to make developers more productive at shipping better products. This is why it comes with a great default configuration so most of the time you shouldn't need to configure anything. Big productivity boost. At the same time, we do need to cover more use cases if we're going to provide our engineers real value, so while create-react-app doesn't allow for custom configuration, paypal-scripts does.

There is a project called react-app-rewired by Tim Arney. It's awesome. However, I've taken a different approach to making paypal-scripts configurable. Rather than allowing you to have a config file that accepts config and lets you return your "rewired" config, paypal-scripts will assume that you want the built-in configuration unless you've configured things yourself. For example, if you add a .babelrc file or a babel property to your package.json, then paypal-scripts will use your babel configuration rather than the built-in config. This makes things much more predictable and less magical. ✨

To make things even better, paypal-scripts exposes all of its configuration so you can compose your custom config with the built-in config ⚡️. So if you wanted to add a custom babel plugin it's as easy as adding this to your package.json:

{
	"babel": {
		"presets": ["paypal-scripts/babel"],
		"plugins": ["glamorous-displayname"]
	}
}

I've been using a generator for my open source projects for over a year now. It's been a huge productivity boost. However I've been suffering from all the same things I've discussed in this blog post. So with the excitement of creating paypal-scripts, I've also been working on kcd-scripts which does the same things except encodes the preferences I have for my own projects in the CLI. I've been slowly adding it to my projects and I couldn't be happier with the git diffs 😍. I mean… check this out:

That's a ton of config and dependencies I no longer need to maintain 🙌. Multiply that by the 100 packages I've published on npm and that's some pretty serious productivity gains 🚀.

It's open source, so you can go look at it and use it even if you like! But it's pretty specific to me, not well documented, and subject to my whims, so I suggest that you fork it and make of it what you want. Seriously, I recommend to anyone who has more than a handful of projects they maintain to create and use a tool like this. I'm already feeling the wins.

Good luck to you all! 👍