Skip to content

Commit

Permalink
Merge pull request #531 from gitKrystan/fix-readme
Browse files Browse the repository at this point in the history
Fix typos in readme
  • Loading branch information
gitKrystan authored Apr 25, 2023
2 parents dd4094c + 7d90602 commit dff3388
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ with decorators!
First, install the dependencies that the codemod relies on. These are
addons that the codemod will add imports from:

```
```shell
ember install ember-classic-decorator
ember install ember-decorators
```

Then, boot up your application. Then, the codemod can be run using the
following command:

```
```shell
npx ember-native-class-codemod http://localhost:4200/path/to/server [OPTIONS] path/of/files/ or/some**/*glob.js
```

Expand All @@ -35,7 +35,7 @@ The codemod accepts the following options, passed as CLI arguments, set in a `.c
| `--type` / `type` | `'services' \| 'routes' \| 'components' \| 'controllers' \| undefined`' | `undefined` | Apply transformation to only passed type. If `undefined, will match all types in path. |
| `--quote` / `quote` | `'single' \| 'double'` | `'single'` | Whether to use double or single quotes by default for new statements that are added during the codemod. |
| `--ignore-leaking-state` / `ignoreLeakingState` | `string \| string[] | `['queryParams']` | Allow-list for `ObjectExpression` or `ArrayExpression` properties to ignore issues detailed in [eslint-plugin-ember/avoid-leaking-state-in-ember-objects](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/avoid-leaking-state-in-ember-objects.md). In the classic class syntax, using arrays and objects as default properties causes their state to "leak" between instances. If you have custom properties where you know that the shared state won't be a problem (for example, read-only configuration values), you can use this config to ignore them. NOTE: Passing this option will override the defaults, so ensure you include `'queryParams'` in the list unless you explicitly wish to disallow it. Pass as a comma-separated string if using as a CLI-option. Otherwise pass as an array of strings. |
| `DecoratorsConfig` | An object with the following properties. | See below. | A list of decorators that are allowed on object literal properties. (Method decorators will always be allowed.) When the codemod finds a field with one of these decorators, it will be translated directly into a class field with the same decorator. Including a decorator in this list means that you believe that the decorator will work correctly on a class field. Pass as a comma-separated string if using as a CLI-option. Otherwise pass as an array of strings. |
| `DecoratorsConfig` | An object with the following properties. | See below. | See below. |
| `DecoratorsConfig.inObjectLiterals` | `string \| string[]` | `[]` | Allow-list for decorators currently applied to object literal properties that can be safely applied to class properties. Pass as a comma-separated string if using as a CLI-option. Otherwise pass as an array of strings. NOTE: Decorators on object methods will be allowed by default. |

### Gathering Runtime Data
Expand Down Expand Up @@ -93,7 +93,6 @@ transformation of

<!--TRANSFORMS_START-->
* [ember-object](transforms/ember-object/README.md)
* [helpers](transforms/helpers/README.md)
<!--TRANSFORMS_END-->

## Contributing
Expand Down

0 comments on commit dff3388

Please sign in to comment.