-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
142 lines (142 loc) · 5.06 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
module.exports = {
extends: ['tuya-panel'],
plugins: ['literal-check'],
rules: {
'react/display-name': 1,
'@typescript-eslint/no-empty-function': 0,
'literal-check/literal-check': [
2,
['tuya.'],
[
'tuya.m.device.media.latest',
'tuya.m.device.media.detail',
'tuya.m.sweeper.cleaning.history.get',
'tuya.m.sweeper.cleaning.history.delete',
'tuya.m.dev.common.file.list',
'tuya.m.linkage.rule.product.query',
'tuya.m.linkage.dev.warn.set',
'tuya.m.bill.config.get',
'tuya.m.bill.config.update',
'tuya.m.bill.config.currency.list',
'tuya.m.group.dpname.update',
'tuya.m.public.weather.get',
'tuya.m.linkage.rule.bind.wifi.query',
'tuya.m.linkage.rule.brief.query',
'tuya.m.linkage.rule.bind.wifi.save',
'tuya.m.linkage.rule.bind.wifi.remove',
'tuya.m.linkage.rule.trigger',
'tuya.m.smart.operate.all.log',
'tuya.m.dp.stat.days.list',
'tuya.m.dp.stat.month.list',
'tuya.m.dp.rang.stat.hour.list',
'tuya.m.dp.rang.stat.day.list',
'tuya.m.dp.rang.stat.week.list',
'tuya.m.dp.rang.stat.month.list',
'tuya.m.dp.stat.total',
'tuya.m.device.query.device.log',
'tuya.m.clock.dps.add',
'tuya.m.clock.dps.list',
'tuya.m.clock.dps.update',
'tuya.m.clock.dps.group.add',
'tuya.m.clock.dps.group.list',
'tuya.m.clock.dps.group.update',
'tuya.m.clock.batch.status.update',
'tuya.m.clock.category.status.update',
'tuya.m.timer.nearest.get',
'tuya.m.public.weathers.get',
'tuya.m.device.customize.position.save',
'tuya.m.device.customize.position.get',
'tuya.m.timer.astronomical.list',
'tuya.m.timer.astronomical.add',
'tuya.m.timer.astronomical.update',
'tuya.m.timer.astronomical.status.update',
'tuya.m.timer.astronomical.remove',
'tuya.m.linkage.dev.list',
'tuya.m.linkage.rule.brief.query',
'tuya.m.linkage.associative.entity.id.category.query',
'tuya.m.linkage.associative.entity.bind',
'tuya.m.linkage.associative.entity.remove',
'tuya.m.linkage.rule.trigger',
'tuya.m.linkage.rule.enable',
'tuya.m.linkage.rule.disable',
'tuya.m.device.lock.active.period',
'tuya.m.device.relation.update.for.ble',
'tuya.m.device.relation.update',
'tuya.m.device.relation.update.for.beacon',
'tuya.m.timer.group.add',
'tuya.m.timer.group.update',
'tuya.m.timer.group.list',
'tuya.m.timer.group.remove',
'tuya.m.timer.group.status.update',
'tuya.m.light.scenelib.version.list',
'tuya.m.light.panel.scenelib.get',
'tuya.m.light.panel.scenelib.version.upgrade',
'tuya.customer.serve.type.instance.served.check',
'tuya.m.device.lock.media.view.times.get',
'tuya.m.device.lock.media.view.times.set',
'tuya.m.device.lock.capability.cloud.get',
'tuya.ia.app.domain.query',
'tuya.m.device.lock.remote.unlock',
'tuya.m.device.lock.media.path',
'tuya.m.device.lock.media.path.latest',
'tuya.m.dp.rang.stat.hour.export',
'tuya.m.dp.rang.stat.day.export',
'tuya.m.dp.rang.stat.month.export',
'tuya.m.linkage.associative.entity.query',
'tuya.m.linkage.bind.delete',
'tuya.m.app.third.party.info',
'tuya.m.notification.subscribe.all.info',
'tuya.m.dp.total.avg.month',
'tuya.m.app.panel.url.get',
'tuya.m.user.info.get',
'tuya.m.dp.statistics.config.all.get',
'tuya.m.operate.log',
'tuya.m.linkage.bind.enable',
'tuya.app.buyer.high.power.get',
'tuya.p.support.dp.cache.get',
'tuya.m.device.cache.dp.add',
'tuya.m.linkage.device.execute.log.query',
'tuya.m.device.cache.dp.get',
'tuya.m.linkage.device.execute.log.query',
'tuya.m.device.cache.dp.get',
'tuya.m.device.dp.history.list',
'tuya.m.sense.data.email.export',
'tuya.m.sense.data.file.export',
'tuya.m.sense.data.file.export.result',
'tuya.m.sense.data.query',
'tuya.m.linkage.device.criticalAlerts.config.query',
'tuya.m.linkage.device.criticalAlerts.config.save'
],
],
},
overrides: [
{
files: ['*.js'],
extends: ['airbnb', 'airbnb/hooks', 'prettier', 'prettier/react'],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
rules: {
...require('eslint-config-tuya-panel/overrides/rules/javascript'),
...require('eslint-config-tuya-panel/overrides/rules/react'),
'react/jsx-filename-extension': [
2,
{
extensions: ['.js', '.jsx', '.tsx'],
},
],
'react/state-in-constructor': 0,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
},
],
};