[AskJS] Opinions on how to export default const

This page summarizes the projects mentioned and recommended in the original post on /r/javascript

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • javascript

    JavaScript Style Guide

  • I think there's still a case for default exports for a file like toggle.js where the module itself is composed of a single function, but again it's down to your own workflow and personal preference. There's some great discussion in https://github.com/airbnb/javascript/issues/1365 about the pros and cons. Tooling support is definitely a big component of both sides.

  • eslint-plugin-import

    ESLint plugin with rules that help validate proper imports.

  • I think there's an argument to made that dev tooling could be improved to make default imports more useable. You're absolutely right that named exports fail faster in plain JS without using something like eslint, but there is an eslint rule thing that I discovered to mitigate the naming problem: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-named-as-default.md

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Decoding JavaScript Variables: A Comprehensive Overview

    1 project | dev.to | 21 Apr 2024
  • Airbnb JavaScript Style Guide

    1 project | news.ycombinator.com | 3 Apr 2024
  • How, and why, you should add JavaScript linting to your project. With ESLint and Gulp

    3 projects | dev.to | 4 Mar 2024
  • Linting

    2 projects | dev.to | 3 Mar 2024
  • How to Do a TypeScript Conversion: an opinionated take on gradual conversions

    2 projects | news.ycombinator.com | 4 Nov 2023