aboutsummaryrefslogblamecommitdiffstats
path: root/webui/.eslintrc.js
blob: 3547cab12c5d123e725669f5b0cf88342c945a94 (plain) (tree)
1
2
3
                  
                                                                    
          















                                       





                                                   



                                     


                                     
                                         














                                                    
  
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'
      }
    },
  ],
};