problem with eslint and vitest plugin
i cannot make eslint work in webstorm on my project,
here is the error:
SyntaxError: Failed to load plugin 'vitest' declared in '--config': Unexpected token '.'
Referenced from: /home/poule/encrypted/stockage-syncable/www/development/html/osrd/front/.eslintrc/home/poule/encrypted/stockage-syncable/www/development/html/osrd/front/node_modules/eslint-plugin-vitest/dist/index.cjs:172
if (member.parent?.type === utils.AST_NODE_TYPES.MemberExpression && member.parent.parent?.type === utils.AST_NODE_TYPES.CallExpression) {
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at ConfigArrayFactory._loadPlugin (/home/poule/encrypted/stockage-syncable/www/development/html/osrd/front/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3423:42)
at ConfigArrayFactory._loadExtendedPluginConfig (/home/poule/encrypted/stockage-syncable/www/development/html/osrd/front/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3224:29)
at ConfigArrayFactory._loadExtends (/home/poule/encrypted/stockage-syncable/www/development/html/osrd/front/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3145:29)
Process finished with exit code -1
here is the source for the .eslintrc file:
https://github.com/osrd-project/osrd/blob/dev/front/.eslintrc
Please sign in to leave a comment.
What Node.js version do you use? Looks like it doesn't support the optional chaining operator (
?). Please share a screenshot of the Settings | Languages & Frameworks | Node.js pagei did setup a newer version of nodejs to the 21 stable version but it id not change the error
oh nevermind, it was slow but it changed and now it seems to be working.
thank you
That's strange, what is a result of running eslint in terminal using the same configuration file and Node.js interpreter?
Great, thanks for update!