Skip to content

Commit 34136c5

Browse files
Lioness100JLHwung
andauthored
docs: fix typos (#15432)
Co-authored-by: Huáng Jùnliàng <jlhwung@gmail.com>
1 parent 2f3ef39 commit 34136c5

File tree

105 files changed

+361
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+361
-361
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ For example, in [`@babel/plugin-transform-exponentiation-operator/test`](https:/
243243

244244
- In each subfolder, you can organize your directory structure by categories of tests. (Example: these folders can be named after the feature you are testing or can reference the issue number they fix)
245245
- Generally, there are two kinds of tests for plugins
246-
  - The first is a simple test of the input and output produced by running Babel on some code. We do this by creating an [`input.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/input.js) file and an [`output.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/output.js) file. This kind of test only works in sub-subdirectories of `/fixtures`, i.e. `/fixtures/exponentian-operator/binary/input.js` and **not** `/fixtures/exponentian-operator/input.js`.
246+
  - The first is a simple test of the input and output produced by running Babel on some code. We do this by creating an [`input.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/input.js) file and an [`output.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/binary/output.js) file. This kind of test only works in sub-subdirectories of `/fixtures`, i.e. `/fixtures/exponentiation-operator/binary/input.js` and **not** `/fixtures/exponentiation-operator/input.js`.
247247
- If you need to expect an error, you can ignore creating the `output.js` file and pass a new `throws` key to the `options.json` that contains the error string that is created.
248248
- The second and preferred type is a test that actually evaluates the produced code and asserts that certain properties are true or false. We do this by creating an [`exec.js`](https://github.com/babel/babel/blob/main/packages/babel-plugin-transform-exponentiation-operator/test/fixtures/exponentian-operator/comprehensive/exec.js) file.
249249

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ function pluginImportMetaUrl({ types: t, template }) {
654654
return {
655655
visitor: {
656656
Program(programPath) {
657-
// We must be sure to run this before the instanbul plugins, because its
657+
// We must be sure to run this before the istanbul plugins, because its
658658
// instrumentation breaks our detection.
659659
programPath.traverse({
660660
// fileURLToPath(import.meta.url)

eslint/babel-eslint-tests/test/fixtures/duplicated-babel-parser/a.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { func1 } from "./iodex.js";
1+
import { func1 } from "./index.js";
22

33
export function five() {
44
return { five: `number(${5})` };

jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module.exports = {
7575
"/test/__data__/",
7676
"<rootDir>/build/",
7777
],
78-
// We don't need module name mappers here as depedencies of workspace
78+
// We don't need module name mappers here as dependencies of workspace
7979
// package should be declared explicitly in the package.json
8080
// Yarn will generate correct file links so that Jest can resolve correctly
8181
moduleNameMapper: null,
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"args": ["--whitelist", "nenexistent", "--output-type", "var"]
2+
"args": ["--whitelist", "nonexistent", "--output-type", "var"]
33
}

packages/babel-compat-data/scripts/build-corejs3-proposals.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ for (const feature of finishedProposals) {
2828
const standardizedName = feature.replace("esnext.", "es.");
2929
if (!builtInDefinitions.includes(standardizedName)) {
3030
console.log(
31-
`${feature} is now standarized as ${standardizedName}, please add "${standardizedName}" to "${builtInDefinitionsPath}"`
31+
`${feature} is now standardized as ${standardizedName}, please add "${standardizedName}" to "${builtInDefinitionsPath}"`
3232
);
3333
}
3434
}

packages/babel-core/src/config/files/import-meta-resolve.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const importMetaResolveP: Promise<ImportMeta["resolve"]> =
2525
// - we will move to ESM, so that we have direct access to import.meta.resolve, or
2626
// - the V8 bug will be fixed so that we can safely use dynamic import by default.
2727
//
28-
// I (@nicolo-ribaudo) am really anoyed by this bug, because there is no known
28+
// I (@nicolo-ribaudo) am really annoyed by this bug, because there is no known
2929
// work-around other than "don't use dynamic import if you are running in a `vm` context",
3030
// but there is no reliable way to detect it (you cannot try/catch segfaults).
3131
//

packages/babel-core/src/config/validation/plugins.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function validatePluginObject(obj: {
112112
const invalidPluginPropertyError = new Error(
113113
`.${key} is not a valid Plugin property`,
114114
);
115-
// @ts-expect-error todo(flow->ts) consider additing BabelConfigError with code field
115+
// @ts-expect-error todo(flow->ts) consider adding BabelConfigError with code field
116116
invalidPluginPropertyError.code = "BABEL_UNKNOWN_PLUGIN_PROPERTY";
117117
throw invalidPluginPropertyError;
118118
}

0 commit comments

Comments
 (0)