babel / babel-eslint

:tokyo_tower: A wrapper for Babel's parser used for ESLint (renamed to @babel/eslint-parser)

Home Page:https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do we tell babel-eslint to allow export after @decos?

trusktr opened this issue · comments

I have a project using Prettier, and Prettier puts the exports after @decos.

How can I tell babel-eslint to allow export after decos?


I just installed babel-eslint today.

My babelrc looks like this:

module.exports = {
	extends: ['prettier'],
	parser: 'babel-eslint',
	parserOptions: {
		ecmaFeatures: {
			legacyDecotators: true,
		},
	},
}

You've got a typo in your config: legacyDecotators => legacyDecorators. Aside from that, using this config fixed the problem for me.

Thank you for the issue. Now that @babel/eslint-parser has been released, we are making this repository read-only. If this is a change you would still like to advocate for, please reopen this in the babel/babel monorepo.