Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: typo cleanups for docs #16374

Merged
merged 3 commits into from Oct 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions docs/src/assets/js/search.js
Expand Up @@ -111,7 +111,7 @@ function maintainScrollVisibility(activeElement, scrollParent) {
else if (isBelow) {
scrollParent.scrollTo(0, offsetTop - parentOffsetHeight + offsetHeight);
}

}


Expand Down Expand Up @@ -164,7 +164,7 @@ document.addEventListener('keydown', function (e) {
if ((e.metaKey || e.ctrlKey) && e.key === 'k') {
e.preventDefault();
searchInput.focus();
document.querySelector('.search').scrollIntoView({ behaviour: "smooth", block: "start" });
document.querySelector('.search').scrollIntoView({ behavior: "smooth", block: "start" });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

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

2 changes: 1 addition & 1 deletion docs/src/assets/scss/components/search.scss
Expand Up @@ -70,7 +70,7 @@
width: 100%;
border-radius: 0 0 var(--border-radius) var(--border-radius);
border: 1px solid var(--divider-color);
position: rekative;
position: relative;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was going to try running stylelint to see if there is any other odd ones later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a similar PR open #16226

top: .25rem;
max-height: 400px;
overflow-y: auto;
Expand Down
26 changes: 13 additions & 13 deletions docs/src/user-guide/configuring/configuration-files-new.md
Expand Up @@ -76,7 +76,7 @@ You can limit which files a configuration object applies to by specifying a comb

```js
export default [
{
{
files: ["src/**/*.js"],
rules: {
semi: "error"
Expand All @@ -89,7 +89,7 @@ Here, only the JavaScript files in the `src` directory will have the `semi` rule

```js
export default [
{
{
files: ["src/**/*.js"],
ignores: ["**/*.config.js"],
rules: {
Expand All @@ -103,7 +103,7 @@ This configuration object matches all JavaScript files in the `src` directory ex

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

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

```js
export default [
{
{
ignores: [".config/*"]
}
];
Expand All @@ -156,16 +156,16 @@ export default [
globals: {
MY_CUSTOM_GLOBAL: "readonly"
}
}
}
},
{
{
files: ["tests/**/*.js"],
languageOptions: {
globals: {
it: "readonly",
describe: "readonly"
}
}
}
}
];
```
Expand Down Expand Up @@ -232,8 +232,8 @@ export default [
ESLint can evaluate your code in one of three ways:

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

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:

Expand Down Expand Up @@ -343,7 +343,7 @@ export default [
rules: {
"jsdoc/require-description": "error",
"jsdoc/check-values": "error"
}
}
}
];
```
Expand All @@ -364,7 +364,7 @@ export default [
rules: {
"jsdoc/require-description": "error",
"jsdoc/check-values": "error"
}
}
}
];
```
Expand All @@ -383,7 +383,7 @@ export default [
rules: {
"jsd/require-description": "error",
"jsd/check-values": "error"
}
}
}
];
```
Expand Down
2 changes: 1 addition & 1 deletion lib/config/flat-config-array.js
Expand Up @@ -70,7 +70,7 @@ class FlatConfigArray extends ConfigArray {
}

/**
* The baes config used to build the config array.
* The base config used to build the config array.
* @type {Array<FlatConfig>}
*/
this[originalBaseConfig] = baseConfig;
Expand Down
4 changes: 2 additions & 2 deletions lib/eslint/eslint-helpers.js
Expand Up @@ -67,9 +67,9 @@ function isNonEmptyString(x) {
}

/**
* Check if a given value is an array of non-empty stringss or not.
* Check if a given value is an array of non-empty strings or not.
* @param {any} x The value to check.
* @returns {boolean} `true` if `x` is an array of non-empty stringss.
* @returns {boolean} `true` if `x` is an array of non-empty strings.
*/
function isArrayOfNonEmptyString(x) {
return Array.isArray(x) && x.every(isNonEmptyString);
Expand Down
4 changes: 2 additions & 2 deletions lib/eslint/flat-eslint.js
Expand Up @@ -872,7 +872,7 @@ class FlatESLint {
}


// set up fixer for fixtypes if necessary
// set up fixer for fixTypes if necessary
let fixer = fix;

if (fix && fixTypesSet) {
Expand Down Expand Up @@ -1048,7 +1048,7 @@ class FlatESLint {
* The following values are allowed:
* - `undefined` ... Load `stylish` builtin formatter.
* - A builtin formatter name ... Load the builtin formatter.
* - A thirdparty formatter name:
* - A third-party formatter name:
* - `foo` → `eslint-formatter-foo`
* - `@foo` → `@foo/eslint-formatter`
* - `@foo/bar` → `@foo/eslint-formatter-bar`
Expand Down
2 changes: 1 addition & 1 deletion lib/options.js
Expand Up @@ -67,7 +67,7 @@ const optionator = require("optionator");
/**
* Creates the CLI options for ESLint.
* @param {boolean} usingFlatConfig Indicates if flat config is being used.
* @returns {Object} The opinionator instance.
* @returns {Object} The optionator instance.
*/
module.exports = function(usingFlatConfig) {

Expand Down
2 changes: 1 addition & 1 deletion tests/lib/eslint/flat-eslint.js
Expand Up @@ -4176,7 +4176,7 @@ describe("FlatESLint", () => {


/*
* These tests fail due to a bug in fast-flob that doesn't allow
* These tests fail due to a bug in fast-glob that doesn't allow
* negated patterns inside of ignores. These tests won't work until
* this bug is fixed:
* https://github.com/mrmlnc/fast-glob/issues/356
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rule-tester/rule-tester.js
Expand Up @@ -2332,7 +2332,7 @@ describe("RuleTester", () => {
const ruleWithUndefinedSchema = {
meta: {
type: "problem",
// eslint-disable-next-line no-undefined -- intentioally added for test case
// eslint-disable-next-line no-undefined -- intentionally added for test case
schema: undefined
},
create(context) {
Expand Down