aboutsummaryrefslogtreecommitdiffstats
path: root/webui/.eslintrc.js
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2022-02-22 21:59:18 +0100
committerQuentin Gliech <quentingliech@gmail.com>2022-02-22 21:59:18 +0100
commit5f35db2275ea49abf8459c1e34568ce9a4e8dd09 (patch)
tree49cfbde9eaf318a132304cf914920d11a23cea17 /webui/.eslintrc.js
parentfd17d6dd1f7c9fbda4d3c3e2c2eb232bd9086fab (diff)
downloadgit-bug-5f35db2275ea49abf8459c1e34568ce9a4e8dd09.tar.gz
webui: replace GraphQL linter
Diffstat (limited to 'webui/.eslintrc.js')
-rw-r--r--webui/.eslintrc.js37
1 files changed, 22 insertions, 15 deletions
diff --git a/webui/.eslintrc.js b/webui/.eslintrc.js
index 8b3ad111..3547cab1 100644
--- a/webui/.eslintrc.js
+++ b/webui/.eslintrc.js
@@ -1,18 +1,6 @@
module.exports = {
- extends: [
- 'react-app',
- 'prettier',
- 'plugin:prettier/recommended',
- ],
- plugins: ['graphql'],
+ extends: ['react-app', 'prettier', 'plugin:prettier/recommended'],
rules: {
- 'graphql/template-strings': [
- 'error',
- {
- schemaJson: require('./src/schema.json'),
- env: 'literal',
- },
- ],
'import/order': [
'error',
{
@@ -29,8 +17,12 @@ module.exports = {
position: 'after',
},
],
- pathGroupsExcludedImportTypes: ["builtin"],
- groups: [['builtin', 'external'], ['internal', 'parent'], ['sibling', 'index']],
+ pathGroupsExcludedImportTypes: ['builtin'],
+ groups: [
+ ['builtin', 'external'],
+ ['internal', 'parent'],
+ ['sibling', 'index'],
+ ],
'newlines-between': 'always',
},
],
@@ -39,4 +31,19 @@ module.exports = {
'import/internal-regex': '^src/',
},
ignorePatterns: ['**/*.generated.tsx'],
+
+ overrides: [
+ {
+ files: ['*.graphql'],
+ parser: '@graphql-eslint/eslint-plugin',
+ plugins: ['@graphql-eslint'],
+ rules: {
+ '@graphql-eslint/known-type-names': 'error',
+ },
+ parserOptions: {
+ schema: './src/schema.json',
+ operations: './src/**/*.graphql'
+ }
+ },
+ ],
};