Skip to content

Instantly share code, notes, and snippets.

@dipeshhkc
Created February 4, 2022 14:08
Show Gist options
  • Save dipeshhkc/be44e2d82a998708d30216bfc02f26f5 to your computer and use it in GitHub Desktop.
Save dipeshhkc/be44e2d82a998708d30216bfc02f26f5 to your computer and use it in GitHub Desktop.
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'airbnb',
'airbnb-typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/jsx-runtime',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
project: 'tsconfig.json',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'react/function-component-definition': [
2,
{
namedComponents: 'function-declaration',
},
],
'react/jsx-filename-extension': [2, { extensions: ['.ts', '.tsx'] }],
'no-underscore-dangle': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'no-nested-ternary': 'off',
'max-len': 0,
'react/jsx-props-no-spreading': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/function-component-definition': 'off',
'@typescript-eslint/no-shadow': 'warn',
'react/no-unstable-nested-components': ['error', { allowAsProps: true }],
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment