UNPKG

eslint-ts-config-nure

Version:

ESLint Typescript configuration from Nure

84 lines (79 loc) 1.68 kB
module.exports = { env: { browser: true, es6: true, node: true, jest: true, }, parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'jsx-a11y', 'import', 'react-hooks', 'react'], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:jsx-a11y/strict', 'plugin:react/recommended', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript', 'prettier/@typescript-eslint', ], parserOptions: { ecmaFeatures: { jsx: true, }, }, rules: { 'import/order': [ 'warn', { groups: [ 'builtin', 'external', 'internal', 'parent', 'sibling', 'index', ], 'newlines-between': 'always-and-inside-groups', }, ], 'import/exports-last': 'warn', 'max-lines': [ 'error', { max: 500, skipBlankLines: true, }, ], 'max-params': ['warn', 3], 'no-alert': 'error', 'no-extend-native': 'error', 'no-return-await': 'error', 'no-sync': 'error', 'no-throw-literal': 'error', 'no-useless-return': 'error', 'no-var': 'error', 'prefer-const': 'error', 'prefer-destructuring': 'warn', 'react/jsx-curly-brace-presence': [ 'warn', { props: 'never', children: 'never', }, ], 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', 'require-await': 'error', }, settings: { react: { version: 'detect', }, 'import/resolver': { node: { paths: ['src'], }, }, }, }