eslint-plus-action icon indicating copy to clipboard operation
eslint-plus-action copied to clipboard

`TypeError: eslint_1.CLIEngine is not a constructor` in Node 16.11.1

Open jfeldstein opened this issue 3 years ago • 6 comments

This error:

[ESLINT] Run With Configuration  {
  extensions: [ '.js', '.jsx', '.ts', '.tsx' ],
  ignore: true,
  useEslintrc: true,
  rulePaths: [],
  errorOnUnmatchedPattern: false,
  fix: false,
  configFile: undefined
}
##[error]TypeError: eslint_1.CLIEngine is not a 
##[error]eslint_1.CLIEngine is not a constructor

Is caused by the following workflow YML:

name: pull-request

on:
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Check out code
        uses: actions/checkout@v2

      - name: Set up node 
        uses: actions/setup-node@v2
        with:
          node-version: '16.11.1'
          cache: 'yarn'

      - name: Install dependencies
        run: yarn

      - name: ESLint Plus
        uses: bradennapier/eslint-plus-action@v3

      - name: Run tests 
        run: yarn test

jfeldstein avatar Oct 25 '21 17:10 jfeldstein

Same issue, but with node 14.18.1

jfeldstein avatar Dec 02 '21 03:12 jfeldstein

It does work with 16.13.0 when using npm

jfeldstein avatar Dec 02 '21 03:12 jfeldstein

Isn't this issue related to breaking changes in eslint 8 and not node?

Maggi64 avatar Dec 22 '21 11:12 Maggi64

Any update on this?

Gaeta avatar Dec 26 '21 04:12 Gaeta

might be helpful for the repo owner to fix the issue https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#the-cliengine-class-has-been-removed

einSelbst avatar Jan 13 '22 22:01 einSelbst

Added a PR: #73

This can already be used with:

- name : Run eslint on changed files
  uses : Maggi64/eslint-plus-action@master

Maggi64 avatar Jan 20 '22 12:01 Maggi64