Skip to content

Commit 3d36cc9

Browse files
authored
Fix linting: finish the conversion to v9 and flat configs, make lint not silently fail and fix a bunch of type errors (#3932)
* fix lint configuration with new format * fix repo linting with new configs and version, fixing linting errors as well * Change files * fix some styling issues from lint --fix and remove unused ignore files * Change files * fix comment * remove code that would violate security policy
1 parent 405ca36 commit 3d36cc9

File tree

128 files changed

+572
-285
lines changed

Some content is hidden

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

128 files changed

+572
-285
lines changed

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 73 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010

1111
"eslint.enable": true,
12-
"eslint.workingDirectories": [{ "mode": "auto" }], // infer working directory based on .eslintrc/package.json location
12+
"eslint.workingDirectories": [{ "pattern": "./packages/framework/eslint-config-rules" }], // use the common eslint config file
1313

1414
"explorer.fileNesting.enabled": true,
1515
"explorer.fileNesting.patterns": {

apps/E2E/eslint.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
const baseConfig = require('@fluentui-react-native/eslint-config-rules');
22

3-
module.exports = baseConfig;
3+
module.exports = [
4+
...baseConfig,
5+
{
6+
rules: {
7+
'@typescript-eslint/no-duplicate-enum-values': 'off',
8+
'@typescript-eslint/no-invalid-void-type': 'off',
9+
},
10+
},
11+
];

apps/fluent-tester/src/TestComponents/Badge/BasicBadgeTest.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import React, { useState, useCallback, useMemo } from 'react';
32
import { View, Platform, Image } from 'react-native';
43

apps/fluent-tester/src/TestComponents/Badge/CounterBadgeTest.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import React from 'react';
32
import { View, Platform, Text } from 'react-native';
43

apps/fluent-tester/src/TestComponents/Badge/PresenceBadgeTest.android.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import React, { useCallback, useState } from 'react';
32
import { View, StyleSheet, Text } from 'react-native';
43

apps/fluent-tester/src/TestComponents/Badge/PresenceBadgeTest.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import React, { useState, useCallback } from 'react';
32
import { View, Platform, Text } from 'react-native';
43

apps/fluent-tester/src/TestComponents/Button/E2EButtonTest.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import * as React from 'react';
32
import { View } from 'react-native';
43

apps/fluent-tester/src/TestComponents/Button/deprecated/ButtonIconTest.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
import * as React from 'react';
32
import { Platform, View } from 'react-native';
43

@@ -14,8 +13,6 @@ const CustomizedIconButton = Button.customize({
1413
});
1514

1615
export const ButtonIconTest_deprecated: React.FunctionComponent = () => {
17-
/* eslint-disable @typescript-eslint/no-var-requires */
18-
1916
// SVG-based icons are not available on all platforms yet
2017
const svgIconsEnabled = ['ios', 'macos', 'win32', 'android'].includes(Platform.OS as string);
2118
const iconProps = { svgSource: svgProps, width: 20, height: 20 };

0 commit comments

Comments
 (0)