forked from astroport-fi/astroport-classic-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
79 lines (75 loc) · 1.84 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
// const fs = require('fs');
// const path = require('path');
// const {
// buildASTSchema,
// getIntrospectionQuery,
// graphqlSync,
// parse,
// } = require('graphql');
// const typeDefinition = fs.readFileSync(
// path.join(__dirname, 'schema-public.graphql'),
// 'utf8'
// );
// const schema = buildASTSchema(parse(typeDefinition));
module.exports = {
extends: ["eslint-config-typescript"],
parserOptions: {
project: "./tsconfig.eslint.json",
},
overrides: [
{
files: ["src/test-setup.ts"],
rules: {
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
},
],
},
},
{
files: ["src/common/generatedGraphqlTypes.ts"],
rules: {
"max-len": 0,
"no-shadow": 0,
"@typescript-eslint/indent": 0,
},
},
{
files: ["*.tsx", "*.ts", "*.jsx", "*.js"],
processor: "@graphql-eslint/graphql",
},
{
files: ["*.graphql"],
parser: "@graphql-eslint/eslint-plugin",
plugins: ["@graphql-eslint"],
// parserOptions: {
// schema: './schema-public.graphql',
// },
rules: {
"@graphql-eslint/no-unreachable-types": ["error"],
},
},
],
rules: {
// 'graphql/template-strings': [
// 'error',
// {
// env: 'relay',
// tagName: 'graphql',
// schemaJson: graphqlSync(schema, getIntrospectionQuery()),
// },
// ],
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/naming-convention": 0,
"import/no-named-as-default": 0,
"operator-linebreak": 0,
"react/destructuring-assignment": 0,
"react/jsx-one-expression-per-line": 0,
"react/prefer-stateless-function": 0,
"react/prop-types": 0,
"react/static-property-placement": 0,
"no-ternary": 0,
},
};