forked from buildspace/solana-pay-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
52 lines (46 loc) · 1.87 KB
/
.eslintrc
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
{
"extends": ["next", "eslint:recommended", "prettier"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"settings": {
"import/resolver": {
"node": {
"paths": ["src"]
}
}
},
"rules": {
"react/prop-types": "error",
"react/display-name": "off",
"react/no-children-prop": "warn",
// disallow importing from the same path more than once
// http://eslint.org/docs/rules/no-duplicate-imports
"no-duplicate-imports": "error",
// ensure imports point to files/modules that can be resolved
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md
"import/no-unresolved": ["error", { "commonjs": true, "caseSensitive": true }],
// Forbid the use of extraneous packages
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
// paths are treated both as absolute paths, and relative to process.cwd()
"import/no-extraneous-dependencies": ["error", {
"devDependencies": [
"test/**", // tape, common npm pattern
"tests/**", // also common npm pattern
"spec/**", // mocha, rspec-like pattern
"**/__tests__/**", // jest pattern
"**/__mocks__/**", // jest pattern
"test.{js,jsx}", // repos with a single test file
"test-*.{js,jsx}", // repos with multiple top-level test files
"**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
"**/jest.config.js", // jest config
"**/jest.setup.js" // jest setup
],
"optionalDependencies": false
}],
"no-use-before-define": ["error", { "functions": false, "classes": false, "variables": true }]
}
}