- Notifications
You must be signed in to change notification settings - Fork26.8k
feat!: use ecmaVersion latest#2965
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
The following code is often used when using @eslint/eslintrc with `eslint-config-airbnb-base`:```js// mimic CommonJS variables -- not needed if using CommonJSconst __filename = fileURLToPath(import.meta.url);const __dirname = path.dirname(__filename);const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended});```However, `import.meta` is not supported in ecmaVersion: '2018'. This change allows users to be able to use it that way.
related:eslint/create-config#51 |
].map(require.resolve), | ||
parserOptions:{ | ||
ecmaVersion:2018, | ||
ecmaVersion:'latest', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
this is a change we can't make unless babel-preset-airbnb is handling it by default. unfortunately i no longer maintain it, so I'm not familiar with what the latest version supports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
accurate. but this is airbnb's eslint config, so my hands are kind of tied :-/
Uh oh!
There was an error while loading.Please reload this page.
The following code is often used when using
@eslint/eslintrc
witheslint-config-airbnb-base
:However,
import.meta
is not supported in ecmaVersion: '2018'. This change allows users to be able to use it that way.