mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
plugins: [
|
|
'simple-import-sort',
|
|
'@typescript-eslint',
|
|
'prettier',
|
|
'react-hooks',
|
|
],
|
|
parserOptions: {
|
|
tsconfigRootDir: __dirname,
|
|
project: ['./tsconfig.json'],
|
|
},
|
|
extends: [
|
|
'next',
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:prettier/recommended',
|
|
],
|
|
rules: {
|
|
'@typescript-eslint/ban-ts-comment': 'warn',
|
|
'@typescript-eslint/no-empty-function': 'warn',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@typescript-eslint/no-unsafe-function-type': 'warn',
|
|
'@typescript-eslint/no-unused-expressions': 'warn',
|
|
'@typescript-eslint/no-unused-vars': 'warn',
|
|
'react/display-name': 'off',
|
|
'simple-import-sort/exports': 'error',
|
|
'simple-import-sort/imports': 'error',
|
|
'react-hooks/exhaustive-deps': 'error',
|
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['**/*.js', '**/*.ts', '**/*.tsx'],
|
|
rules: {
|
|
'simple-import-sort/imports': [
|
|
'error',
|
|
{
|
|
groups: [
|
|
['^react$', '^next', '^[a-z]', '^@'],
|
|
['^@/'],
|
|
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
['^.+\\.s?css$'],
|
|
['^\\u0000'],
|
|
],
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
// Disable strict rules for E2E test files
|
|
files: ['tests/e2e/**/*.ts', 'tests/e2e/**/*.js'],
|
|
rules: {
|
|
'no-console': 'off',
|
|
'no-empty': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'@next/next/no-html-link-for-pages': 'off',
|
|
},
|
|
},
|
|
],
|
|
};
|