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

[eslint] switch toeslint.config.js#3600

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
mdjermanovic wants to merge1 commit intojsx-eslint:master
base:master
Choose a base branch
Loading
frommdjermanovic:eslint-config-js

Conversation

mdjermanovic
Copy link
Contributor

Updates linting for this repo to use ESLint flat config (eslint.config.js).

The goal is to test out flat config on popular ESLint plugins, please seeeslint/eslint#13481 Phase 3: Compatibility testing.

I've verified that:

  • eslint . lints the same 249 files as before + the neweslint.config.js file +.eslint-doc-generatorrc.js
  • Lint results ofeslint . are the same as before (0 errors and the exact same 50 warnings).
  • Calculated configs for files (eslint --print-config) are the same as before except for structural differences between eslintrc and flat config formats, and one change I made for theimport/no-extraneous-dependencies rule.

tkrotoff and silverwind reacted with thumbs up emoji
'**/protractor.conf.*.js',
'**/karma.conf.js',
'**/.eslintrc.js',
'eslint.config.js',
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I addedeslint.config.js to this list to fix'globals' should be listed in the project's dependencies, not devDependencies errors. The rest is just copy-pasted from airbnb.

@@ -1,3 +1,5 @@
'use strict';
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This file wasn't linted before because it's a dotfile.

@@ -57,12 +58,13 @@
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-doc-generator": "^1.4.3",
"eslint-plugin-eslint-plugin": "^2.3.0 || ^3.5.3 || ^4.0.1 || ^5.0.5",
"eslint-plugin-eslint-plugin": "^2.3.0 || ^3.5.3 || ^4.0.1 || ^5.1.0",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Flat config exports thateslint.config.js uses were added in v5.1.0.

Comment on lines +112 to +117
{
files: ['markdown.config.js'],
rules: {
'no-console': 0,
},
},
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This is copy-pasted from.eslintrc, but this file doesn't seem to exist so it probably can be removed.

@mdjermanovic
Copy link
ContributorAuthor

I'm not sure if the failures on CI are related to these changes.

@ljharb
Copy link
Member

I prefer .eslintrc as a format, and will stay with it until I’m absolutely forced not to. I’m happy to keep this PR open, though, to help eslint test.

There are indeed existing failures on master (i asked about them in the discord a month ago or so).

@ljharbljharb marked this pull request as draftJuly 9, 2023 14:40
@jviall

This comment was marked as outdated.

@ljharb

This comment was marked as resolved.

@ebenali
Copy link

eslintrc is no longer searched for

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@mdjermanovic@ljharb@jviall@ebenali

[8]ページ先頭

©2009-2025 Movatter.jp