Skip to content

Commit 3bd380d

Browse files
authored
docs: typo cleanups for docs (#16374)
* docs: typos in comments/JSDocs * fix: bad CSS position value rekative * fix: UK spelling of behavior for ScrollOption
1 parent b3a0837 commit 3bd380d

9 files changed

Lines changed: 24 additions & 25 deletions

File tree

docs/src/assets/js/search.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function maintainScrollVisibility(activeElement, scrollParent) {
111111
else if (isBelow) {
112112
scrollParent.scrollTo(0, offsetTop - parentOffsetHeight + offsetHeight);
113113
}
114-
114+
115115
}
116116

117117

@@ -164,7 +164,7 @@ document.addEventListener('keydown', function (e) {
164164
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
165165
e.preventDefault();
166166
searchInput.focus();
167-
document.querySelector('.search').scrollIntoView({ behaviour: "smooth", block: "start" });
167+
document.querySelector('.search').scrollIntoView({ behavior: "smooth", block: "start" });
168168
}
169169

170170
const searchResults = Array.from(document.querySelectorAll('.search-results__item'));
@@ -188,4 +188,3 @@ document.addEventListener('keydown', function (e) {
188188
maintainScrollVisibility(activeSearchResult, resultsElement);
189189
}
190190
});
191-

docs/src/assets/scss/components/search.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
width: 100%;
7171
border-radius: 0 0 var(--border-radius) var(--border-radius);
7272
border: 1px solid var(--divider-color);
73-
position: rekative;
73+
position: relative;
7474
top: .25rem;
7575
max-height: 400px;
7676
overflow-y: auto;

docs/src/user-guide/configuring/configuration-files-new.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ You can limit which files a configuration object applies to by specifying a comb
7676

7777
```js
7878
export default [
79-
{
79+
{
8080
files: ["src/**/*.js"],
8181
rules: {
8282
semi: "error"
@@ -89,7 +89,7 @@ Here, only the JavaScript files in the `src` directory will have the `semi` rule
8989

9090
```js
9191
export default [
92-
{
92+
{
9393
files: ["src/**/*.js"],
9494
ignores: ["**/*.config.js"],
9595
rules: {
@@ -103,7 +103,7 @@ This configuration object matches all JavaScript files in the `src` directory ex
103103

104104
```js
105105
export default [
106-
{
106+
{
107107
files: ["src/**/*.js"],
108108
ignores: ["**/*.config.js", "!**/eslint.config.js"],
109109
rules: {
@@ -119,7 +119,7 @@ If `ignores` is used without `files` and any other setting, then the configurati
119119

120120
```js
121121
export default [
122-
{
122+
{
123123
ignores: ["**/*.config.js"],
124124
rules: {
125125
semi: "error"
@@ -136,7 +136,7 @@ If `ignores` is used without any other keys in the configuration object, then th
136136

137137
```js
138138
export default [
139-
{
139+
{
140140
ignores: [".config/*"]
141141
}
142142
];
@@ -156,16 +156,16 @@ export default [
156156
globals: {
157157
MY_CUSTOM_GLOBAL: "readonly"
158158
}
159-
}
159+
}
160160
},
161-
{
161+
{
162162
files: ["tests/**/*.js"],
163163
languageOptions: {
164164
globals: {
165165
it: "readonly",
166166
describe: "readonly"
167167
}
168-
}
168+
}
169169
}
170170
];
171171
```
@@ -232,8 +232,8 @@ export default [
232232
ESLint can evaluate your code in one of three ways:
233233

234234
1. ECMAScript module (ESM) - Your code has a module scope and is run in strict mode.
235-
1. CommonJS - Your code has a top-level function scope and runs in nonstrict mode.
236-
1. Script - Your code has a shared global scope and runs in nonstrict mode.
235+
1. CommonJS - Your code has a top-level function scope and runs in non-strict mode.
236+
1. Script - Your code has a shared global scope and runs in non-strict mode.
237237

238238
You can specify which of these modes your code is intended to run in by specifying the `sourceType` property. This property can be set to `"module"`, `"commonjs"`, or `"script"`. By default, `sourceType` is set to `"module"` for `.js` and `.mjs` files and is set to `"commonjs"` for `.cjs` files. Here's an example:
239239

@@ -343,7 +343,7 @@ export default [
343343
rules: {
344344
"jsdoc/require-description": "error",
345345
"jsdoc/check-values": "error"
346-
}
346+
}
347347
}
348348
];
349349
```
@@ -364,7 +364,7 @@ export default [
364364
rules: {
365365
"jsdoc/require-description": "error",
366366
"jsdoc/check-values": "error"
367-
}
367+
}
368368
}
369369
];
370370
```
@@ -383,7 +383,7 @@ export default [
383383
rules: {
384384
"jsd/require-description": "error",
385385
"jsd/check-values": "error"
386-
}
386+
}
387387
}
388388
];
389389
```

lib/config/flat-config-array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class FlatConfigArray extends ConfigArray {
7070
}
7171

7272
/**
73-
* The baes config used to build the config array.
73+
* The base config used to build the config array.
7474
* @type {Array<FlatConfig>}
7575
*/
7676
this[originalBaseConfig] = baseConfig;

lib/eslint/eslint-helpers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ function isNonEmptyString(x) {
6767
}
6868

6969
/**
70-
* Check if a given value is an array of non-empty stringss or not.
70+
* Check if a given value is an array of non-empty strings or not.
7171
* @param {any} x The value to check.
72-
* @returns {boolean} `true` if `x` is an array of non-empty stringss.
72+
* @returns {boolean} `true` if `x` is an array of non-empty strings.
7373
*/
7474
function isArrayOfNonEmptyString(x) {
7575
return Array.isArray(x) && x.every(isNonEmptyString);

lib/eslint/flat-eslint.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ class FlatESLint {
872872
}
873873

874874

875-
// set up fixer for fixtypes if necessary
875+
// set up fixer for fixTypes if necessary
876876
let fixer = fix;
877877

878878
if (fix && fixTypesSet) {
@@ -1048,7 +1048,7 @@ class FlatESLint {
10481048
* The following values are allowed:
10491049
* - `undefined` ... Load `stylish` builtin formatter.
10501050
* - A builtin formatter name ... Load the builtin formatter.
1051-
* - A thirdparty formatter name:
1051+
* - A third-party formatter name:
10521052
* - `foo` → `eslint-formatter-foo`
10531053
* - `@foo` → `@foo/eslint-formatter`
10541054
* - `@foo/bar` → `@foo/eslint-formatter-bar`

lib/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const optionator = require("optionator");
6767
/**
6868
* Creates the CLI options for ESLint.
6969
* @param {boolean} usingFlatConfig Indicates if flat config is being used.
70-
* @returns {Object} The opinionator instance.
70+
* @returns {Object} The optionator instance.
7171
*/
7272
module.exports = function(usingFlatConfig) {
7373

tests/lib/eslint/flat-eslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4176,7 +4176,7 @@ describe("FlatESLint", () => {
41764176

41774177

41784178
/*
4179-
* These tests fail due to a bug in fast-flob that doesn't allow
4179+
* These tests fail due to a bug in fast-glob that doesn't allow
41804180
* negated patterns inside of ignores. These tests won't work until
41814181
* this bug is fixed:
41824182
* https://github.com/mrmlnc/fast-glob/issues/356

tests/lib/rule-tester/rule-tester.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ describe("RuleTester", () => {
23322332
const ruleWithUndefinedSchema = {
23332333
meta: {
23342334
type: "problem",
2335-
// eslint-disable-next-line no-undefined -- intentioally added for test case
2335+
// eslint-disable-next-line no-undefined -- intentionally added for test case
23362336
schema: undefined
23372337
},
23382338
create(context) {

0 commit comments

Comments
 (0)