-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
avoid false positive with correct setup and multiple eslint plugins t… #112
avoid false positive with correct setup and multiple eslint plugins t… #112
Conversation
…hat use the same parser
this generally means your dependencies are wrong. can you provide the output of: pnpm why ember-eslint-parser -r there should hopefully only be one version |
it's likely that you have two different versions of eslint-plugin-ember |
there is only one version of ember-eslint-parser 0.5.6 |
Maybe the deps are not fully correct. But we also do not need to log the message in that case. |
@void-mAlex do you have a repro? I'd like to see because this would be the first time a non-duplicate dependency has caused this! It's very puzzling! |
I can set up up tomorrow but simply setting up a new v2 addon with the current bp (non ts) and following the gjs lint setup for the test app will do the trick |
@NullVoxPopuli |
explorationI had to delete the lockfile, as it was made with pnpm 8. Using pnpm 9.12.3, i get: ❯ pnpm why ember-eslint-parser -r
Legend: production dependency, optional only, dev only
[email protected] <repo>/repro-eslint-plugin
devDependencies:
eslint-plugin-ember 12.3.3
└── ember-eslint-parser 0.5.6
eslint-plugin-ember-template-lint 0.19.0
└── ember-eslint-parser 0.5.6
[email protected] <repo>/test-app (PRIVATE)
devDependencies:
eslint-plugin-ember 12.3.3
└── ember-eslint-parser 0.5.6 and
so that seems fine. but the error still exists -- which is perplexing. To date, the above output would confirm workingness. So..... that's weird. Using this (from another project):
the issue is still not resolved. Looking at the error more closely, it looks like you didn't set the parser
the eslint config was not updated to suppert gjs. For testing purposes, I just had this in the eslint config (and it works): 'use strict';
module.exports = {
root: true,
overrides: [
{
parser: 'ember-eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
plugins: [[require.resolve('decorator-transforms')]],
},
},
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended'],
env: {
browser: true,
},
files: ['*.gjs'],
},
],
}; So, you're saying that in this PR, you don't have to configure the parser somehow? Starting in ember-cli 6.1, the eslint config will be a flat config, and using eslint 9 -- gjs is also already set up there. |
Gonna close for now. Lemme know if this still needs addressing after using the latest configs. |
…hat use the same parser
setting up gjs on a v2 addon monorepo causes what appears to be a false positive as best as I can tell
with this change patched using pnpm I get correct linting for the projects in a pnpm monorepo, otherwise just a single warning shows up at the start of the file with the message inside the preprocessor