Set decoratorsBeforeExport to true, to match the default configuration for Ember projects #74
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.
Background
@codemod-utils/ast-javascript
's configurations for@babel/parser
had been copied fromjscodeshift
. The reason was,@codemod-utils/ast-javascript
could work likejscodeshift
without bringing in unnecessary dependencies.From a recent fork, I realized that it's better to set
decoratorsBeforeExport
totrue
, because it matches the default configuration for Ember projects.According to Babel:
Notes
Changing the
decoratorsBeforeExport
totrue
may affect codemods that look at JavaScript files. In practice, however, I don't think this will occur often enough that I'd need to consider this pull request a breaking change.For all of my codemods that depend on
@codemod-utils/ast-javascript
, the tests continued to pass after I patched the package by settingdecoratorsBeforeExport
totrue
.ember-codemod-args-to-signature
ember-codemod-remove-ember-css-modules
ember-codemod-rename-test-modules
However, it's worth noting that none of these codemods have something to do with decorators.