diff --git a/.eslintrc.js b/.eslintrc.js index 8712625260a..5d4b702fb7e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,85 @@ module.exports = { - extends: ["@microsoft/eslint-config-fast-dna", "prettier"], + root: true, + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint", "import"], + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + rules: { + "no-unused-vars": "off", + "no-extra-boolean-cast": "off", + "no-empty-function": "off", + "@typescript-eslint/no-empty-function": [ + "error", + { allow: ["asyncMethods", "methods"] }, + ], + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/typedef": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "max-len": ["error", 140], + "import/order": "error", + "sort-imports": [ + "error", + { + ignoreCase: true, + ignoreDeclarationSort: true, + }, + ], + "comma-dangle": "off", + "@typescript-eslint/no-empty-interface": [ + "error", + { + allowSingleExtends: true, + }, + ], + "@typescript-eslint/camelcase": "off", + "@typescript-eslint/naming-convention": [ + "error", + { + selector: "default", + format: ["UPPER_CASE", "camelCase", "PascalCase"], + leadingUnderscore: "allow", + }, + { + selector: "property", + format: null, // disable for property names because of our foo__expanded convention for JSS + // TODO: I think we can come up with a regex that ignores variables with __ in them + }, + { + selector: "variable", + format: null, // disable for variable names because of our foo__expanded convention for JSS + // TODO: I think we can come up with a regex that ignores variables with __ in them + }, + { + selector: "interface", + format: ["PascalCase"], + custom: { + regex: "^I[A-Z]", + match: false, + }, + }, + ], + "@typescript-eslint/no-inferrable-types": "off", + "no-prototype-builtins": "off", + "no-fallthrough": "off", + "no-unexpected-multiline": "off", + "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], + "@typescript-eslint/no-explicit-any": "off", + }, + overrides: [ + { + files: ["**/*.js"], + extends: ["eslint:recommended"], + env: { + node: true, + "shared-node-browser": true, + }, + rules: { + "@typescript-eslint/no-var-requires": "off", + }, + }, + ], }; diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a10e55ba4e5..5fe33757b6e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -28,12 +28,7 @@ build/ @janechu @nicholasrice @chrisdholt @awentzel # Package specific owners -# Tooling -/packages/tooling/fast-figma-plugin-msft/ @nicholasrice @bheston @janechu - # Utilities -/packages/utilities/fast-animation/ @nicholasrice @chrisdholt -/packages/utilities/fast-eslint-rules/ @nicholasrice @janechu @chrisdholt /packages/utilities/fast-web-utilities/ @janechu @chrisdholt @nicholasrice # Web components diff --git a/change/@microsoft-fast-element-ef223a56-58c8-4bb4-bfe5-7a8064470cac.json b/change/@microsoft-fast-element-ef223a56-58c8-4bb4-bfe5-7a8064470cac.json new file mode 100644 index 00000000000..99c67e84986 --- /dev/null +++ b/change/@microsoft-fast-element-ef223a56-58c8-4bb4-bfe5-7a8064470cac.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Remove eslint config package", + "packageName": "@microsoft/fast-element", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-foundation-b755c2d8-0a57-4ac0-8ca5-837c2b703606.json b/change/@microsoft-fast-foundation-b755c2d8-0a57-4ac0-8ca5-837c2b703606.json new file mode 100644 index 00000000000..a682a609d92 --- /dev/null +++ b/change/@microsoft-fast-foundation-b755c2d8-0a57-4ac0-8ca5-837c2b703606.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Remove eslint config package", + "packageName": "@microsoft/fast-foundation", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-router-80550cb4-2f40-48d3-ab8a-cff698557c14.json b/change/@microsoft-fast-router-80550cb4-2f40-48d3-ab8a-cff698557c14.json new file mode 100644 index 00000000000..7850e02f1d3 --- /dev/null +++ b/change/@microsoft-fast-router-80550cb4-2f40-48d3-ab8a-cff698557c14.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Remove eslint config package", + "packageName": "@microsoft/fast-router", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-ssr-b91534b8-d9b9-496e-be43-f3020e919985.json b/change/@microsoft-fast-ssr-b91534b8-d9b9-496e-be43-f3020e919985.json new file mode 100644 index 00000000000..74fa73b48dc --- /dev/null +++ b/change/@microsoft-fast-ssr-b91534b8-d9b9-496e-be43-f3020e919985.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Remove eslint config package", + "packageName": "@microsoft/fast-ssr", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@microsoft-fast-web-utilities-8ffff82d-8671-40ce-938f-86f88fccc4de.json b/change/@microsoft-fast-web-utilities-8ffff82d-8671-40ce-938f-86f88fccc4de.json new file mode 100644 index 00000000000..6e79a7f9991 --- /dev/null +++ b/change/@microsoft-fast-web-utilities-8ffff82d-8671-40ce-938f-86f88fccc4de.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Remove eslint config package", + "packageName": "@microsoft/fast-web-utilities", + "email": "7559015+janechu@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/package.json b/package.json index 54d29f80976..7b67974e53c 100644 --- a/package.json +++ b/package.json @@ -104,11 +104,15 @@ "@types/jest": "^25.2.1", "@types/lodash-es": "^4.17.4", "@types/node": "^15.0.1", + "@typescript-eslint/eslint-plugin": "^5.0.0", + "@typescript-eslint/parser": "^5.0.0", "beachball": "^2.31.2", "chalk": "^2.4.2", "copyfiles": "^2.4.1", "docusaurus-init": "^1.11.0", "dotenv": "^6.0.0", + "eslint": "^8.0.0", + "eslint-plugin-import": "^2.25.0", "glob": "^7.1.2", "husky": "^4.2.5", "jest-mock": "29.5.0", diff --git a/packages/utilities/fast-eslint-rules/.eslintrc.js b/packages/utilities/fast-eslint-rules/.eslintrc.js deleted file mode 100644 index 52e1fe05b6e..00000000000 --- a/packages/utilities/fast-eslint-rules/.eslintrc.js +++ /dev/null @@ -1,84 +0,0 @@ -module.exports = { - root: true, - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint", "import"], - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - ], - rules: { - "no-unused-vars": "off", - "no-extra-boolean-cast": "off", - "no-empty-function": "off", - "@typescript-eslint/no-empty-function": [ - "error", - { allow: ["asyncMethods", "methods"] }, - ], - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/typedef": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "max-len": ["error", 140], - "import/order": "error", - "sort-imports": [ - "error", - { - ignoreCase: true, - ignoreDeclarationSort: true, - }, - ], - "comma-dangle": "off", - "@typescript-eslint/no-empty-interface": [ - "error", - { - allowSingleExtends: true, - }, - ], - "@typescript-eslint/camelcase": "off", - "@typescript-eslint/naming-convention": [ - "error", - { - selector: "default", - format: ["UPPER_CASE", "camelCase", "PascalCase"], - leadingUnderscore: "allow", - }, - { - selector: "property", - format: null, // disable for property names because of our foo__expanded convention for JSS - // TODO: I think we can come up with a regex that ignores variables with __ in them - }, - { - selector: "variable", - format: null, // disable for variable names because of our foo__expanded convention for JSS - // TODO: I think we can come up with a regex that ignores variables with __ in them - }, - { - selector: "interface", - format: ["PascalCase"], - custom: { - regex: "^I[A-Z]", - match: false, - }, - }, - ], - "@typescript-eslint/no-inferrable-types": "off", - "no-prototype-builtins": "off", - "no-fallthrough": "off", - "no-unexpected-multiline": "off", - "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], - "@typescript-eslint/no-explicit-any": "off", - }, - overrides: [ - { - files: ["**/*.js"], - extends: ["eslint:recommended"], - env: { - node: true, - "shared-node-browser": true, - }, - rules: { - "@typescript-eslint/no-var-requires": "off", - }, - }, - ], -}; diff --git a/packages/utilities/fast-eslint-rules/.npmrc b/packages/utilities/fast-eslint-rules/.npmrc deleted file mode 100644 index 43c97e719a5..00000000000 --- a/packages/utilities/fast-eslint-rules/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false diff --git a/packages/utilities/fast-eslint-rules/CHANGELOG.json b/packages/utilities/fast-eslint-rules/CHANGELOG.json deleted file mode 100644 index 5c45645d9e9..00000000000 --- a/packages/utilities/fast-eslint-rules/CHANGELOG.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "name": "@microsoft/eslint-config-fast-dna", - "entries": [ - { - "date": "Wed, 01 Jun 2022 17:53:14 GMT", - "tag": "@microsoft/eslint-config-fast-dna_v2.1.0", - "version": "2.1.0", - "comments": { - "none": [ - { - "comment": "chore: update package.json metadata", - "author": "roeisenb@microsoft.com", - "commit": "4699e77715068f8610aae908ede6356a249574b6", - "package": "@microsoft/eslint-config-fast-dna" - }, - { - "comment": "update api extractor and typescript to use the latest versions", - "author": "chhol@microsoft.com", - "commit": "4699e77715068f8610aae908ede6356a249574b6", - "package": "@microsoft/eslint-config-fast-dna" - } - ] - } - }, - { - "date": "Wed, 27 Apr 2022 07:21:09 GMT", - "tag": "@microsoft/eslint-config-fast-dna_v2.1.0", - "version": "2.1.0", - "comments": { - "minor": [ - { - "comment": "update to typescript 4.6.2 and update ARIAMixin typings", - "author": "chhol@microsoft.com", - "commit": "35bdab45550b5d8b8762041110eccb06de78add5", - "package": "@microsoft/eslint-config-fast-dna" - } - ] - } - }, - { - "date": "Sun, 31 Oct 2021 07:17:45 GMT", - "tag": "@microsoft/eslint-config-fast-dna_v2.0.0", - "version": "2.0.0", - "comments": { - "major": [ - { - "comment": "update eslint-config-rules to leverage latest versions of eslint and remove react", - "author": "chhol@microsoft.com", - "commit": "a150068ee196e73fe7a4f7b538a38752e0e506ba", - "package": "@microsoft/eslint-config-fast-dna" - } - ] - } - } - ] -} diff --git a/packages/utilities/fast-eslint-rules/CHANGELOG.md b/packages/utilities/fast-eslint-rules/CHANGELOG.md deleted file mode 100644 index 080cb46c6bb..00000000000 --- a/packages/utilities/fast-eslint-rules/CHANGELOG.md +++ /dev/null @@ -1,55 +0,0 @@ -# Change Log - @microsoft/eslint-config-fast-dna - -This log was last generated on Wed, 27 Apr 2022 07:21:09 GMT and should not be manually modified. - - - -## 2.1.0 - -Wed, 27 Apr 2022 07:21:09 GMT - -### Minor changes - -- update to typescript 4.6.2 and update ARIAMixin typings (chhol@microsoft.com) - -## 2.0.0 - -Sun, 31 Oct 2021 07:17:45 GMT - -### Major changes - -- update eslint-config-rules to leverage latest versions of eslint and remove react (chhol@microsoft.com) - -## [1.1.4](https://github.com/microsoft/fast/compare/@microsoft/eslint-config-fast-dna@1.1.3...@microsoft/eslint-config-fast-dna@1.1.4) (2020-06-26) - -**Note:** Version bump only for package @microsoft/eslint-config-fast-dna - - - - - -## [1.1.2](https://github.com/microsoft/fast/compare/@microsoft/eslint-config-fast@1.1.1...@microsoft/eslint-config-fast@1.1.2) (2020-05-18) - - -### Bug Fixes - -* update eslint config to not warn on function args [#3116](https://github.com/microsoft/fast/issues/3116) ([1df06c9](https://github.com/microsoft/fast/commit/1df06c96da7518ba75de6d5635859345468bd42a)) - - - - - -## [1.1.1](https://github.com/microsoft/fast/compare/@microsoft/eslint-config-fast@1.1.0...@microsoft/eslint-config-fast@1.1.1) (2020-04-22) - -**Note:** Version bump only for package @microsoft/eslint-config-fast - - - - - -# 1.1.0 (2020-04-10) - - -### Features - -* add fast-eslint-rules to replace fast-tslint-rules package ([#2793](https://github.com/microsoft/fast/issues/2793)) ([2891e7b](https://github.com/microsoft/fast/commit/2891e7bc9af41b7ba55eb410dee019c6d1adca3b)) diff --git a/packages/utilities/fast-eslint-rules/README.md b/packages/utilities/fast-eslint-rules/README.md deleted file mode 100644 index d8b135faa2d..00000000000 --- a/packages/utilities/fast-eslint-rules/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# `@microsoft/fast-eslint-rules` - -## Usage - -### Installation - -Install the package: -``` -npm install @microsoft/eslint-config-fast-dna -``` - -### Configure your eslint config - -Add `fast-eslint-rules` as an extension in your eslint config -```js -{ - "extends": [ - "@microsoft/eslint-config-fast-dna", - // Other rule sets (if any) - ] -} -``` - -Please see [configuring eslint](https://eslint.org/docs/user-guide/configuring) for more details. diff --git a/packages/utilities/fast-eslint-rules/package.json b/packages/utilities/fast-eslint-rules/package.json deleted file mode 100644 index 9633dce0971..00000000000 --- a/packages/utilities/fast-eslint-rules/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "@microsoft/eslint-config-fast-dna", - "description": "eslint rules for FAST projects", - "sideEffects": false, - "version": "2.1.0", - "author": { - "name": "Microsoft", - "url": "https://discord.gg/FcSNfg4" - }, - "homepage": "https://www.fast.design/", - "keywords": [ - "eslint", - "typescript" - ], - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/microsoft/fast.git", - "directory": "packages/utilities/fast-eslint-rules" - }, - "bugs": { - "url": "https://github.com/microsoft/fast/issues" - }, - "main": ".eslintrc.js", - "beachball": { - "disallowedChangeTypes": [] - }, - "dependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^8.0.0", - "eslint-plugin-import": "^2.25.0", - "typescript": "~3.9.0 || ~4.3.5 || ^4.7.0" - } -} diff --git a/packages/utilities/fast-web-utilities/.eslintrc.json b/packages/utilities/fast-web-utilities/.eslintrc.json index 42fbdf1f16c..ed277537a6e 100644 --- a/packages/utilities/fast-web-utilities/.eslintrc.json +++ b/packages/utilities/fast-web-utilities/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@microsoft/eslint-config-fast-dna", "prettier"], + "extends": ["../../../.eslintrc.js"], "rules": { "import/extensions": [ "error", diff --git a/packages/utilities/fast-web-utilities/package.json b/packages/utilities/fast-web-utilities/package.json index 19f5ed51c33..9012d539f57 100644 --- a/packages/utilities/fast-web-utilities/package.json +++ b/packages/utilities/fast-web-utilities/package.json @@ -46,7 +46,6 @@ "@types/chai": "^4.2.11", "@types/karma": "^6.3.3", "@types/mocha": "^7.0.2", - "@microsoft/eslint-config-fast-dna": "^2.1.0", "chai": "^4.2.0", "chai-spies": "^1.0.0", "eslint-config-prettier": "^8.8.0", diff --git a/packages/utilities/fast-web-utilities/src/array.ts b/packages/utilities/fast-web-utilities/src/array.ts index 61e99b10eb5..00572ba24cf 100644 --- a/packages/utilities/fast-web-utilities/src/array.ts +++ b/packages/utilities/fast-web-utilities/src/array.ts @@ -2,7 +2,9 @@ * Returns the index of the last element in the array where predicate is true, and -1 otherwise. * * @param array - the array to test - * @param predicate - find calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findIndex returns -1. + * @param predicate - find calls predicate once for each element of the array, in descending order, + * until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. + * Otherwise, findIndex returns -1. */ export function findLastIndex( array: Array, diff --git a/packages/web-components/fast-element/.eslintrc.json b/packages/web-components/fast-element/.eslintrc.json index 1cf0d6bf0a7..243964ec02e 100644 --- a/packages/web-components/fast-element/.eslintrc.json +++ b/packages/web-components/fast-element/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@microsoft/eslint-config-fast-dna", "prettier"], + "extends": ["../../../.eslintrc.js"], "rules": { "max-classes-per-file": "off", "no-case-declarations": "off", diff --git a/packages/web-components/fast-element/src/components/attributes.ts b/packages/web-components/fast-element/src/components/attributes.ts index 3bc0790015e..0177cb15ee5 100644 --- a/packages/web-components/fast-element/src/components/attributes.ts +++ b/packages/web-components/fast-element/src/components/attributes.ts @@ -91,7 +91,8 @@ export const booleanConverter: ValueConverter = { }; /** - * A {@link ValueConverter} that converts to and from `boolean` values. `null`, `undefined`, `""`, and `void` values are converted to `null`. + * A {@link ValueConverter} that converts to and from `boolean` values. `null`, `undefined`, `""`, + * and `void` values are converted to `null`. * @public */ export const nullableBooleanConverter: ValueConverter = { diff --git a/packages/web-components/fast-element/src/context.ts b/packages/web-components/fast-element/src/context.ts index 3eb3d63dad4..91b7709658a 100644 --- a/packages/web-components/fast-element/src/context.ts +++ b/packages/web-components/fast-element/src/context.ts @@ -54,7 +54,8 @@ const contextEventType = "context-request"; let requestStrategy: FASTContextRequestStrategy; /** - * Enables using the {@link https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md | W3C Community Context protocol.} + * Enables using: + * {@link https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md | W3C Community Context protocol.} * @public */ export const Context = Object.freeze({ diff --git a/packages/web-components/fast-element/src/debug.ts b/packages/web-components/fast-element/src/debug.ts index 62bb143abb4..96a50b5b376 100644 --- a/packages/web-components/fast-element/src/debug.ts +++ b/packages/web-components/fast-element/src/debug.ts @@ -41,6 +41,7 @@ const debugMessages = { [1504 /* cannotAutoregisterDependency */]: "Unable to autoregister dependency.", [1505 /* cannotResolveKey */]: "Unable to resolve dependency injection key '${key}'.", [1506 /* cannotConstructNativeFunction */]: + /* eslint-disable-next-line max-len */ "'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.", [1507 /* cannotJITRegisterNonConstructor */]: "Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?", diff --git a/packages/web-components/fast-element/src/di/di.ts b/packages/web-components/fast-element/src/di/di.ts index 5cd234b776b..6d39c336379 100644 --- a/packages/web-components/fast-element/src/di/di.ts +++ b/packages/web-components/fast-element/src/di/di.ts @@ -718,7 +718,8 @@ export const DI = Object.freeze({ * @returns An array of dependency keys. */ getDependencies(Type: Constructable | Injectable): Key[] { - // Note: Every detail of this getDependencies method is pretty deliberate at the moment, and probably not yet 100% tested from every possible angle, + // Note: Every detail of this getDependencies method is pretty deliberate at the moment, + // and probably not yet 100% tested from every possible angle, // so be careful with making changes here as it can have a huge impact on complex end user apps. // Preferably, only make changes to the dependency resolution process via a RFC. @@ -2156,7 +2157,8 @@ const isNativeFunction = (function () { i <= 100 && // This whole heuristic *could* be tricked by a comment. Do we need to care about that? sourceText.charCodeAt(i - 1) === 0x7d && // } - // TODO: the spec is a little vague about the precise constraints, so we do need to test this across various browsers to make sure just one whitespace is a safe assumption. + // TODO: the spec is a little vague about the precise constraints, + // so we do need to test this across various browsers to make sure just one whitespace is a safe assumption. sourceText.charCodeAt(i - 2) <= 0x20 && // whitespace sourceText.charCodeAt(i - 3) === 0x5d && // ] sourceText.charCodeAt(i - 4) === 0x65 && // e diff --git a/packages/web-components/fast-element/src/templating/template.ts b/packages/web-components/fast-element/src/templating/template.ts index 699e0e64d87..95453591a55 100644 --- a/packages/web-components/fast-element/src/templating/template.ts +++ b/packages/web-components/fast-element/src/templating/template.ts @@ -81,7 +81,7 @@ export interface HTMLTemplateCompilationResult { // Much thanks to LitHTML for working this out! const lastAttributeNameRegex = - /* eslint-disable-next-line no-control-regex */ + /* eslint-disable-next-line no-control-regex, max-len */ /([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/; /** diff --git a/packages/web-components/fast-foundation/.eslintrc.cjs b/packages/web-components/fast-foundation/.eslintrc.cjs index c90037908ca..77390791df3 100644 --- a/packages/web-components/fast-foundation/.eslintrc.cjs +++ b/packages/web-components/fast-foundation/.eslintrc.cjs @@ -2,8 +2,7 @@ const path = require("path"); module.exports = { extends: [ - "@microsoft/eslint-config-fast-dna", - "prettier", + "../../../.eslintrc.js", "plugin:storybook/recommended", ], rules: { diff --git a/packages/web-components/fast-foundation/src/accordion/accordion.pw.spec.ts b/packages/web-components/fast-foundation/src/accordion/accordion.pw.spec.ts index 236c71d01cd..b965ec1e9a4 100644 --- a/packages/web-components/fast-foundation/src/accordion/accordion.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/accordion/accordion.pw.spec.ts @@ -203,6 +203,7 @@ test.describe("Accordion", () => { ); }); + /* eslint-disable-next-line max-len */ test("should remove an expanded items' expandbutton aria-disabled attribute when expand mode changes from single to multi", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/accordion/accordion.ts b/packages/web-components/fast-foundation/src/accordion/accordion.ts index 4aa810bb8cc..9151e420e2e 100644 --- a/packages/web-components/fast-foundation/src/accordion/accordion.ts +++ b/packages/web-components/fast-foundation/src/accordion/accordion.ts @@ -19,7 +19,8 @@ import { AccordionExpandMode } from "./accordion.options.js"; * @public * * @remarks - * Designed to be used with {@link @microsoft/fast-foundation#accordionTemplate} and {@link @microsoft/fast-foundation#(FASTAccordionItem:class)}. + * Designed to be used with {@link @microsoft/fast-foundation#accordionTemplate} + * and {@link @microsoft/fast-foundation#(FASTAccordionItem:class)}. */ export class FASTAccordion extends FASTElement { /** @@ -242,7 +243,8 @@ export class FASTAccordion extends FASTElement { }; private handleItemFocus = (event: FocusEvent): void => { - // update the active item index if the focus moves to an accordion item via a different method other than the up and down arrow key actions + // update the active item index if the focus moves to an accordion item + // via a different method other than the up and down arrow key actions // only do so if the focus is actually on the accordion item and not on any of its children if (event.target === event.currentTarget) { const focusedItem = event.target as HTMLElement; diff --git a/packages/web-components/fast-foundation/src/anchor/anchor.ts b/packages/web-components/fast-foundation/src/anchor/anchor.ts index ea79aff597c..3b321d37511 100644 --- a/packages/web-components/fast-foundation/src/anchor/anchor.ts +++ b/packages/web-components/fast-foundation/src/anchor/anchor.ts @@ -24,7 +24,8 @@ export type AnchorOptions = StartEndOptions; */ export class FASTAnchor extends FASTElement { /** - * Prompts the user to save the linked URL. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. + * Prompts the user to save the linked URL. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. * @public * @remarks * HTML Attribute: download @@ -33,7 +34,8 @@ export class FASTAnchor extends FASTElement { public download: string; /** - * The URL the hyperlink references. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. + * The URL the hyperlink references. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. * @public * @remarks * HTML Attribute: href @@ -42,7 +44,8 @@ export class FASTAnchor extends FASTElement { public href: string; /** - * Hints at the language of the referenced resource. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. + * Hints at the language of the referenced resource. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | element } for more information. * @public * @remarks * HTML Attribute: hreflang diff --git a/packages/web-components/fast-foundation/src/breadcrumb/breadcrumb.pw.spec.ts b/packages/web-components/fast-foundation/src/breadcrumb/breadcrumb.pw.spec.ts index aba677f60a9..5994cd508ca 100644 --- a/packages/web-components/fast-foundation/src/breadcrumb/breadcrumb.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/breadcrumb/breadcrumb.pw.spec.ts @@ -78,6 +78,7 @@ test.describe("Breadcrumb", () => { ).toHaveAttribute("aria-current", "page"); }); + /* eslint-disable-next-line max-len */ test("should remove `aria-current` from any prior breadcrumb item children with child anchors when a new node is appended", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/calendar/calendar.pw.spec.ts b/packages/web-components/fast-foundation/src/calendar/calendar.pw.spec.ts index 2b9ce553dff..89befb6b3f1 100644 --- a/packages/web-components/fast-foundation/src/calendar/calendar.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/calendar/calendar.pw.spec.ts @@ -482,6 +482,7 @@ test.describe("Calendar", () => { ).toBe("1942 शक"); }); + /* eslint-disable-next-line max-len */ test('should set the formatted `year` property to "2564" when the `year` attribute is "2021" for the Buddhist calendar', async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/checkbox/checkbox.pw.spec.ts b/packages/web-components/fast-foundation/src/checkbox/checkbox.pw.spec.ts index a093671678e..2581f5b08bf 100644 --- a/packages/web-components/fast-foundation/src/checkbox/checkbox.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/checkbox/checkbox.pw.spec.ts @@ -389,6 +389,7 @@ test.describe("Checkbox", () => { await expect(element).toHaveJSProperty("checked", true); }); + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where checked attribute modifications change the checked property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/design-token/core/design-token-node.pw.spec.ts b/packages/web-components/fast-foundation/src/design-token/core/design-token-node.pw.spec.ts index 7a4060397a8..230eb6d2f63 100644 --- a/packages/web-components/fast-foundation/src/design-token/core/design-token-node.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/design-token/core/design-token-node.pw.spec.ts @@ -344,6 +344,7 @@ test.describe("DesignTokenNode", () => { expect(node.getTokenValue(token)).toEqual(12); }); + /* eslint-disable-next-line max-len */ test("should resolve a static value from an ancestor node assigned a static value when the descendent node does not have the token assigned a value", () => { const token = new DesignToken(); const ancestor = createNode(); @@ -354,6 +355,7 @@ test.describe("DesignTokenNode", () => { expect(descendent.getTokenValue(token)).toEqual(12); }); + /* eslint-disable-next-line max-len */ test("should resolve a static value from an ancestor node assigned a derived value when the descendent node does not have the token assigned a value", () => { const token = new DesignToken(); const ancestor = createNode(); @@ -589,6 +591,7 @@ test.describe("DesignTokenNode", () => { ); expect(() => node.getTokenValue(token)).toThrow(); }); + /* eslint-disable-next-line max-len */ test("the token with the node that has a token assigned a derived value and a dependency of the derived value changes for the node", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -618,6 +621,7 @@ test.describe("DesignTokenNode", () => { ); expect(node.getTokenValue(token)).toEqual(14); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token assigned a static value that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -651,6 +655,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(14); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token assigned a derived value that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -684,6 +689,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(14); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token reassigned a static value that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -718,6 +724,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(16); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token reassigned a derived value that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -752,6 +759,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(16); }); + /* eslint-disable-next-line max-len */ test("the token with a descendent node when a ancestor and descendent both have a dependency assigned and the ancestor is reassigned a token to a derived value that resolves the dependency and results in a value change", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -795,6 +803,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(10); expect(descendent.getTokenValue(token)).toEqual(14); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token assigned a static value deleted that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -827,6 +836,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(12); }); + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a token assigned a derived value deleted that is a dependency of a value assigned for an ancestor", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -859,6 +869,7 @@ test.describe("DesignTokenNode", () => { expect(parent.getTokenValue(token)).toEqual(12); expect(descendent.getTokenValue(token)).toEqual(12); }); + /* eslint-disable-next-line max-len */ test("should the token for ancestor, parent, and descendent nodes when parent and descendent are assigned a value that depends on the token and the ancestor's value is changed", () => { const token = new DesignToken(); const ancestor = createNode(); @@ -914,6 +925,7 @@ test.describe("DesignTokenNode", () => { /** * Appending nodes */ + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a dependency assigned when the node is appended to an ancestor with a derived value assigned that depends on the dependency", () => { const ancestor = createNode(); const parent = createNode(ancestor); @@ -947,6 +959,7 @@ test.describe("DesignTokenNode", () => { /** * Removing nodes */ + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a dependency assigned when the node is appended to an ancestor with a derived value assigned that depends on the dependency and is then removed", () => { const ancestor = createNode(); const parent = createNode(ancestor); @@ -980,6 +993,7 @@ test.describe("DesignTokenNode", () => { /** * Moving node */ + /* eslint-disable-next-line max-len */ test("the token with the descendent node that has a dependency assigned when the node is re-parented to an ancestor with a different derived value assigned that depends on the dependency", () => { const ancestorA = createNode(); const ancestorB = createNode(); @@ -1013,6 +1027,7 @@ test.describe("DesignTokenNode", () => { ); expect(descendent.getTokenValue(token)).toEqual(21); }); + /* eslint-disable-next-line max-len */ test("should support reparenting a node with a derived token assigned to a tree where the immediate parent doesn't not have the dependency assigned", () => { const ancestor = new DesignTokenNode(); const parent = new DesignTokenNode(); @@ -1062,6 +1077,7 @@ test.describe("DesignTokenNode", () => { ) ); }); + /* eslint-disable-next-line max-len */ test("the token with the ancestor and descendent node when the ancestor is assigned a derived value using an observable and a token, where both nodes contain a value set for the dependency", () => { const ancestor = createNode(); const parent = createNode(ancestor); @@ -1121,6 +1137,7 @@ test.describe("DesignTokenNode", () => { expect(handleChange).not.toHaveBeenCalled(); }); + /* eslint-disable-next-line max-len */ test("the token when the derived value assigned to a node results in the same value as the previously assigned static value", () => { const token = new DesignToken(); const node = new DesignTokenNode(); @@ -1132,6 +1149,7 @@ test.describe("DesignTokenNode", () => { expect(handleChange).not.toHaveBeenCalled(); }); + /* eslint-disable-next-line max-len */ test("the token when the derived value assigned to a node results in the same value as the previously assigned derived value", () => { const token = new DesignToken(); const node = new DesignTokenNode(); @@ -1152,7 +1170,7 @@ test.describe("DesignTokenNode", () => { expect(a).not.toEqual(b); expect(handleChange).not.toHaveBeenCalled(); }); - + /* eslint-disable-next-line max-len */ test("the token when a dependency of a derived token value is set for a descendent but there is an intermediary value set that is a static value", () => { const token = new DesignToken(); const dependency = new DesignToken(); @@ -1170,6 +1188,7 @@ test.describe("DesignTokenNode", () => { expect(handleChange).not.toHaveBeenCalled(); expect(child.getTokenValue(token)).toEqual(25); }); + /* eslint-disable-next-line max-len */ test.skip("the token when a dependency of a derived token value is set for a descendent but there is an intermediary value set that is a derived value that does not depend on the dependent token", () => { const token = new DesignToken(); const dependency = new DesignToken(); diff --git a/packages/web-components/fast-foundation/src/design-token/core/design-token-node.ts b/packages/web-components/fast-foundation/src/design-token/core/design-token-node.ts index 940215a47d7..8591ffa80e9 100644 --- a/packages/web-components/fast-foundation/src/design-token/core/design-token-node.ts +++ b/packages/web-components/fast-foundation/src/design-token/core/design-token-node.ts @@ -66,6 +66,7 @@ class DerivedValueEvaluator { } throw new Error( + /* eslint-disable-next-line max-len */ "DesignTokenNode has encountered a circular token reference. Avoid this by setting the token value for an ancestor node." ); } else { diff --git a/packages/web-components/fast-foundation/src/design-token/fast-design-token.pw.spec.ts b/packages/web-components/fast-foundation/src/design-token/fast-design-token.pw.spec.ts index f945c02946c..0a37378c2b0 100644 --- a/packages/web-components/fast-foundation/src/design-token/fast-design-token.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/design-token/fast-design-token.pw.spec.ts @@ -498,6 +498,7 @@ test.describe("A DesignToken", () => { }) ).toBe("12"); }); + /* eslint-disable-next-line max-len */ test("should set a CSS custom property equal to the resolved value of a derived token value with a dependent token", async () => { expect( await page.evaluate(async () => { @@ -516,7 +517,7 @@ test.describe("A DesignToken", () => { }) ).toBe("12"); }); - + /* eslint-disable-next-line max-len */ test("should update a CSS custom property to the resolved value of a derived token value with a dependent token when the dependent token changes", async () => { expect( await page.evaluate(async () => { @@ -547,7 +548,7 @@ test.describe("A DesignToken", () => { }) ).toEqual(["12", "14"]); }); - + /* eslint-disable-next-line max-len */ test("should set a CSS custom property equal to the resolved value for an element of a derived token value with a dependent token", async () => { expect( await page.evaluate(async () => { @@ -577,7 +578,7 @@ test.describe("A DesignToken", () => { }) ).toEqual(["12", "14"]); }); - + /* eslint-disable-next-line max-len */ test("should set a CSS custom property equal to the resolved value for an element in a shadow DOM of a derived token value with a dependent token", async () => { expect( await page.evaluate(async () => { @@ -609,7 +610,7 @@ test.describe("A DesignToken", () => { }) ).toEqual(["12", "14"]); }); - + /* eslint-disable-next-line max-len */ test("should set a CSS custom property equal to the resolved value for both elements for which a dependent token is set when setting a derived token value", async () => { expect( await page.evaluate(async () => { @@ -831,6 +832,7 @@ test.describe("A DesignToken", () => { }) ).toEqual(["12", "14"]); }); + /* eslint-disable-next-line max-len */ test("should update the emitted CSS custom property of a token assigned a derived value when the token dependency changes", async () => { expect( await page.evaluate(async () => { @@ -885,6 +887,7 @@ test.describe("A DesignToken", () => { ).toEqual([12, 24]); }); }); + /* eslint-disable-next-line max-len */ test("should update the CSS custom property of a derived token with a dependency that is a derived token that depends on a third token", async () => { expect( await page.evaluate(async () => { @@ -1343,6 +1346,7 @@ test.describe("A DesignToken", () => { }) ).toBe(1); }); + /* eslint-disable-next-line max-len */ test("should notify a subscriber when a static-value dependency of subscribed token changes for a parent of the subscription target", async () => { expect( await page.evaluate(async () => { @@ -1372,6 +1376,7 @@ test.describe("A DesignToken", () => { }) ).toEqual([1, 14]); }); + /* eslint-disable-next-line max-len */ test("should notify a subscriber when a derived-value dependency of subscribed token changes for a parent of the subscription target", async () => { expect( await page.evaluate(async () => { @@ -1400,6 +1405,7 @@ test.describe("A DesignToken", () => { }) ).toEqual([1, 14]); }); + /* eslint-disable-next-line max-len */ test("should notify a subscriber when a dependency of subscribed token changes for a parent of the subscription target", async () => { expect( await page.evaluate(async () => { diff --git a/packages/web-components/fast-foundation/src/divider/divider.ts b/packages/web-components/fast-foundation/src/divider/divider.ts index 320f90f77f5..470234a2b00 100644 --- a/packages/web-components/fast-foundation/src/divider/divider.ts +++ b/packages/web-components/fast-foundation/src/divider/divider.ts @@ -3,7 +3,8 @@ import { DividerOrientation, DividerRole } from "./divider.options.js"; /** * A Divider Custom HTML Element. - * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}. + * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } + * or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}. * * @public */ diff --git a/packages/web-components/fast-foundation/src/flipper/flipper.ts b/packages/web-components/fast-foundation/src/flipper/flipper.ts index 69a830b808b..cfb8e1f393d 100644 --- a/packages/web-components/fast-foundation/src/flipper/flipper.ts +++ b/packages/web-components/fast-foundation/src/flipper/flipper.ts @@ -21,7 +21,8 @@ export type FlipperOptions = { * @slot previous - The previous flipper content * @csspart next - Wraps the next flipper content * @csspart previous - Wraps the previous flipper content - * @fires click - Fires a custom 'click' event when Enter or Space is invoked via keyboard and the flipper is exposed to assistive technologies. + * @fires click - Fires a custom 'click' event when Enter or Space is invoked via keyboard + * and the flipper is exposed to assistive technologies. * * @public */ @@ -36,7 +37,8 @@ export class FASTFlipper extends FASTElement { public disabled: boolean; /** - * Indicates the flipper should be hidden from assistive technology. Because flippers are often supplementary navigation, they are often hidden from assistive technology. + * Indicates the flipper should be hidden from assistive technology. + * Because flippers are often supplementary navigation, they are often hidden from assistive technology. * * @public * @defaultValue - true diff --git a/packages/web-components/fast-foundation/src/form-associated/form-associated.pw.spec.ts b/packages/web-components/fast-foundation/src/form-associated/form-associated.pw.spec.ts index f658b8aa9b4..eae7af2414a 100644 --- a/packages/web-components/fast-foundation/src/form-associated/form-associated.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/form-associated/form-associated.pw.spec.ts @@ -411,7 +411,7 @@ test.describe("FormAssociated", () => { await expect(element).toHaveAttribute("value", "attr-value"); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where modifcations to the `value` attribute update the `value` property prior to user or programmatic interaction", async ({ page, }) => { diff --git a/packages/web-components/fast-foundation/src/form-associated/form-associated.ts b/packages/web-components/fast-foundation/src/form-associated/form-associated.ts index 0c57ccbb533..a7acbb8f003 100644 --- a/packages/web-components/fast-foundation/src/form-associated/form-associated.ts +++ b/packages/web-components/fast-foundation/src/form-associated/form-associated.ts @@ -54,7 +54,8 @@ interface ElementInternals { */ readonly willValidate: boolean; /** - * Returns true if internals target element has no validity problems; false otherwise. Fires an invalid event at the element in the latter case. + * Returns true if internals target element has no validity problems; false otherwise. + * Fires an invalid event at the element in the latter case. */ checkValidity(): boolean; /** @@ -65,7 +66,8 @@ interface ElementInternals { /** * Sets both the state and submission value of internals target element to value. * - * While "null" isn't enumerated as a argument type (here)[https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface], + * While "null" isn't enumerated as + * a argument type (here)[https://html.spec.whatwg.org/multipage/custom-elements.html#the-elementinternals-interface], * In practice it appears to remove the value from the form data on submission. Adding it as a valid type here * becuase that capability is required for checkbox and radio types */ diff --git a/packages/web-components/fast-foundation/src/horizontal-scroll/horizontal-scroll.pw.spec.ts b/packages/web-components/fast-foundation/src/horizontal-scroll/horizontal-scroll.pw.spec.ts index 348e23caf90..9ac4c96619e 100644 --- a/packages/web-components/fast-foundation/src/horizontal-scroll/horizontal-scroll.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/horizontal-scroll/horizontal-scroll.pw.spec.ts @@ -100,6 +100,7 @@ test.describe("HorizontalScroll", () => { ); }); + /* eslint-disable-next-line max-len */ test('should set the "disabled" class on the previous flipper when the scroll position is at the beginning of the content', async () => { await expect(scrollPrevious).toHaveClass(/disabled/); diff --git a/packages/web-components/fast-foundation/src/menu-item/menu-item.ts b/packages/web-components/fast-foundation/src/menu-item/menu-item.ts index 9073941b374..47539de43d5 100644 --- a/packages/web-components/fast-foundation/src/menu-item/menu-item.ts +++ b/packages/web-components/fast-foundation/src/menu-item/menu-item.ts @@ -28,7 +28,9 @@ export type MenuItemOptions = StartEndOptions & { /** * A Switch Custom HTML Element. - * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }. + * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#menuitem | ARIA menuitem }, + * {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemcheckbox | ARIA menuitemcheckbox}, + * or {@link https://www.w3.org/TR/wai-aria-1.1/#menuitemradio | ARIA menuitemradio }. * * @slot checked-indicator - The checked indicator * @slot radio-indicator - The radio indicator @@ -45,7 +47,8 @@ export type MenuItemOptions = StartEndOptions & { * @csspart expand-collapse - The expand/collapse element * @csspart submenu-region - The container for the submenu, used for positioning * @fires expanded-change - Fires a custom 'expanded-change' event when the expanded state changes - * @fires change - Fires a custom 'change' event when a non-submenu item with a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked + * @fires change - Fires a custom 'change' event when a non-submenu item with + * a role of `menuitemcheckbox`, `menuitemradio`, or `menuitem` is invoked * * @public */ diff --git a/packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts b/packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts index 6a5f6b6b474..b8e63e7dfaa 100644 --- a/packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/number-field/number-field.pw.spec.ts @@ -487,6 +487,7 @@ test.describe("NumberField", () => { await expect(control).toHaveValue("10"); }); + /* eslint-disable-next-line max-len */ test("should set the `value` to match `max` after stepping down when `value` is undefined and `min` and `max` are less than zero", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` @@ -502,7 +503,7 @@ test.describe("NumberField", () => { await expect(control).toHaveValue("-5"); }); - + /* eslint-disable-next-line max-len */ test("should set the `value` to match `max` after stepping up when `value` is undefined and `min` and `max` are less than zero", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` @@ -677,7 +678,7 @@ test.describe("NumberField", () => { await expect(element).toHaveJSProperty("value", "10"); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where `value` attribute modifications change the `value` property prior to user or programmatic interaction", async () => { const form = page.locator("form"); diff --git a/packages/web-components/fast-foundation/src/number-field/number-field.ts b/packages/web-components/fast-foundation/src/number-field/number-field.ts index dc6a0f0352e..915dba5d95c 100644 --- a/packages/web-components/fast-foundation/src/number-field/number-field.ts +++ b/packages/web-components/fast-foundation/src/number-field/number-field.ts @@ -43,7 +43,8 @@ export type NumberFieldOptions = StartEndOptions & { */ export class FASTNumberField extends FormAssociatedNumberField { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly @@ -52,7 +53,9 @@ export class FASTNumberField extends FormAssociatedNumberField { public readOnly: boolean; /** - * Indicates that this element should get focus after the page finishes loading. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} for more information. + * Indicates that this element should get focus after the page finishes loading. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} + * for more information. * @public * @remarks * HTML Attribute: autofocus @@ -80,7 +83,8 @@ export class FASTNumberField extends FormAssociatedNumberField { public placeholder: string; /** - * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. + * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} + * to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. * @public * @remarks * HTML Attribute: list diff --git a/packages/web-components/fast-foundation/src/radio-group/radio-group.ts b/packages/web-components/fast-foundation/src/radio-group/radio-group.ts index 12122fcf1e7..ec098434893 100644 --- a/packages/web-components/fast-foundation/src/radio-group/radio-group.ts +++ b/packages/web-components/fast-foundation/src/radio-group/radio-group.ts @@ -25,7 +25,8 @@ import { RadioGroupOrientation } from "./radio-group.options.js"; */ export class FASTRadioGroup extends FASTElement { /** - * When true, the child radios will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the child radios will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly diff --git a/packages/web-components/fast-foundation/src/radio/radio.pw.spec.ts b/packages/web-components/fast-foundation/src/radio/radio.pw.spec.ts index 72cafa7c465..ab00fc6e497 100644 --- a/packages/web-components/fast-foundation/src/radio/radio.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/radio/radio.pw.spec.ts @@ -278,7 +278,7 @@ test.describe("Radio", () => { await expect(element).toBeChecked(); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where `checked` attribute modifications modify the `checked` property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/radio/radio.ts b/packages/web-components/fast-foundation/src/radio/radio.ts index eeee7f74b7a..53646c0882f 100644 --- a/packages/web-components/fast-foundation/src/radio/radio.ts +++ b/packages/web-components/fast-foundation/src/radio/radio.ts @@ -35,7 +35,8 @@ export type RadioOptions = { */ export class FASTRadio extends FormAssociatedRadio implements RadioControl { /** - * The name of the radio. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname | name attribute} for more info. + * The name of the radio. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname | name attribute} for more info. */ @observable public name: string; diff --git a/packages/web-components/fast-foundation/src/search/search.pw.spec.ts b/packages/web-components/fast-foundation/src/search/search.pw.spec.ts index 38a1b4812ac..b857e1c9d54 100644 --- a/packages/web-components/fast-foundation/src/search/search.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/search/search.pw.spec.ts @@ -293,7 +293,7 @@ test.describe("Search", () => { await expect(element).toHaveJSProperty("value", "test value"); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where `value` attribute modifications change the `value` property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/search/search.ts b/packages/web-components/fast-foundation/src/search/search.ts index 994b15d58ad..74413519d16 100644 --- a/packages/web-components/fast-foundation/src/search/search.ts +++ b/packages/web-components/fast-foundation/src/search/search.ts @@ -36,7 +36,8 @@ export type SearchOptions = StartEndOptions & { */ export class FASTSearch extends FormAssociatedSearch { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly @@ -51,7 +52,9 @@ export class FASTSearch extends FormAssociatedSearch { } /** - * Indicates that this element should get focus after the page finishes loading. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} for more information. + * Indicates that this element should get focus after the page finishes loading. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} + * for more information. * @public * @remarks * HTML Attribute: autofocus @@ -81,7 +84,8 @@ export class FASTSearch extends FormAssociatedSearch { } /** - * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. + * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} + * to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. * @public * @remarks * HTML Attribute: list diff --git a/packages/web-components/fast-foundation/src/slider/slider.pw.spec.ts b/packages/web-components/fast-foundation/src/slider/slider.pw.spec.ts index 6239122a955..5bf68b02b4e 100644 --- a/packages/web-components/fast-foundation/src/slider/slider.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/slider/slider.pw.spec.ts @@ -554,7 +554,7 @@ test.describe("Slider", () => { await expect(element).toHaveJSProperty("value", "7"); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where the value attribute changes the value property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/slider/slider.ts b/packages/web-components/fast-foundation/src/slider/slider.ts index c0d4f36254e..d12e215b2c3 100644 --- a/packages/web-components/fast-foundation/src/slider/slider.ts +++ b/packages/web-components/fast-foundation/src/slider/slider.ts @@ -35,7 +35,8 @@ import { SliderMode } from "./slider.options.js"; */ export class FASTSlider extends FormAssociatedSlider implements SliderConfiguration { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * * @public * @remarks diff --git a/packages/web-components/fast-foundation/src/switch/switch.pw.spec.ts b/packages/web-components/fast-foundation/src/switch/switch.pw.spec.ts index d670aeacc61..2447da04f9f 100644 --- a/packages/web-components/fast-foundation/src/switch/switch.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/switch/switch.pw.spec.ts @@ -385,7 +385,7 @@ test.describe("Switch", () => { await expect(element).toHaveJSProperty("checked", true); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where `checked` attribute modifications update the `checked` property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/switch/switch.ts b/packages/web-components/fast-foundation/src/switch/switch.ts index 19a054702f3..85d59b1eb2e 100644 --- a/packages/web-components/fast-foundation/src/switch/switch.ts +++ b/packages/web-components/fast-foundation/src/switch/switch.ts @@ -26,7 +26,8 @@ export type SwitchOptions = { */ export class FASTSwitch extends FormAssociatedSwitch { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly diff --git a/packages/web-components/fast-foundation/src/tab/tab.ts b/packages/web-components/fast-foundation/src/tab/tab.ts index 66d45bfe5d3..62d19850dd4 100644 --- a/packages/web-components/fast-foundation/src/tab/tab.ts +++ b/packages/web-components/fast-foundation/src/tab/tab.ts @@ -20,7 +20,8 @@ export type TabOptions = StartEndOptions; */ export class FASTTab extends FASTElement { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information. * @public * @remarks * HTML Attribute: disabled diff --git a/packages/web-components/fast-foundation/src/tabs/tabs.pw.spec.ts b/packages/web-components/fast-foundation/src/tabs/tabs.pw.spec.ts index d61e156fb58..563d42c8f1f 100644 --- a/packages/web-components/fast-foundation/src/tabs/tabs.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/tabs/tabs.pw.spec.ts @@ -106,7 +106,7 @@ test.describe("Tabs", () => { await expect(tabPanel).toHaveCount(1); } }); - + /* eslint-disable-next-line max-len */ test("should set `aria-labelledby` on the tab panel and `aria-controls` on the tab which corresponds to the matching ID when IDs are NOT provided", async () => { await root.evaluate( (node, { template }) => { @@ -137,7 +137,7 @@ test.describe("Tabs", () => { await expect(tab).toHaveAttribute("aria-controls", panelId); } }); - + /* eslint-disable-next-line max-len */ test("should set `aria-labelledby` on the tab panel and `aria-controls` on the tab which corresponds to the matching ID when IDs are NOT provided and additional tabs and panels are added", async () => { await root.evaluate( (node, { template }) => { @@ -259,6 +259,7 @@ test.describe("Tabs", () => { }); test.describe("active tabpanel", () => { + /* eslint-disable-next-line max-len */ test("should set an `aria-labelledby` attribute on the tabpanel with a value of the tab id when `activeid` is provided", async () => { await root.evaluate( (node, { template }) => { diff --git a/packages/web-components/fast-foundation/src/text-area/text-area.pw.spec.ts b/packages/web-components/fast-foundation/src/text-area/text-area.pw.spec.ts index a50e6caeba8..3dc12f9a12a 100644 --- a/packages/web-components/fast-foundation/src/text-area/text-area.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/text-area/text-area.pw.spec.ts @@ -226,7 +226,7 @@ test.describe("TextArea", () => { await expect(element).toHaveJSProperty("value", "foo"); }); - + /* eslint-disable-next-line max-len */ test("should put the control into a clean state, where `value` attribute modifications change the `value` property prior to user or programmatic interaction", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ` diff --git a/packages/web-components/fast-foundation/src/text-area/text-area.ts b/packages/web-components/fast-foundation/src/text-area/text-area.ts index db2fb23e3f7..b36ecfc116c 100644 --- a/packages/web-components/fast-foundation/src/text-area/text-area.ts +++ b/packages/web-components/fast-foundation/src/text-area/text-area.ts @@ -30,7 +30,8 @@ export type TextAreaOptions = StartEndOptions; */ export class FASTTextArea extends FormAssociatedTextArea { /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly @@ -73,14 +74,16 @@ export class FASTTextArea extends FormAssociatedTextArea { } /** - * The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id | id} of the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form | form} the element is associated to + * The {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id | id} + * of the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form | form} the element is associated to * @public */ @attr({ attribute: "form" }) public formId: string; /** - * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. + * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} + * to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. * @public * @remarks * HTML Attribute: list diff --git a/packages/web-components/fast-foundation/src/text-field/text-field.ts b/packages/web-components/fast-foundation/src/text-field/text-field.ts index cfc0ab5d32d..cfd583116c4 100644 --- a/packages/web-components/fast-foundation/src/text-field/text-field.ts +++ b/packages/web-components/fast-foundation/src/text-field/text-field.ts @@ -34,7 +34,8 @@ export type TextFieldOptions = StartEndOptions; */ export class FASTTextField extends FormAssociatedTextField { /** - * When true, the input will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. + * When true, the input will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute} for more information. * @public * @remarks * HTML Attribute: readonly @@ -49,7 +50,9 @@ export class FASTTextField extends FormAssociatedTextField { } /** - * Indicates that this element should get focus after the page finishes loading. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} for more information. + * Indicates that this element should get focus after the page finishes loading. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute} + * for more information. * @public * @remarks * HTML Attribute: autofocus @@ -94,7 +97,8 @@ export class FASTTextField extends FormAssociatedTextField { } /** - * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. + * Allows associating a {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist} + * to the element by {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/id}. * @public * @remarks * HTML Attribute: list diff --git a/packages/web-components/fast-foundation/src/toolbar/toolbar.pw.spec.ts b/packages/web-components/fast-foundation/src/toolbar/toolbar.pw.spec.ts index b61ba4fb053..6ef6344bc95 100644 --- a/packages/web-components/fast-foundation/src/toolbar/toolbar.pw.spec.ts +++ b/packages/web-components/fast-foundation/src/toolbar/toolbar.pw.spec.ts @@ -194,7 +194,7 @@ test.describe.skip("Toolbar", () => { await expect(endSlotButton).toBeFocused(); }); - + /* eslint-disable-next-line max-len */ test("should move focus to next element when keyboard incrementer is pressed and start slot content is added after connect", async () => { await root.evaluate(node => { node.innerHTML = /* html */ ``; diff --git a/packages/web-components/fast-foundation/src/tree-item/tree-item.ts b/packages/web-components/fast-foundation/src/tree-item/tree-item.ts index d198a6de8aa..a7b27560d18 100644 --- a/packages/web-components/fast-foundation/src/tree-item/tree-item.ts +++ b/packages/web-components/fast-foundation/src/tree-item/tree-item.ts @@ -70,7 +70,8 @@ export class FASTTreeItem extends FASTElement { } /** - * When true, the control will be immutable by user interaction. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information. + * When true, the control will be immutable by user interaction. + * See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute} for more information. * @public * @remarks * HTML Attribute: disabled diff --git a/packages/web-components/fast-router/.eslintrc.json b/packages/web-components/fast-router/.eslintrc.json index 629b11dd891..bfd80e50f67 100644 --- a/packages/web-components/fast-router/.eslintrc.json +++ b/packages/web-components/fast-router/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["@microsoft/eslint-config-fast-dna", "prettier"], + "extends": ["../../../.eslintrc.js"], "rules": { "@typescript-eslint/no-non-null-assertion": "off", "@typescript-eslint/ban-types": [ diff --git a/packages/web-components/fast-ssr/.eslintrc.cjs b/packages/web-components/fast-ssr/.eslintrc.cjs index c95e9e52d3c..5e0c31ff916 100644 --- a/packages/web-components/fast-ssr/.eslintrc.cjs +++ b/packages/web-components/fast-ssr/.eslintrc.cjs @@ -1,3 +1,3 @@ module.exports = { - extends: ["@microsoft/eslint-config-fast-dna", "prettier"] + extends: ["../../../.eslintrc.js"] }; diff --git a/sites/site-utilities/package.json b/sites/site-utilities/package.json index 345a2e00b6a..af219690923 100644 --- a/sites/site-utilities/package.json +++ b/sites/site-utilities/package.json @@ -19,7 +19,6 @@ "author": "Microsoft", "license": "MIT", "devDependencies": { - "@microsoft/eslint-config-fast-dna": "^2.1.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "@types/node": "^15.0.1", diff --git a/yarn.lock b/yarn.lock index 87c438c3188..43d9a9312dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20663,7 +20663,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -"typescript@^3 || ^4", typescript@^4.7.0, typescript@^4.7.3, "typescript@~3.9.0 || ~4.3.5 || ^4.7.0": +"typescript@^3 || ^4", typescript@^4.7.0, typescript@^4.7.3: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==