diff --git a/change/@fluentui-eslint-plugin-ee7a918a-238e-45f3-8a6b-18eb7ca7e02b.json b/change/@fluentui-eslint-plugin-ee7a918a-238e-45f3-8a6b-18eb7ca7e02b.json
new file mode 100644
index 00000000000000..7733b053773023
--- /dev/null
+++ b/change/@fluentui-eslint-plugin-ee7a918a-238e-45f3-8a6b-18eb7ca7e02b.json
@@ -0,0 +1,7 @@
+{
+ "type": "patch",
+ "comment": "feat(eslint-plugin): add triple-slash-reference rule to ban TS '///' within source code",
+ "packageName": "@fluentui/eslint-plugin",
+ "email": "martinhochel@microsoft.com",
+ "dependentChangeType": "patch"
+}
diff --git a/packages/cra-template/.eslintrc.json b/packages/cra-template/.eslintrc.json
index efb1ca6d6e8af1..d3285bf6e52a6c 100644
--- a/packages/cra-template/.eslintrc.json
+++ b/packages/cra-template/.eslintrc.json
@@ -6,7 +6,9 @@
"files": ["template/**/*.{ts,tsx}"],
"rules": {
// the rule can't understand that the actual list of deps is in template.json
- "import/no-extraneous-dependencies": "off"
+ "import/no-extraneous-dependencies": "off",
+ // valid in some template files - don't wanna spam consumer with inline eslint-disabled pragmas
+ "@typescript-eslint/triple-slash-reference": "off"
}
}
]
diff --git a/packages/eslint-plugin/src/configs/base.js b/packages/eslint-plugin/src/configs/base.js
index 5956169dcabe74..2423f8a7b8b882 100644
--- a/packages/eslint-plugin/src/configs/base.js
+++ b/packages/eslint-plugin/src/configs/base.js
@@ -14,6 +14,8 @@ module.exports = {
*/
...getNamingConventionRule(),
'@fluentui/max-len': 'off',
+ // @typescript-eslint rules
+ '@typescript-eslint/triple-slash-reference': ['error', { lib: 'always', path: 'never', types: 'never' }],
},
overrides: [
{
diff --git a/packages/react-components/react-tag-picker-preview/src/components/TagPicker/TagPicker.cy.tsx b/packages/react-components/react-tag-picker-preview/src/components/TagPicker/TagPicker.cy.tsx
index 5ae35607e2e9bf..ebb4365addd300 100644
--- a/packages/react-components/react-tag-picker-preview/src/components/TagPicker/TagPicker.cy.tsx
+++ b/packages/react-components/react-tag-picker-preview/src/components/TagPicker/TagPicker.cy.tsx
@@ -1,6 +1,3 @@
-///
-///
-
import * as React from 'react';
import { mount as mountBase } from '@cypress/react';
import { FluentProvider } from '@fluentui/react-provider';