babel / babel

🐠 Babel is a compiler for writing next generation JavaScript.
https://babel.dev
MIT License
42.96k stars 5.59k forks source link

I cannot install the package with the latest eslint version. #16418

Closed Pietervanhalem closed 1 month ago

Pietervanhalem commented 1 month ago

💻

How are you using Babel?

@babel/eslint-parser

Input code

npm i

Configuration file name

package.json

Configuration

dependencies of package.json

  "dependencies": {
    "@quasar/extras": "^1.16.11",
    "ajv": "^8.12.0",
    "axios": "^1.6.8",
    "core-js": "^3.36.1",
    "date-fns": "^3.6.0",
    "dotenv": "^16.4.5",
    "inflection": "^3.0.0",
    "json-editor": "^0.7.28",
    "json-editor-vue": "^0.13.0",
    "jsondiffpatch": "^0.6.0",
    "pinia": "^2.1.7",
    "pug": "^3.0.2",
    "pug-plain-loader": "^1.1.0",
    "quasar": "^2.15.2",
    "vue": "^3.4.21",
    "vue-router": "^4.3.0"
  }

.eslintrc.cjs

module.exports = {
  // https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
  // This option interrupts the configuration hierarchy at this file
  // Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
  root: true,

  parserOptions: {
    parser: '@babel/eslint-parser',
    ecmaVersion: 2021, // Allows for the parsing of modern ECMAScript features
    sourceType: 'module', // Allows for the use of imports
  },

  env: {
    browser: true,
  },

  // Rules order is important, please avoid shuffling them
  extends: [
    'airbnb-base',
    'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
    'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
    'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
    'plugin:import/errors',
    'plugin:import/warnings',
  ],

  plugins: [
    // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
    // required to lint *.vue files
    'vue',
    'import',
  ],

  overrides: [
    {
      files: ['*.vue'],
      rules: {
        'max-len': 'off', // disables line length check, as disabling in pug is not supported
      },
    },
  ],

  globals: {
    ga: true, // Google Analytics
    cordova: true,
    __statics: true,
    process: true,
    Capacitor: true,
    chrome: true,

    // Jest / Cypress
    describe: true,
    before: true,
    beforeEach: true,
    after: true,
    afterEach: true,
    it: true,
    expect: true,
    cy: true,
    Cypress: true,
    Logger: true,
    jest: true,
  },

  // add your custom rules here
  rules: {
    // allow async-await
    'generator-star-spacing': 'off',
    // allow paren-less arrow functions
    'arrow-parens': 'off',
    'one-var': 'off',
    'no-void': 'off',
    'no-nested-ternary': 'off',
    'max-classes-per-file': 'off',

    'import/first': 'off',
    'import/named': 'error',
    'import/namespace': 'error',
    'import/default': 'error',
    'import/export': 'error',
    'import/extensions': 'off',
    'import/no-unresolved': 'off',
    'import/no-extraneous-dependencies': 'off',
    'prefer-promise-reject-errors': 'off',
    'no-var': 'error',
    'no-param-reassign': [2, { props: true }],

    // allow debugger during development only
    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',

    // turn off max-len, because other eslint rules
    // sometimes change multiline expressions to a single line
    // conflicting with this rule
    'max-len': 0,

    // define import order
    'import/order': [
      'error', {
        groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
      },
    ],

    // enforce new line after imports
    'import/newline-after-import': ['error', { count: 1 }],

    // do not allow unused vars to remain in code
    'no-unused-vars': 2,

    // do not allow console.logs in code
    'no-console': 2,

    // allow ++
    'no-plusplus': 0,

    // disable semicolon
    semi: 0,
  },
}

Current and expected behavior

I was hoping to install the @babel/eslint-parser with "eslint": "^9.0.0"

Environment

System: OS: Linux 5.15 Debian GNU/Linux 12 (bookworm) 12 (bookworm) Binaries: Node: 18.19.1 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.4 - /usr/local/bin/npm npmPackages: @babel/eslint-parser: ^7.24.1 => 7.24.1 eslint: ^9.0.0 => 9.0.0

Possible solution

No response

Additional context

No response

babel-bot commented 1 month ago

Hey @Pietervanhalem! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.

nicolo-ribaudo commented 1 month ago

Duplicate of https://github.com/babel/babel/issues/16220

nicolo-ribaudo commented 1 month ago

I published @babel/eslint-parser@7.24.5-pre.1 and @babel/eslint-plugin@7.24.5-pre.1 (both tagged as next-eslint-9 on npm) from https://github.com/babel/babel/pull/16414. Please try them out and report any problems!