Skip to content

Instantly share code, notes, and snippets.

@Stanzilla
Created July 1, 2024 14:40
Show Gist options
  • Save Stanzilla/54d4bfd0911234c2f2da7ec784dc502f to your computer and use it in GitHub Desktop.
Save Stanzilla/54d4bfd0911234c2f2da7ec784dc502f to your computer and use it in GitHub Desktop.
module.exports = {
extends: [
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:promise/recommended',
'plugin:@tanstack/eslint-plugin-query/recommended',
'plugin:vitest/legacy-recommended',
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@cspell/recommended',
'plugin:import-x/recommended',
'plugin:import-x/typescript',
'prettier',
],
plugins: ['@typescript-eslint', 'vitest'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-unused-vars': 'off',
'no-underscore-dangle': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{ varsIgnorePattern: '^React' },
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'no-return-await': 'off',
'@typescript-eslint/require-await': 'off',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false,
},
],
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-autofocus': 'off',
'react/jsx-filename-extension': [
1,
{ extensions: ['.js', '.jsx', '.ts', '.tsx', '.test.tsx'] },
],
'react/function-component-definition': 'off',
'no-console': 'off',
'react-hooks/exhaustive-deps': 'error',
'import-x/no-named-as-default': 'off',
'import-x/no-named-as-default-member': 'off',
},
settings: {
'import-x/resolver': {
typescript: true,
node: true,
},
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
project: true,
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment