Skip to content

Commit

Permalink
feat(eslint-plugin): add triple-slash-reference rule to ban TS '///' …
Browse files Browse the repository at this point in the history
…within source code
  • Loading branch information
Hotell committed Apr 11, 2024
1 parent 31be1ad commit dd4286a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"dependentChangeType": "patch"
}
4 changes: 3 additions & 1 deletion packages/cra-template/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-plugin/src/configs/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down

0 comments on commit dd4286a

Please sign in to comment.