git-bug/webui/.eslintrc.js
2022-02-22 21:59:18 +01:00

50 lines
1.1 KiB
JavaScript

module.exports = {
extends: ['react-app', 'prettier', 'plugin:prettier/recommended'],
rules: {
'import/order': [
'error',
{
alphabetize: { order: 'asc' },
pathGroups: [
{
pattern: '@material-ui/**',
group: 'external',
position: 'after',
},
{
pattern: '*.generated',
group: 'sibling',
position: 'after',
},
],
pathGroupsExcludedImportTypes: ['builtin'],
groups: [
['builtin', 'external'],
['internal', 'parent'],
['sibling', 'index'],
],
'newlines-between': 'always',
},
],
},
settings: {
'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'
}
},
],
};