Skip to content

Module generates eslint config with the old commonJS syntax #451

Closed
@aleksey-hoffman

Description

@aleksey-hoffman

The module generates eslint config with the old commonJS syntax

When you init a new project:

npm create vite@latest

And then setup the Vue / configure with vue-create template

Instead of generating modern .js config file with modern export default syntax, the module creates commonJS ./eslintrc.cjs file with the old commonJS module.exports = {} syntax, with a require() monkey patch at the top:

/* eslint-env node */
require("@rushstack/eslint-patch/modern-module-resolution")

module.exports = {
  root: true,
  'extends': [
    'plugin:vue/vue3-essential',
    'eslint:recommended',
    '@vue/eslint-config-typescript'
  ],
  parserOptions: {
    ecmaVersion: 'latest'
  }
}

It doesn't make any sense and it's not clear why it does that. Please shine some light on this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions