Skip to content

Commit dbe0409

Browse files
authored
chore: migrate to eslint v9 (#33527)
1 parent 3bb6b27 commit dbe0409

File tree

102 files changed

+1304
-984
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1304
-984
lines changed

apps/pr-deploy-site/.eslintrc.json

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
const js = require('@eslint/js');
2+
const sdl = require('@microsoft/eslint-plugin-sdl');
3+
const es = require('eslint-plugin-es');
4+
const { FlatCompat } = require('@eslint/eslintrc');
5+
6+
const compat = new FlatCompat({
7+
baseDirectory: __dirname,
8+
recommendedConfig: js.configs.recommended,
9+
allConfig: js.configs.all,
10+
});
11+
12+
module.exports = [
13+
...compat.extends('plugin:@fluentui/eslint-plugin/node'),
14+
...sdl.configs.recommended,
15+
{
16+
files: ['**/pr-deploy-site.js'],
17+
plugins: {
18+
es,
19+
},
20+
21+
rules: {
22+
curly: 'off',
23+
'no-var': 'off',
24+
'vars-on-top': 'off',
25+
'prefer-arrow-callback': 'off',
26+
'no-restricted-globals': 'off',
27+
},
28+
},
29+
];

apps/pr-deploy-site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"clean": "just-scripts clean",
99
"generate:site": "just-scripts generate:site",
10-
"lint": "eslint --ext .js,.ts --cache .",
10+
"lint": "eslint --cache .",
1111
"type-check": "tsc -p . --noEmit"
1212
},
1313
"license": "MIT",

apps/public-docsite-resources/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"build": "just-scripts build",
2121
"prebundle": "yarn build",
2222
"bundle": "just-scripts bundle",
23-
"lint": "eslint --ext .js,.ts,.tsx ./src",
23+
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.ts,.tsx ./src",
2424
"just": "just-scripts",
2525
"clean": "just-scripts clean",
2626
"code-style": "just-scripts code-style",

apps/public-docsite-v9/src/Concepts/Positioning/PositioningAutoSize.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const AutoSizeForSmallViewport = () => {
6868
<MenuPopover>
6969
<MenuList>
7070
{Array.from({ length: menuItemCount }, (_, i) => (
71-
<MenuItem>Item {i}</MenuItem>
71+
<MenuItem key={i}>Item {i}</MenuItem>
7272
))}
7373
</MenuList>
7474
</MenuPopover>

apps/public-docsite-v9/src/Concepts/Positioning/PositioningShiftToCoverTarget.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const CoverTargetForSmallViewport = () => {
112112
<MenuPopover>
113113
<MenuList>
114114
{Array.from({ length: menuItemCount }, (_, i) => (
115-
<MenuItem>Item {i}</MenuItem>
115+
<MenuItem key={i}>Item {i}</MenuItem>
116116
))}
117117
</MenuList>
118118
</MenuPopover>

apps/public-docsite/src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const FabricIconsPage: React.FunctionComponent<IStylesPageProps> = props
2626
};
2727

2828
function _otherSections(platform: Platforms): IPageSectionProps<Platforms>[] {
29+
// eslint-disable-next-line react-hooks/rules-of-hooks
2930
const [selectedItem, setSelectedItem] = React.useState('react-font');
3031
switch (platform) {
3132
case 'web':

apps/react-18-tests-v8/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"format:check": "yarn format -c",
1010
"e2e": "cypress run --component",
1111
"e2e:local": "cypress open --component",
12-
"lint": "eslint --ext .js,.ts,.tsx ./src",
12+
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.ts,.tsx ./src",
1313
"test": "jest --passWithNoTests",
1414
"start": "webpack-dev-server --mode=development"
1515
},

apps/react-18-tests-v9/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"type-check": "just-scripts type-check",
8-
"lint": "eslint --ext .js,.ts,.tsx ./src",
8+
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint --ext .js,.ts,.tsx ./src",
99
"test": "jest --passWithNoTests",
1010
"format": "prettier -w . --ignore-path ../.prettierignore",
1111
"format:check": "yarn format -c",

apps/vr-tests-web-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"build-storybook": "storybook build -o dist/storybook",
99
"format": "prettier . -w --ignore-path ../../.prettierignore",
10-
"lint": "eslint src --ext .ts,.tsx",
10+
"lint": "ESLINT_USE_FLAT_CONFIG=false eslint src --ext .ts,.tsx",
1111
"start": "storybook dev",
1212
"type-check": "tsc -p . --baseUrl . --noEmit",
1313
"test-vr": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"

0 commit comments

Comments
 (0)