-
Notifications
You must be signed in to change notification settings - Fork 144
Expand file tree
/
Copy patheslint.config.js
More file actions
78 lines (77 loc) · 2.23 KB
/
eslint.config.js
File metadata and controls
78 lines (77 loc) · 2.23 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import eslint from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import remotionPlugin from '@remotion/eslint-plugin';
export default [
eslint.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaFeatures: { jsx: true },
ecmaVersion: 'latest',
sourceType: 'module'
},
globals: {
browser: true,
document: true,
window: true,
NodeJS: true,
JSX: true,
React: true,
ReactDOM: true,
}
},
plugins: {
'@typescript-eslint': tseslint,
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
'@remotion': remotionPlugin
},
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-console': 'off',
'no-debugger': 'error',
'no-duplicate-imports': 'error',
'no-unused-expressions': 'error',
'no-var': 'error',
'prefer-const': 'error',
'no-undef': 'off',
'react/jsx-no-undef': 'error',
'react/no-array-index-key': 'warn',
'react/no-children-prop': 'error',
'react/no-danger': 'warn',
'react/no-deprecated': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-is-mounted': 'error',
'react/no-render-return-value': 'error',
'react/no-string-refs': 'error',
'react/no-unknown-property': 'error',
'react/require-render-return': 'error',
'react/self-closing-comp': 'error'
},
settings: {
react: {
version: 'detect'
}
}
},
{
files: ['app/video-compositions/*.{ts,tsx}'],
plugins: {
'@remotion': remotionPlugin
},
rules: remotionPlugin.configs.recommended.rules
}
];