-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
35 lines (33 loc) · 1.24 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
const { resolve } = require('path')
const project = resolve(__dirname, 'tsconfig.json')
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'prettier',
require.resolve('@vercel/style-guide/eslint/react'),
require.resolve('@vercel/style-guide/eslint/typescript'),
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh', '@tanstack/eslint-plugin-query'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react/jsx-sort-props': 'off',
'react/jsx-no-leaked-render': 'off',
'react/function-component-definition': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
},
parserOptions: { project },
settings: { 'import/resolver': { typescript: { project } } },
}