feat: Use defineConfig() and globalIgnores() helpers #164
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prerequisites checklist
What is the purpose of this pull request?
Update
migrate-config
to produce configs that usedefineConfig()
andglobalIgnores()
What changes did you make? (Give an overview)
createGlobalIgnores
function toCallExpression
and modified its implementation to useglobalIgnores
instead of an object expression. (packages/migrate-config/src/migrate-config.js
) [1] [2]migrateConfigObject
to push properties directly instead of mapping them into an object. (packages/migrate-config/src/migrate-config.js
)defineConfig
is always used by adding it to the imports and creating adefineConfigNode
for the configuration array. (packages/migrate-config/src/migrate-config.js
) [1] [2] [3] [4]defineConfig
andglobalIgnores
. This includes changes in both CommonJS (.cjs
) and ES Module (.mjs
) formats. (packages/migrate-config/tests/fixtures/basic-eslintrc/expected.cjs
,packages/migrate-config/tests/fixtures/basic-eslintrc/expected.mjs
,packages/migrate-config/tests/fixtures/gitignore-complex/expected.cjs
,packages/migrate-config/tests/fixtures/gitignore-complex/expected.mjs
,packages/migrate-config/tests/fixtures/gitignore-simple/expected.cjs
,packages/migrate-config/tests/fixtures/gitignore-simple/expected.mjs
,packages/migrate-config/tests/fixtures/import-duplicate/expected.cjs
,packages/migrate-config/tests/fixtures/import-duplicate/expected.mjs
,packages/migrate-config/tests/fixtures/no-globals-for-env/expected.cjs
,packages/migrate-config/tests/fixtures/no-globals-for-env/expected.mjs
,packages/migrate-config/tests/fixtures/overrides-extends/expected.cjs
) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27]Related Issues
fixes #163
Is there anything you'd like reviewers to focus on?