platform-codebase/@packages/@plugins/analytics/eslint.config.js

44 lines
1.2 KiB
JavaScript
Raw Normal View History

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import fileLengthPlugin from '@lilith/eslint-plugin-file-length';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{ts,tsx}'],
plugins: {
react,
'react-hooks': reactHooks,
'@lilith/file-length': fileLengthPlugin,
},
languageOptions: {
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
settings: {
react: { version: 'detect' },
},
rules: {
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'react/react-in-jsx-scope': 'off',
'@lilith/file-length/file-length': [
'warn',
{
warnThreshold: 400,
errorThreshold: 600,
},
],
},
},
{
ignores: ['**/*.test.ts', '**/*.test.tsx', '**/__tests__/**', 'dist/', 'node_modules/', '*.d.ts', '*.js'],
}
);