lundi 13 septembre 2021

ember-cli-eslint - Unexpected top level property overrides[0].extends

I am having an issue with eslint (using ember-cli-eslint ver 5.1.0) and an extends property in my override in my .eslintrc file. My .eslintrc looks like this:

module.exports = {
    root: true,
    parser: 'babel-eslint',
    parserOptions: {
        ecmaVersion: 2018,
        sourceType: 'module',
        ecmaFeatures: {
            legacyDecorators: true
        }
    },
    plugins: [ 'ember' ],
    extends: [
        'eslint:recommended'
    ],
    env: {
        browser: true
    },
    overrides: [
        {
            files: [
                '.eslintrc.js',
                'ember-cli-build.js',
                'testem.js',
                'blueprints/*/index.js',
                'config/**/*.js',
                'lib/*/index.js'
            ],
            extends: [
                'plugin:my-plugin
            ]
        }
    ]
};

However when I build I get the following error:

ESLint configuration in path-to\my-app\.eslintrc.js is invalid:
        - Unexpected top-level property "overrides[0].extends".

I have another ember project with the same version of ember-cli-eslint and a very similar eslintrc file that uses the same extends property in overrides without issue. I have compared configurations between the two projects over and over and cannot figure out what is causing this. Doing research the most I could find is an issue that caused this error incorrectly on older versions of ember-cli-eslint, but that should be fixed in my version.

Am I missing a different configuration to allow extends properties in overrides?




Aucun commentaire:

Enregistrer un commentaire