.eslintrc.js 732 B

12345678910111213141516171819202122232425262728293031323334
  1. /* eslint-env node */
  2. /* eslint import/no-nodejs-modules:0 */
  3. const path = require('path');
  4. module.exports = {
  5. parserOptions: {
  6. sourceType: 'module',
  7. },
  8. env: {
  9. node: true,
  10. es6: true,
  11. },
  12. settings: {
  13. 'import/resolver': {
  14. webpack: {
  15. config: path.join(__dirname, './storybook/webpack.config.ts'),
  16. },
  17. },
  18. 'import/extensions': ['.js', '.jsx'],
  19. },
  20. overrides: [
  21. {
  22. files: ['**/*.stories.js'],
  23. rules: {
  24. // XXX(epurkhiser): The storybook CSF requires anonymous default
  25. // exportsthis, see [0].
  26. //
  27. // [0]: https://github.com/storybookjs/storybook/issues/12914
  28. 'import/no-anonymous-default-export': 'off',
  29. },
  30. },
  31. ],
  32. };