-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: group webpack & ignore dist & support yarn1.x #2546
Conversation
.eslintignore
Outdated
.github/** | ||
yarn.lock | ||
demos/** | ||
**/*.json |
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.
Why are you ignoring json files ?
**/*.json |
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.
Then let's just ignore package.json and not all the json files
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.
What is causing this the lint-staged configuration or the eslint configuration?
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.
In my understanding, ESLint is a javascript linter which is used to lint js/ts/jsx. When exec yarn eslint .
, will lint all js files in project. But when ESLint is used with lint-staged, lint-staged will provides it with other types of files, the parser '@babel/eslint-parser' can not work with other types(e.g. json).
And I noticed that jsx was enabled in parserOptions, although I didn't find anywhere have used it.
Thus, I recomand set lint-staged configuration as below
{
"*.{js,jsx}": ["yarn lint:fix", "git add"],
"!*.{js,jsx}": ["prettier --write --ignore-unknown", "git add"]
}
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.
lint staged files:
- js and jsx: lint by ESLint
- json,md,css,scss,html,yml...: format by prettier
@mmorel-35 What do you think?
is this ready to be merged? |
I have handled everything in #2551 , thank you @curly210102 for your great contribution |
📑 Summary
@Yash-Singh1 Ref: #2456
📏 Design Decisions
.webpack
folder, and share base config withwebpack-merge
.dist
directory todemo
directoryyarn dlx
toyarn run
, asdlx
only supported on version 2.x📋 Tasks
Make sure you
develop
branch