forked from projen/projen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint): use prettier if enabled (projen#1450)
When `prettier` is enabled, automatically configure `Eslint` to use it for code formatting, while disabling any rules that may conflict. Previously, users would have had to explicitly set `prettier: true` both at the project level and within `eslintOptions`. BREAKING CHANGE: Prettier configuration is now under a `settings` option instead (instead of `prettierOptions: { bracketSpacing: false }`, write `prettierOptions: { settings: { bracketSpacing: false } }`). * **prettier:** `prettier.config` is now called `prettier.settings` and DOES NOT include `overrides`. * **node:** The `prettierIgnoreEnabled` option is now under `prettierOptions.ignoreFile` and can be accessed via `prettier.ignoreFile`. Similarly, `project.addPrettierIgnore()` is now `project.prettier.addIgnorePattern()`. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Elad Ben-Israel
authored
Jan 2, 2022
1 parent
28f87cb
commit 5d970d8
Showing
9 changed files
with
501 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Components | ||
|
||
Components are building blocks that can be composed together into projects. They | ||
represent a self-contained project feature. | ||
|
||
When a component is created, it is associated with a specific project: | ||
|
||
```ts | ||
const p = new Project(...); | ||
|
||
new MyComponent(p); | ||
new YourComponent(p, { /* options */ }); | ||
``` | ||
|
||
Projects can be queried for which components have been added to them: | ||
|
||
```ts | ||
for (const c of p.components) { | ||
// do something with `component` | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.