Skip to content

Commit 5469bce

Browse files
committed
Fix compatibility with SPFX 1.15 and minor eslint issues
1 parent 53af1b3 commit 5469bce

21 files changed

+7479
-3149
lines changed

.eslintrc.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
require('@rushstack/eslint-config/patch/modern-module-resolution');
2+
module.exports = {
3+
extends: ['@microsoft/eslint-config-spfx/lib/profiles/react'],
4+
parserOptions: { tsconfigRootDir: __dirname },
5+
overrides: [
6+
{
7+
files: ['*.ts', '*.tsx'], // Your TypeScript files extension
8+
9+
parserOptions: {
10+
project: ['./tsconfig.json'], // Specify it only for TypeScript files
11+
},
12+
13+
rules: {
14+
'react-hooks/exhaustive-deps': 'error',
15+
'@typescript-eslint/no-unused-vars': 'warn',
16+
'@microsoft/spfx/no-async-await': 'off', // IE is dead, long live IE
17+
'@typescript-eslint/typedef': 'off', // useless rule thanks for TS type inference
18+
'@typescript-eslint/no-floating-promises': 'warn',
19+
},
20+
},
21+
],
22+
};

0 commit comments

Comments
 (0)