@@ -5,7 +5,11 @@ import gensync, { type Handler } from "gensync";
55import Plugin from "./plugin" ;
66import { mergeOptions } from "./util" ;
77import { createItemFromDescriptor } from "./item" ;
8- import { buildRootChain , type ConfigContext } from "./config-chain" ;
8+ import {
9+ buildRootChain ,
10+ type ConfigContext ,
11+ type FileHandling ,
12+ } from "./config-chain" ;
913import { getEnv } from "./helpers/environment" ;
1014import {
1115 validate ,
@@ -59,7 +63,7 @@ function* resolveRootMode(
5963type PrivPartialConfig = {
6064 options : ValidatedOptions ,
6165 context : ConfigContext ,
62- isIgnored : boolean ,
66+ fileHandling : FileHandling ,
6367 ignore : IgnoreFile | void ,
6468 babelrc : ConfigFile | void ,
6569 config : ConfigFile | void ,
@@ -139,7 +143,7 @@ export default function* loadPrivatePartialConfig(
139143 return {
140144 options,
141145 context,
142- isIgnored : configChain . isIgnored ,
146+ fileHandling : configChain . fileHandling ,
143147 ignore : configChain . ignore ,
144148 babelrc : configChain . babelrc ,
145149 config : configChain . config ,
@@ -158,9 +162,9 @@ export const loadPartialConfig = gensync<[any], PartialConfig | null>(
158162 const result : ?PrivPartialConfig = yield * loadPrivatePartialConfig ( opts ) ;
159163 if ( ! result ) return null ;
160164
161- const { options, babelrc, ignore, config, isIgnored , files } = result ;
165+ const { options, babelrc, ignore, config, fileHandling , files } = result ;
162166
163- if ( isIgnored && ! showIgnoredFiles ) {
167+ if ( fileHandling === "ignored" && ! showIgnoredFiles ) {
164168 return null ;
165169 }
166170
@@ -178,7 +182,7 @@ export const loadPartialConfig = gensync<[any], PartialConfig | null>(
178182 babelrc ? babelrc . filepath : undefined ,
179183 ignore ? ignore . filepath : undefined ,
180184 config ? config . filepath : undefined ,
181- isIgnored ,
185+ fileHandling ,
182186 files ,
183187 ) ;
184188 } ,
@@ -195,22 +199,22 @@ class PartialConfig {
195199 babelrc : string | void ;
196200 babelignore : string | void ;
197201 config : string | void ;
198- isIgnored : boolean ;
202+ fileHandling : FileHandling ;
199203 files : Set < string > ;
200204
201205 constructor (
202206 options : ValidatedOptions ,
203207 babelrc : string | void ,
204208 ignore : string | void ,
205209 config : string | void ,
206- isIgnored : boolean ,
210+ fileHandling : FileHandling ,
207211 files : Set < string > ,
208212 ) {
209213 this . options = options ;
210214 this . babelignore = ignore ;
211215 this . babelrc = babelrc ;
212216 this . config = config ;
213- this . isIgnored = isIgnored ;
217+ this . fileHandling = fileHandling ;
214218 this . files = files ;
215219
216220 // Freeze since this is a public API and it should be extremely obvious that
0 commit comments