-
Notifications
You must be signed in to change notification settings - Fork 141
Expand file tree
/
Copy patheslint.config.js
More file actions
54 lines (53 loc) · 1.29 KB
/
eslint.config.js
File metadata and controls
54 lines (53 loc) · 1.29 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
const eslintBraintreeClientConfig = require("eslint-config-braintree/client");
const eslintJestConfig = require("eslint-config-braintree/jest");
const jsdoc = require("eslint-plugin-jsdoc");
module.exports = [
{
ignores: [
"node_modules/",
"dist/",
"vendor/",
"storybook-static/",
".storybook/static/",
"src/venmo/shared/events.js",
"src/venmo/shared/types.js",
"src/venmo/internal",
"src/venmo/external",
"**/coverage/",
],
},
...eslintBraintreeClientConfig.default,
{
files: ["src/**/*.js"],
rules: {
camelcase: "error",
},
},
{
files: ["src/**/*.js", "__mocks__/**/*.js"],
plugins: {
jsdoc,
},
rules: {
// Turning this rule off because otherwise it will create JSDoc blocks for _every_ function
"jsdoc/require-jsdoc": "off",
"jsdoc/require-returns": "error",
"jsdoc/require-param-description": "error",
"jsdoc/require-returns-description": "error",
},
},
...eslintJestConfig.default,
{
files: [".storybook/**/*.ts"],
languageOptions: {
globals: {
browser: "readonly",
driver: "readonly",
$: "readonly",
$$: "readonly",
process: "readonly",
ApplePaySession: "readonly",
},
},
},
];