Skip to content

Commit be8f7e8

Browse files
author
Tony Sansone
committed
Updated Vale. Tested pages
1 parent be7ec3b commit be8f7e8

21 files changed

+98
-76
lines changed

.vale.ini

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
StylesPath = styles
22

33
MinAlertLevel = suggestion
4+
5+
IgnoredScopes = code, tt
6+
47
Vocab = Base, Google
58

6-
Packages = Google, proselint, write-good, Readability
9+
Packages = Google, proselint, Readability
710

811
[*]
9-
BasedOnStyles = Vale, Google, proselint, write-good, Readability
12+
BasedOnStyles = Vale, Google, proselint, Readability

README.md

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
[![OpenSSF Scorecard SVG][]][Scorecard Results]
55
[![first-timers SVG][]][first-timers]
66

7-
The https://dart.dev site, built with [Jekyll][] and hosted on [Firebase][].
7+
The [Dart](https://dart.dev) site, built with [Jekyll][] and hosted on [Firebase][].
88

9-
[We welcome contributions](CONTRIBUTING.md),
10-
and we're [first-timer friendly][first-timers]!
9+
[The Flutter team welcomes contributions](CONTRIBUTING.md),
10+
and [first-time contributors][first-timers]!
1111

1212
## Getting started
1313

14-
Start by looking for an [issue](https://github.com/dart-lang/site-www/issues)
14+
To start, look for an [issue](https://github.com/dart-lang/site-www/issues)
1515
that catches your interest, or create an issue with your proposed change.
16-
Ask for the issue to be assigned to you.
16+
Ask someone to assign the issue to you.
1717

1818
To update this site, fork the repo, make your changes, and generate a pull
19-
request. For simple changes (such as to CSS and text), you probably don't need
19+
request. For simple changes like CSS and text, you shouldn't need
2020
to build this site. Often you can make changes using the GitHub UI.
2121

2222
> **NOTE:** If you clone this repo locally,
@@ -49,17 +49,17 @@ Install the following tools, if you don't have them already:
4949

5050
- **GNU Make**.
5151
On Windows the easiest way to install Make is `choco install make`
52-
using command prompt or powershell as an admin.
52+
using command prompt or PowerShell as an admin.
5353
Other options include using a [subsystem][wsl].
5454

5555
- **Docker**.
56-
We use Docker for local dev, tests, and building the site.
56+
To develop, test, and build the site, use Docker.
5757
Install it from https://docs.docker.com/get-docker/.
5858

5959
- **Firebase CLI**, for hosting the site locally.
60-
One way to get this is to run `npm install -g firebase-tools`.
60+
Run `npm install -g firebase-tools`.
6161
For full setup details,
62-
read the [Firebase CLI documentation](https://firebase.google.com/docs/cli).
62+
check out the [Firebase CLI documentation](https://firebase.google.com/docs/cli).
6363

6464
### 2. Clone this repo _and_ its submodules
6565

@@ -105,7 +105,7 @@ _choose one_ of the following submodule-cloning techniques:
105105
$ git checkout -b <BRANCH_NAME>
106106
```
107107
108-
2. If the Docker Desktop application isn't already running on your machine,
108+
2. If the Docker Desktop app isn't already running on your machine,
109109
start it. Look for the Docker status icon: if it has an exclamation
110110
point (`!`), then update Docker Desktop before proceeding.
111111

@@ -127,12 +127,12 @@ _choose one_ of the following submodule-cloning techniques:
127127

128128
5. View your changes in the browser by navigating to `http://localhost:4000`.
129129
> **Note:** Unless you're editing files under `site-shared`,
130-
> you can safely ignore `ERROR: directory is already being watched` messages.
130+
> you can ignore `ERROR: directory is already being watched` messages.
131131
> For details, see [#1363](https://github.com/flutter/website/issues/1363).
132132
133133
6. Make your changes to the local repo.
134134

135-
The site will rebuild and the browser will autoreload to reflect the changes.
135+
The site rebuilds and the browser reloads to reflect the changes.
136136

137137
> **Tip:** If you aren't seeing the changes you expect (e.g. src/_data),
138138
> <kbd>Ctrl</kbd> + <kbd>C</kbd> out of your running dev server and rebuild the site from scratch
@@ -151,7 +151,7 @@ _choose one_ of the following submodule-cloning techniques:
151151
$ make down
152152
```
153153
154-
> **Tip:** To find additional commands, read the [Makefile][].
154+
> **Tip:** To find more commands, read the [Makefile][].
155155
> For example, if you need to debug the Docker setup,
156156
> you can run:
157157
>
@@ -207,17 +207,17 @@ personal Firebase hosting staging site as follows:
207207
$ make build
208208
```
209209

210-
This will build the site and copy it to your local `_site` directory.
211-
If that directory previously existed, it will be replaced.
210+
This command builds the site and copy it to your local `_site` directory.
211+
If that directory existed, the command replaces it.
212212

213213
1. Deploy to your activated Firebase project's default hosting site:
214214

215215
```terminal
216216
$ FIREBASE_PROJECT=<your-project> make deploy
217217
```
218218

219-
> **TIP:** Add your `FIREBASE_PROJECT` env var to your `.env` file
220-
> and it will overwrite the default every time you deploy without specifying.
219+
> **Tip:** Add your `FIREBASE_PROJECT` env var to your `.env` file
220+
> and it overwrites the default every time you deploy without specifying.
221221
222222
1. Navigate to your PR on GitHub and update it with the location of
223223
the staged version, the names of your reviewers, and so on.

src/null-safety/index.md

+24-26
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ of variables set to `null`.
1010

1111
For example, if a method expects an integer but receives `null`,
1212
your app causes a runtime error.
13-
This type of error, a null dereference error, can be difficult to debug.
13+
This error type, a null dereference error, can be difficult to debug.
1414

1515
With sound null safety, all variables require a value.
1616
This means Dart considers all variables _non-nullable_.
17-
You can assign values of the declared type only, like `int i=42`.
17+
You can assign values of the declared type, like `int i=42`.
1818
You can never assign a value of `null` to default variable types.
1919
To specify that a variable type can have a `null` value, add a `?` after
2020
the type annotation: `int? i`.
@@ -42,7 +42,7 @@ final b = Foo();
4242
```
4343

4444
<a id="creating-variables"></a>
45-
To indicate that a variable might have the value `null`,
45+
To show that a variable might have the value `null`,
4646
just add `?` to its type declaration:
4747

4848
```dart
@@ -54,43 +54,42 @@ int? aNullableInt = null;
5454
- To learn more about this topic, see
5555
[Understanding null safety](/null-safety/understanding-null-safety).
5656

57-
5857
## Null safety principles
5958

6059
Dart supports null safety using the following two core design principles:
6160

62-
* **Non-nullable by default**. Unless you explicitly tell Dart that a variable
63-
can be null, it's considered non-nullable. This default was chosen
64-
after research found that non-null was by far the most common choice in APIs.
65-
66-
* **Fully sound**. Dart's null safety is sound, which enables compiler optimizations.
67-
If the type system determines that something isn't null, then that thing can _never_ be
68-
null. Once you migrate your whole project
69-
and its dependencies to null safety,
70-
you reap the full benefits of soundness—not only
71-
fewer bugs, but smaller binaries and faster execution.
61+
* **Non-nullable by default**. Unless you set a variable to allow null,
62+
it's considered non-nullable.
63+
The Dart team chose this default after research found that APIs
64+
chose non-null more often.
7265

66+
* **Fully sound**. Dart's null safety is sound,
67+
which enables compiler optimizations.
68+
If the type system determines that something isn't null,
69+
then that thing can _never_ be null.
70+
Once you migrate your whole project and its dependencies to null safety,
71+
you reap the full benefits of soundness—not only fewer bugs,
72+
but smaller binaries and faster execution.
7373

7474
## Dart 3 and null safety
7575

7676
Dart 3 has built-in sound null safety.
7777
Dart 3 prevents code without it from running.
7878

79-
To learn how to migrate to Dart 3,
80-
check out the [Dart 3 migration guide](/resources/dart-3-migration).
79+
To learn how to migrate to Dart 3,
80+
review the [Dart 3 migration guide](/resources/dart-3-migration).
8181
Packages developed without null safety support cause issues
8282
when resolving dependencies:
8383

8484
```terminal
8585
$ dart pub get
8686
87-
Because pkg1 doesn't support null safety, version solving failed.
87+
Because `pkg1` doesn't support null safety, version solving failed.
8888
The lower bound of "sdk: '>=2.9.0 <3.0.0'" must be 2.12.0 or higher to enable null safety.
8989
```
9090

9191
Libraries incompatible with Dart 3 cause analysis or compilation errors.
9292

93-
9493
```terminal
9594
$ dart analyze .
9695
Analyzing .... 0.6s
@@ -111,10 +110,10 @@ To resolve these issues:
111110

112111
1. Check for [null safe versions](/null-safety/migration-guide#check-dependency-status)
113112
of any packages you installed from pub.dev
114-
2. [migrate](#migrate) all of your source code to use sound null safety.
113+
2. [migrate](#migrate) all your source code to use sound null safety.
115114

116-
Dart 3 can be found in the stable channels for Dart and Flutter.
117-
To learn more, check out [the download page][] for details.
115+
You can find Dart 3 in the stable channels for Dart and Flutter.
116+
To learn more, review [the download page][] for details.
118117
To test your code for Dart 3 compatibility, use Dart 3 or later.
119118

120119
```terminal
@@ -123,7 +122,7 @@ $ dart pub get / flutter pub get # this should resolve without issues
123122
$ dart analyze / flutter analyze # this should pass without errors
124123
```
125124

126-
If the `pub get` step fails, check the [status of the dependencies][].
125+
If the `pub get` step fails, verify the [status of the dependencies][].
127126

128127
If the `analyze` step fails, update your code to resolve the issues
129128
listed by the analyzer.
@@ -134,7 +133,7 @@ listed by the analyzer.
134133
## Dart 2.x and null safety {#enable-null-safety}
135134

136135
From Dart 2.12 to 2.19, you need to enable null safety.
137-
You cannot use null safety in SDK versions earlier than Dart 2.12.
136+
You can't use null safety in SDK versions earlier than Dart 2.12.
138137

139138
<a id="constraints"></a>
140139
To enable sound null safety, set the
@@ -170,11 +169,11 @@ $ dart migrate
170169
```
171170

172171
To learn how to migrate your code to null safety,
173-
check out the [migration guide][].
172+
review the [migration guide][].
174173

175174
## Where to learn more
176175

177-
To learn more about null safety, check out the following resources:
176+
To learn more about null safety, review the following resources:
178177

179178
* [Null safety codelab][]
180179
* [Understanding null safety][]
@@ -190,4 +189,3 @@ To learn more about null safety, check out the following resources:
190189
[#34233]: https://github.com/dart-lang/sdk/issues/34233
191190
[#49529]: https://github.com/dart-lang/sdk/issues/49529
192191
[#2357]: https://github.com/dart-lang/language/issues/2357
193-

src/resources/index.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ toc: false
66

77
Check out the following Dart language resources:
88

9-
109
<div class="card-grid">
1110
<div class="card">
1211
<h3><a href="/resources/books">Books</a></h3>

styles/Google/Contractions.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
extends: substitution
2-
message: "Feel free to use '%s' instead of '%s'."
2+
message: "Use '%s' instead of '%s'."
33
link: 'https://developers.google.com/style/contractions'
44
level: suggestion
55
ignorecase: true

styles/Google/Exclamation.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ message: "Don't use exclamation points in text."
33
link: 'https://developers.google.com/style/exclamation-points'
44
nonword: true
55
level: error
6+
action:
7+
name: remove
68
tokens:
7-
- '\w!(?:\s|$)'
9+
- '\w+!(?:\s|$)'

styles/Google/GenderBias.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: "Consider using '%s' instead of '%s'."
33
link: 'https://developers.google.com/style/inclusive-documentation'
44
ignorecase: true
55
level: error
6+
action:
7+
name: replace
68
swap:
79
(?:alumna|alumnus): graduate
810
(?:alumnae|alumni): graduates

styles/Google/Headings.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
extends: capitalization
22
message: "'%s' should use sentence-style capitalization."
3-
link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings'
3+
link: "https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings"
44
level: warning
55
scope: heading
66
match: $sentence
77
indicators:
8-
- ':'
8+
- ":"
99
exceptions:
1010
- Azure
1111
- CLI
12-
- Code
1312
- Cosmos
1413
- Docker
1514
- Emmet

styles/Google/Latin.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ nonword: true
77
action:
88
name: replace
99
swap:
10-
'\b(?:eg|e\.g\.)[\s,]': for example
11-
'\b(?:ie|i\.e\.)[\s,]': that is
10+
'\b(?:eg|e\.g\.)(?=[\s,;])': for example
11+
'\b(?:ie|i\.e\.)(?=[\s,;])': that is

styles/Google/Passive.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ tokens:
3030
- built
3131
- burnt
3232
- burst
33+
- by
3334
- cast
3435
- caught
3536
- chosen

styles/Google/Spacing.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ message: "'%s' should have one space."
33
link: 'https://developers.google.com/style/sentence-spacing'
44
level: error
55
nonword: true
6+
action:
7+
name: remove
68
tokens:
79
- '[a-z][.?!] {2,}[A-Z]'
810
- '[a-z][.?!][A-Z]'

styles/Google/Spelling.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ ignorecase: true
55
level: warning
66
tokens:
77
- '(?:\w+)nised?'
8-
- '(?:\w+)logue'
8+
- 'colour'
9+
- 'labour'
10+
- 'centre'

styles/Google/Units.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
extends: existence
22
message: "Put a nonbreaking space between the number and the unit in '%s'."
3-
link: 'https://developers.google.com/style/units-of-measure'
3+
link: "https://developers.google.com/style/units-of-measure"
44
nonword: true
55
level: error
66
tokens:
7-
- \d+(?:B|kB|MB|GB|TB)
8-
- \d+(?:ns|ms|s|min|h|d)
7+
- \b\d+(?:B|kB|MB|GB|TB)
8+
- \b\d+(?:ns|ms|s|min|h|d)

0 commit comments

Comments
 (0)