-
Notifications
You must be signed in to change notification settings - Fork 197
/
eslint.config.js
57 lines (53 loc) · 1.29 KB
/
eslint.config.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
import hypothesisBase from 'eslint-config-hypothesis/base';
import hypothesisJSX from 'eslint-config-hypothesis/jsx';
import hypothesisTS from 'eslint-config-hypothesis/ts';
import globals from 'globals';
export default [
{
ignores: [
'.tox/**/*',
'.yalc/**/*',
'.yarn/**/*',
'build/**/*',
'**/vendor/**/*.js',
'**/coverage/**/*',
'docs/_build/*',
'dev-server/static/**/*.js',
],
},
...hypothesisBase,
...hypothesisJSX,
...hypothesisTS,
// Annotator module
{
files: ['src/annotator/**/*.{js|tx|tsx}'],
rules: {
'no-restricted-properties': [
2,
{
// Disable `bind` usage in annotator/ code to prevent unexpected behavior
// due to broken bind polyfills. See
// https://github.com/hypothesis/client/issues/245
property: 'bind',
message:
'Use function expressions instead of bind() in annotator/ code',
},
],
},
},
// Scripts and configuration files
{
files: ['**/*.js'],
ignores: ['src/**'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-console': 'off',
'react-hooks/rules-of-hooks': 'off',
},
languageOptions: {
globals: {
...globals.node,
},
},
},
];