5180 fichiers 38.5 Mo 0 téléchargements 32 vues mis à jour il y a 2 heures ui
nitro-v36-with-renderer-v36 / eslint.config.mjs
eslint.config.mjs 1.3 Ko Télécharger le fichier
// ESLint config of the client: the Rules of Hooks, and nothing else.
//
// Formatting and the general lint baseline are Biome's job (`yarn lint`). ESLint is kept for the one
// check Biome cannot make: react-hooks/rules-of-hooks, so a hook-order violation breaks the build the
// same way a typecheck or test failure would. Wired up as `yarn lint:hooks` (see package.json) and
// called from .github/workflows/ci.yml; the editor's ESLint extension reads this file as well.

import typescriptEslintParser from '@typescript-eslint/parser';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default [
    {
        files: ['**/*.jsx', '**/*.js', '**/*.tsx', '**/*.ts'],
        plugins: {
            'react-hooks': reactHooksPlugin
        },
        languageOptions: {
            parser: typescriptEslintParser,
            ecmaVersion: 'latest',
            parserOptions: {
                sourceType: 'module',
                project: './tsconfig.json',
                tsconfigRootDir: __dirname,
                ecmaFeatures: {
                    jsx: true
                }
            }
        },
        rules: {
            'react-hooks/rules-of-hooks': 'error'
        }
    }
];
15Sujets
1Dépôts
20Membres
4En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser