forked from leegeunhyeok/react-native-esbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
82 lines (80 loc) · 1.98 KB
/
.eslintrc.js
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
79
80
81
82
const { resolve } = require('node:path');
const project = resolve(__dirname, 'tsconfig.json');
/** @type { import('eslint').ESLint.ConfigData } */
module.exports = {
root: true,
env: {
node: true,
},
plugins: ['prettier'],
extends: [
require.resolve('@vercel/style-guide/eslint/node'),
require.resolve('@vercel/style-guide/eslint/typescript'),
],
parserOptions: {
project,
},
settings: {
'import/resolver': {
typescript: {
project,
},
},
},
overrides: [
{
files: ['*.ts?(x)', '*.js?(x)'],
rules: {
semi: ['error', 'always'],
quotes: ['error', 'single'],
'new-cap': 'off',
'object-curly-spacing': ['error', 'always'],
'array-bracket-spacing': 'off',
'unicorn/filename-case': 'off',
'import/no-named-as-default-member': 'off',
'no-bitwise': 'off',
'no-param-reassign': 'off',
'eslint-comments/disable-enable-pair': 'off',
'prettier/prettier': 'error',
'@typescript-eslint/prefer-reduce-type-parameter': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
},
},
{
files: ['**/build/*.js'],
rules: {
'no-console': 'off',
},
},
{
files: ['packages/jest/lib/**/*.ts'],
rules: {
'import/no-default-export': 'off',
'import/no-named-as-default': 'off',
},
},
{
files: ['example/**/*'],
rules: {
'no-console': 'off',
'unicorn/filename-case': 'off',
},
},
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
{
files: ['**/*.config.[tj]s'],
rules: {
'import/no-default-export': 'off',
},
},
],
};