Skip to content
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

feat: Eslint config init, based on airbnb-base #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

anlyyao
Copy link

@anlyyao anlyyao commented Apr 28, 2022

  • 抽离eslint时,取的是各个框架的eslint“并集”,规范相应有所增加,因此引用时会存在规则冲突,部分框架通过暂时关闭部分规则解决冲突问题,剩余冲突认为各框架均可相应执行,统一开发规范。
    例no-console规则:'no-console': [ 2, { allow: ['warn', 'error'], }, ],
  • 规则有优先级,注意 extends 中的顺序。

@anlyyao anlyyao changed the title feat: Eslint config init, based on airbnb-base [WIP]: Eslint config init, based on airbnb-base Apr 28, 2022
@anlyyao anlyyao changed the title [WIP]: Eslint config init, based on airbnb-base feat: Eslint config init, based on airbnb-base Apr 28, 2022
Copy link
Contributor

@LeeJim LeeJim left a comment

Choose a reason for hiding this comment

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

.eslintignore,.eslintrc.js,.prettierignore,.prettierrc.js都是没用的吧?

@anlyyao
Copy link
Author

anlyyao commented May 5, 2022

.eslintignore,.eslintrc.js,.prettierignore,.prettierrc.js都是没用的吧?
对外部是无用的 仅仅是为了规范当前项目的代码风格, 于是就保留了~

package.json Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants