From b70b4ba4b17d02d9744bd72494549f5cf7d980f8 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Tue, 11 Feb 2020 22:11:08 +0100 Subject: webui: lint graphql files --- webui/.eslintrc.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 webui/.eslintrc.js (limited to 'webui/.eslintrc.js') diff --git a/webui/.eslintrc.js b/webui/.eslintrc.js new file mode 100644 index 00000000..2b4a60de --- /dev/null +++ b/webui/.eslintrc.js @@ -0,0 +1,32 @@ +module.exports = { + extends: [ + "react-app", + "prettier/@typescript-eslint", + "plugin:prettier/recommended" + ], + plugins: [ + "graphql" + ], + rules: { + "graphql/template-strings": ["error", { + "schemaJson": require("./src/schema.json"), + "env": "literal" + }], + "import/order": [ + "error", { + "alphabetize": {"order": "asc"}, + "pathGroups": [{ + "pattern": "@material-ui/**", + "group": "external", + "position": "after" + }, { + "pattern": "*.generated", + "group": "sibling", + "position": "after" + }], + "groups": [["builtin", "external"], "parent", ["sibling", "index"]], + "newlines-between": "always" + } + ] + } +}; -- cgit From ab09c03a1e55d5c2e35f332f0e5f6335c1670427 Mon Sep 17 00:00:00 2001 From: ludovicm67 Date: Wed, 12 Feb 2020 23:39:23 +0100 Subject: webui: format some files --- webui/.eslintrc.js | 59 +++++++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 27 deletions(-) (limited to 'webui/.eslintrc.js') diff --git a/webui/.eslintrc.js b/webui/.eslintrc.js index 2b4a60de..7adbb8d5 100644 --- a/webui/.eslintrc.js +++ b/webui/.eslintrc.js @@ -1,32 +1,37 @@ module.exports = { extends: [ - "react-app", - "prettier/@typescript-eslint", - "plugin:prettier/recommended" - ], - plugins: [ - "graphql" + 'react-app', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', ], + plugins: ['graphql'], rules: { - "graphql/template-strings": ["error", { - "schemaJson": require("./src/schema.json"), - "env": "literal" - }], - "import/order": [ - "error", { - "alphabetize": {"order": "asc"}, - "pathGroups": [{ - "pattern": "@material-ui/**", - "group": "external", - "position": "after" - }, { - "pattern": "*.generated", - "group": "sibling", - "position": "after" - }], - "groups": [["builtin", "external"], "parent", ["sibling", "index"]], - "newlines-between": "always" - } - ] - } + 'graphql/template-strings': [ + 'error', + { + schemaJson: require('./src/schema.json'), + env: 'literal', + }, + ], + 'import/order': [ + 'error', + { + alphabetize: { order: 'asc' }, + pathGroups: [ + { + pattern: '@material-ui/**', + group: 'external', + position: 'after', + }, + { + pattern: '*.generated', + group: 'sibling', + position: 'after', + }, + ], + groups: [['builtin', 'external'], 'parent', ['sibling', 'index']], + 'newlines-between': 'always', + }, + ], + }, }; -- cgit