diff --git a/docs/src/assets/js/search.js b/docs/src/assets/js/search.js index 29162c0dc76..25282bc2d7f 100644 --- a/docs/src/assets/js/search.js +++ b/docs/src/assets/js/search.js @@ -111,7 +111,7 @@ function maintainScrollVisibility(activeElement, scrollParent) { else if (isBelow) { scrollParent.scrollTo(0, offsetTop - parentOffsetHeight + offsetHeight); } - + } @@ -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" }); } const searchResults = Array.from(document.querySelectorAll('.search-results__item')); @@ -188,4 +188,3 @@ document.addEventListener('keydown', function (e) { maintainScrollVisibility(activeSearchResult, resultsElement); } }); - \ No newline at end of file diff --git a/docs/src/assets/scss/components/search.scss b/docs/src/assets/scss/components/search.scss index ff3b41252e8..54b7762cb54 100644 --- a/docs/src/assets/scss/components/search.scss +++ b/docs/src/assets/scss/components/search.scss @@ -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; top: .25rem; max-height: 400px; overflow-y: auto; diff --git a/docs/src/user-guide/configuring/configuration-files-new.md b/docs/src/user-guide/configuring/configuration-files-new.md index c5175c420a9..cc7b42d7acc 100644 --- a/docs/src/user-guide/configuring/configuration-files-new.md +++ b/docs/src/user-guide/configuring/configuration-files-new.md @@ -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" @@ -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: { @@ -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: { @@ -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" @@ -136,7 +136,7 @@ If `ignores` is used without any other keys in the configuration object, then th ```js export default [ - { + { ignores: [".config/*"] } ]; @@ -156,16 +156,16 @@ export default [ globals: { MY_CUSTOM_GLOBAL: "readonly" } - } + } }, - { + { files: ["tests/**/*.js"], languageOptions: { globals: { it: "readonly", describe: "readonly" } - } + } } ]; ``` @@ -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: @@ -343,7 +343,7 @@ export default [ rules: { "jsdoc/require-description": "error", "jsdoc/check-values": "error" - } + } } ]; ``` @@ -364,7 +364,7 @@ export default [ rules: { "jsdoc/require-description": "error", "jsdoc/check-values": "error" - } + } } ]; ``` @@ -383,7 +383,7 @@ export default [ rules: { "jsd/require-description": "error", "jsd/check-values": "error" - } + } } ]; ``` diff --git a/lib/config/flat-config-array.js b/lib/config/flat-config-array.js index ad8986f516e..24b456da57c 100644 --- a/lib/config/flat-config-array.js +++ b/lib/config/flat-config-array.js @@ -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} */ this[originalBaseConfig] = baseConfig; diff --git a/lib/eslint/eslint-helpers.js b/lib/eslint/eslint-helpers.js index ead1af5fda9..b776ca173ba 100644 --- a/lib/eslint/eslint-helpers.js +++ b/lib/eslint/eslint-helpers.js @@ -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); diff --git a/lib/eslint/flat-eslint.js b/lib/eslint/flat-eslint.js index e436c464014..f33241212f6 100644 --- a/lib/eslint/flat-eslint.js +++ b/lib/eslint/flat-eslint.js @@ -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) { @@ -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` diff --git a/lib/options.js b/lib/options.js index 0d95f2a6354..ec370097be5 100644 --- a/lib/options.js +++ b/lib/options.js @@ -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) { diff --git a/tests/lib/eslint/flat-eslint.js b/tests/lib/eslint/flat-eslint.js index c69cba4d69f..6da4176beca 100644 --- a/tests/lib/eslint/flat-eslint.js +++ b/tests/lib/eslint/flat-eslint.js @@ -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 diff --git a/tests/lib/rule-tester/rule-tester.js b/tests/lib/rule-tester/rule-tester.js index 0e35258750c..bba5f14bfbc 100644 --- a/tests/lib/rule-tester/rule-tester.js +++ b/tests/lib/rule-tester/rule-tester.js @@ -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) {