.eslintrc.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // At some point don't depend on @polkadot rules and use @joystream/eslint-config
  2. const base = require('@polkadot/dev/config/eslint');
  3. // add override for any (a metric ton of them, initial conversion)
  4. module.exports = {
  5. ...base,
  6. parserOptions: {
  7. ...base.parserOptions,
  8. project: [
  9. './tsconfig.json'
  10. ]
  11. },
  12. rules: {
  13. ...base.rules,
  14. '@typescript-eslint/no-explicit-any': 'off',
  15. 'new-cap': 'off',
  16. '@typescript-eslint/interface-name-prefix': 'off',
  17. '@typescript-eslint/ban-ts-comment': 'error',
  18. // why only required in VSCode!?!? is eslint plugin not working like eslint commandline?
  19. // Or are we having to add this because of new versions of eslint-config-* ?
  20. 'no-console': 'off',
  21. // Override some extended config rules:
  22. 'camelcase': 'off',
  23. 'header/header': 'off',
  24. 'sort-keys': 'off',
  25. 'react/jsx-sort-props': 'off',
  26. 'react/jsx-max-props-per-line': 'off',
  27. 'sort-destructure-keys/sort-destructure-keys': 'off',
  28. '@typescript-eslint/unbound-method': 'warn', // Doesn't work well with our version of Formik, see: https://github.com/formium/formik/issues/2589
  29. 'react-hooks/exhaustive-deps': 'warn', // Causes more issues than it solves currently
  30. 'no-void': 'off' // Otherwise we cannot mark unhandles promises
  31. },
  32. // isolate pioneer from monorepo eslint rules
  33. root: true
  34. };