Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to eslint v9 #33527

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c7f52af
chore: update eslint and related deps, dedupe
mainframev Dec 27, 2024
b35c240
chore(nx): set ESLINT_USE_FLAT_CONFIG=false
mainframev Dec 30, 2024
36709c8
chore(eslint-plugin): remove archived deprecated plugin
mainframev Dec 30, 2024
9fa6c32
chore: replace old deprecated plugin suppressions
mainframev Dec 30, 2024
bc5e717
chore(lint-staged): use eslint.config.js
mainframev Dec 30, 2024
24d47e1
chore(lint-staged): use legacy eslint
mainframev Dec 30, 2024
1dc6826
chore(workspace-plugin): use legacy type until flat config migration
mainframev Dec 30, 2024
df57cd5
chore: update playwright eslint config
mainframev Dec 30, 2024
39829e0
chore(web-components): remove eslint errors after upgrading playwrigh…
mainframev Dec 31, 2024
31e62cf
chore(react-calendar-compat): suppress react-hooks eslint errors
mainframev Dec 31, 2024
8f08017
chore(react): suppress react-hooks errors in CalendarYear
mainframev Dec 31, 2024
d1addad
chore(react): override ts-eslint no-deprecated to warn
mainframev Dec 31, 2024
c11a194
chore: suppress and remove eslint errors for deprecated errors and re…
mainframev Dec 31, 2024
1ab4440
chore: update packages .eslintrc files
mainframev Dec 31, 2024
9fb7f2f
chore(pr-deploy-site): migrate to flat config
mainframev Dec 31, 2024
a6e5fcd
chore(public-docsite-setup): migrate to flat config
mainframev Dec 31, 2024
239af4b
chore: fix format
mainframev Dec 31, 2024
7889b77
chore(eslint-plugin-react): update eslint deps
mainframev Jan 2, 2025
c71d536
chore: update change files
mainframev Jan 2, 2025
889a93b
chore(gulp): use LegacyESLint
mainframev Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# TODO: remove after migration to flat eslint configs
ESLINT_USE_FLAT_CONFIG=false
11 changes: 9 additions & 2 deletions apps/chart-docsite/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"rules": {
Copy link
Collaborator

@fabricteam fabricteam Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual regressions to review in the fluentuiv8 Visual Regression Report

Callout 5 screenshots
Image Name Diff(in Pixels) Image Type
Callout.Left top edge.chromium.png 1949 Changed
Callout.Right top edge.chromium.png 1127 Changed
Callout.Top left edge.chromium.png 2307 Changed
Callout.Right bottom edge.chromium.png 3005 Changed
Callout.Top right edge.chromium.png 1594 Changed

Copy link
Collaborator

@fabricteam fabricteam Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.Badge Mask RTL.chromium.png 6 Changed
Avatar Converged.badgeMask.chromium.png 21 Changed
Drawer 2 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.overlay drawer full.chromium.png 3276 Changed
Drawer.Full Overlay RTL.chromium.png 1167 Changed

"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/jsx-no-bind": "off",
"deprecation/deprecation": "off",
"import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }]
"import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }],
"overrides": [
{
"files": ["src/**/*.{tsx,ts}"],
"rules": {
"@typescript-eslint/no-deprecated": "off"
}
}
]
}
}
21 changes: 0 additions & 21 deletions apps/pr-deploy-site/.eslintrc.json

This file was deleted.

29 changes: 29 additions & 0 deletions apps/pr-deploy-site/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const js = require('@eslint/js');
const sdl = require('@microsoft/eslint-plugin-sdl');
const es = require('eslint-plugin-es');
const { FlatCompat } = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

module.exports = [
...compat.extends('plugin:@fluentui/eslint-plugin/node'),
...sdl.configs.recommended,
{
files: ['**/pr-deploy-site.js'],
plugins: {
es,
},

rules: {
curly: 'off',
'no-var': 'off',
'vars-on-top': 'off',
'prefer-arrow-callback': 'off',
'no-restricted-globals': 'off',
},
},
];
2 changes: 1 addition & 1 deletion apps/pr-deploy-site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"clean": "just-scripts clean",
"generate:site": "just-scripts generate:site",
"lint": "eslint --ext .js,.ts --cache .",
"lint": "eslint --cache .",
"type-check": "tsc -p . --noEmit"
},
"license": "MIT",
Expand Down
1 change: 0 additions & 1 deletion apps/public-docsite-resources/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/member-ordering": "off",
"deprecation/deprecation": "off",
"no-restricted-globals": "off"
}
}
11 changes: 9 additions & 2 deletions apps/public-docsite-v9/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/jsx-no-bind": "off",
"deprecation/deprecation": "off",
"import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }]
}
},
"overrides": [
{
"files": ["src/**/*.{tsx,ts}"],
"rules": {
"@typescript-eslint/no-deprecated": "off"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const AutoSizeForSmallViewport = () => {
<MenuPopover>
<MenuList>
{Array.from({ length: menuItemCount }, (_, i) => (
<MenuItem>Item {i}</MenuItem>
<MenuItem key={i}>Item {i}</MenuItem>
))}
</MenuList>
</MenuPopover>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const CoverTargetForSmallViewport = () => {
<MenuPopover>
<MenuList>
{Array.from({ length: menuItemCount }, (_, i) => (
<MenuItem>Item {i}</MenuItem>
<MenuItem key={i}>Item {i}</MenuItem>
))}
</MenuList>
</MenuPopover>
Expand Down
3 changes: 1 addition & 2 deletions apps/public-docsite/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"root": true,
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"deprecation/deprecation": "off",
"import/no-webpack-loader-syntax": "off", // ok in this project
"import/no-webpack-loader-syntax": "off",
"prefer-const": "off",
"react/jsx-no-bind": "off",
"no-restricted-globals": "off"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const FabricIconsPage: React.FunctionComponent<IStylesPageProps> = props
};

function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
// eslint-disable-next-line react-hooks/rules-of-hooks
const [selectedItem, setSelectedItem] = React.useState('react-font');
switch (platform) {
case 'web':
Expand Down
1 change: 0 additions & 1 deletion apps/theming-designer/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"root": true,
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"deprecation/deprecation": "off",
"prefer-const": "off",
"no-restricted-globals": "off"
}
Expand Down
11 changes: 9 additions & 2 deletions apps/vr-tests-react-components/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/jsx-no-bind": "off",
"deprecation/deprecation": "off",
"import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }],
"@nx/workspace-no-restricted-globals": "off"
}
},
"overrides": [
{
"files": ["**/*.{ts,tsx}"],
"rules": {
"@typescript-eslint/no-deprecated": "off"
}
}
]
}
1 change: 0 additions & 1 deletion apps/vr-tests/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/jsx-no-bind": "off",
"deprecation/deprecation": "off",
"import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }],
"no-restricted-globals": "off"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/codemods",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: update eslint dependencies",
"packageName": "@fluentui/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: update eslint dependencies",
"packageName": "@fluentui/eslint-plugin-react-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin if favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/font-icons-mdl2",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/foundation-legacy",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/keyboard-key",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/merge-styles",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: use eslint flat config",
"packageName": "@fluentui/public-docsite-setup",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-accordion",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-aria",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-avatar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-calendar-compat",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-charting",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-color-picker-preview",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-combobox",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-components",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-conformance",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-date-time",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-experiments",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-focus",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-icons-compat",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-menu",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-message-bar",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-monaco-editor",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-motion",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-motion-components-preview",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated",
"packageName": "@fluentui/react-popover",
"email": "[email protected]",
"dependentChangeType": "none"
}
Loading
Loading