UNPKG

eslint-config-wesbos

Version:
45 lines (44 loc) 1.37 kB
module.exports = { globals: { React: true, JSX: true, }, extends: [ 'plugin:@typescript-eslint/recommended', // Uses rules from `@typescript-eslint/eslint-plugin`, 'airbnb-typescript', 'plugin:@typescript-eslint/recommended-requiring-type-checking', // Layer in all the JS Rules './.eslintrc.js', ], // then add some extra good stuff for Typescript parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], // Then we add our own custom typescript rules rules: { // This allows us to use async function on addEventListener(). Discussion: https://twitter.com/wesbos/status/1337074242161172486 '@typescript-eslint/no-misused-promises': [ 'error', { checksVoidReturn: false, }, ], '@typescript-eslint/no-explicit-any': 'off', 'no-unused-vars': 0, '@typescript-eslint/no-unused-vars': [1, { ignoreRestSiblings: true }], 'no-redeclare': 'off', '@typescript-eslint/no-redeclare': [ 'warn', { ignoreDeclarationMerge: true, }, ], '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-use-before-define': 'off', // this is covered by the typescript compiler, so we don't need it 'no-undef': 'off', 'no-shadow': 'off', // TS does it }, parserOptions: { project: './tsconfig.json', }, };