Giter Site home page Giter Site logo

Comments (2)

juliajuju93 avatar juliajuju93 commented on September 27, 2024

@UniperMaster :
Thank you so much for reaching out.
Functions will work with the ruleset.

You are currently using the SimpleJS syntax and in order for our linter to work, it needs ES syntax. Our current recommendation is for you to transition from SimpleJS to ES syntax.

Transitioning from SimpleJS syntax (which is similar to CommonJS) to ES Modules (ESM) involves a few steps. Let’s explore how you can make this transition:

  1. Understand the Differences:
  • CommonJS uses require() for importing modules and module.exports or exports for exporting.
  • ESM introduces the import and export syntax natively to JavaScript.
  • ESM offers better performance, compatibility, and static analysis benefits.
  1. Update Your Code:
  • Start by converting your module syntax from require to import.
  • Rename files to use the .mjs extension (or adjust the type property in package.json if you prefer .js for ESM).
  1. Package.json Configuration (optional):
  • Set "type": "module" in your package.json to enable ESM.
    Ensure backward compatibility by specifying .js or .mjs extensions for ESM files.

from apicenter-analyzer.

juliajuju93 avatar juliajuju93 commented on September 27, 2024

For the future: we are currently having conversations about supporting this in the future. In the mean time, I will add a note to the readme file

from apicenter-analyzer.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.