Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
aladdin-add wants to merge1 commit intoairbnb:master
base:master
Choose a base branch
Loading
fromaladdin-add:patch-2

Conversation

aladdin-add
Copy link
Contributor

@aladdin-addaladdin-add commentedApr 10, 2024
edited
Loading

The following code is often used when using@eslint/eslintrc witheslint-config-airbnb-base:

// mimic CommonJS variables -- not needed if using CommonJSconst__filename=fileURLToPath(import.meta.url);const__dirname=path.dirname(__filename);constcompat=newFlatCompat({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.

SamyMEDDAD, Aapaza9973, and Pyaepyae-art reacted with heart emoji
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.
@aladdin-add
Copy link
ContributorAuthor

related:eslint/create-config#51

].map(require.resolve),
parserOptions:{
ecmaVersion:2018,
ecmaVersion:'latest',
Copy link
Collaborator

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.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

seems it's no longer actively maintained - the last version was released ~4 years ago.
image

Copy link
Collaborator

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 :-/

@ljharbljharb marked this pull request as draftAugust 23, 2024 17:49
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ljharbljharbljharb requested changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@aladdin-add@ljharb

[8]ページ先頭

©2009-2025 Movatter.jp