-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
42 lines (41 loc) · 1.51 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// eslint-disable-next-line tsdoc/syntax
/** @type {import("eslint").Linter.Config} */
const config = {
root: true,
extends: [
'next',
'next/core-web-vitals',
'prettier', // npm package eslint-config-prettier
'airbnb', // npm package eslint-config-airbnb
'airbnb-typescript', // npm package eslint-config-airbnb-typescript
'airbnb/hooks', // npm package eslint-config-airbnb
'eslint:recommended',
'plugin:react/recommended', // npm package eslint-plugin-react
'plugin:@typescript-eslint/recommended', // npm package @typescript-eslint/eslint-plugin
'plugin:prettier/recommended', // npm package eslint-plugin-prettier
],
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc', // https://tsdoc.org/
'react',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
rules: {
'prettier/prettier': 'warn',
'react/react-in-jsx-scope': 'off', // https://stackoverflow.com/a/61160875/3053548,
'import/prefer-default-export': 'off',
'max-len': 'off',
'react/jsx-props-no-spreading': ['off'],
'tsdoc/syntax': 'warn',
'react/function-component-definition': ['error', { namedComponents: 'arrow-function' }],
'@typescript-eslint/no-unused-vars': 'warn',
'react/require-default-props': 'off',
'react/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
'react/jsx-max-props-per-line': ['warn', { maximum: 1, when: 'multiline' }],
'@typescript-eslint/no-shadow': 'off',
},
};
module.exports = config;