-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: use
@vue/create-eslint-config
for ESLint config generation
Airbnb & Standard options are not added yet. The difference with the previous implementation is that we now use `@vue/eslint-config-typescript` instead of `@vue/eslint-config-typescript/recommended`, because I'm not very satisfied with the current implementation of the latter config. There are some edge cases that may confuse users. I need to find time to refactor that package in the coming months.
- Loading branch information
1 parent
2f2b040
commit f4ac339
Showing
5 changed files
with
2,181 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,64 @@ MIT | |
|
||
## Bundled dependencies | ||
|
||
## @vue/create-eslint-config | ||
|
||
License: MIT | ||
By: Haoqun Jiang | ||
Repository: git+https://github.com/vuejs/create-eslint-config.git | ||
|
||
> MIT License | ||
> | ||
> Copyright (c) 2022 vuejs | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in all | ||
> copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
> SOFTWARE. | ||
> | ||
|
||
## javascript-stringify | ||
|
||
License: MIT | ||
By: Blake Embrey | ||
Repository: git+https://github.com/blakeembrey/javascript-stringify.git | ||
|
||
> The MIT License (MIT) | ||
> | ||
> Copyright (c) 2013 Blake Embrey ([email protected]) | ||
> | ||
> Permission is hereby granted, free of charge, to any person obtaining a copy | ||
> of this software and associated documentation files (the "Software"), to deal | ||
> in the Software without restriction, including without limitation the rights | ||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
> copies of the Software, and to permit persons to whom the Software is | ||
> furnished to do so, subject to the following conditions: | ||
> | ||
> The above copyright notice and this permission notice shall be included in | ||
> all copies or substantial portions of the Software. | ||
> | ||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
> THE SOFTWARE. | ||
> | ||
|
||
## kleur | ||
|
||
License: MIT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
f4ac339
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.
@sodatea This really messed with us...
Apparently even with
npm create vue@3
it doesn't seem to grab the latest version consistently which caused us to use the older template on one computer and the newer on the other, friggin npm... not sure how to solve that, perhaps we need to point to a dist-tag? In addition@vue/eslint-config-typescript
seems a bit broken and leavesno-unused-vars
enabled which starts shouting at random stuff e.g. AtdefineEmits<{(e: 'foo', value: string): void}>()
, see vuejs/eslint-config-typescript#14. What's the problem with@vue/eslint-config-typescript/recommended
?f4ac339
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 experience,
npx
seems to cache the version resolution result for hours, or up to 1 day. Dist-tags don't seem to fix that problem. The only reliable fix is to use a full version number, i.e.npm create [email protected]
Similar edge cases, but more subtle. Some rules are silently disabled without the user noticing.
f4ac339
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.
It might be a good idea to open an issue so that
@vue/eslint-config-typescript/recommended
can be improved so that it can become the default again? Well configured ESLint is a huge time saver after all, the more useful rules the better IMHO.f4ac339
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.
Yeah, I plan to open an issue elaborating on the details as soon as I'm back from my parental leave…