Skip to content

Possible breaking change: Exports no longer be recognized as an assignable global in 9.0 #175

@Twipped

Description

@Twipped

Today I bumped my project up to using 9.1 from 8.0.1, and immediately started getting linting errors on my exports declarations. I have my project set to use 'node/exports-style': [ 'error', 'exports', { 'allowBatchAssign': true } ], so that it enforces module.exports = exports = for exports assignment.

After updating the plugin, eslint doesn't seem to recognize exports as an assignable global. I get flags on both no-global-assign and no-implicit-globals for the exports assignment. Reverting back to 8.0.1 removed the flags.

I think this happened with the restructuring of node/recommended, because the new structure explicitly sets globals.exports to 'off' and then to 'readonly', overriding the value that comes from the eslint node environment. I managed to correct it by explicitly turning it back on in my eslintrc file.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions