Skip to content

Instantly share code, notes, and snippets.

@pyratin
Created April 3, 2025 04:04
Show Gist options
  • Save pyratin/1a5632133dc6c0953dd59fad53096327 to your computer and use it in GitHub Desktop.
Save pyratin/1a5632133dc6c0953dd59fad53096327 to your computer and use it in GitHub Desktop.
eslint.config.mjs
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
eslintPluginReactHooks.configs['recommended-latest'],
eslintPluginPrettierRecommended,
{
rules: {
'no-console': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true }
],
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true }
],
'react/no-unknown-property': 'off',
'react/prop-types': 'off'
}
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment