Skip to content

Commit

Permalink
improvement(eslint-config-fluid): Disable unicorn/prefer-module for…
Browse files Browse the repository at this point in the history
… tests (microsoft#21814)

We run most of our tests in a Node.js environment, so this rule is not
important and makes file-system logic more cumbersome.
  • Loading branch information
Josmithr authored Jul 11, 2024
1 parent 3b447f1 commit d3f9dc0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions common/build/eslint-config-fluid/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ The following rules have been disabled in all configs because they conflict with

- [@typescript-eslint/brace-style](https://typescript-eslint.io/rules/brace-style)
- [unicorn/number-literal-case](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/number-literal-case.md)
- The following rules have been disabled for test code:

- [unicorn/prefer-module](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v48.0.1/docs/rules/prefer-module.md)

The following rules have been disabled due to frequency of false-positives reported:

Expand Down
2 changes: 1 addition & 1 deletion common/build/eslint-config-fluid/printed-configs/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@
"error"
],
"unicorn/prefer-module": [
"error"
"off"
],
"unicorn/prefer-native-coercion-functions": [
"error"
Expand Down
3 changes: 3 additions & 0 deletions common/build/eslint-config-fluid/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ module.exports = {
rules: {
// Does not work well with describe/it block scoping
"unicorn/consistent-function-scoping": "off",
// We run most of our tests in a Node.js environment, so this rule is not important and makes
// file-system logic more cumbersome.
"unicorn/prefer-module": "off",
},
},
{
Expand Down

0 comments on commit d3f9dc0

Please sign in to comment.