-
Notifications
You must be signed in to change notification settings - Fork 12
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
🔧 Setup lint #3165
base: v2-bridge
Are you sure you want to change the base?
🔧 Setup lint #3165
Conversation
397283b
to
62e25da
Compare
65bcf1f
to
3b722dd
Compare
"peerDependencies": { | ||
"eslint": ">=8.0.0" | ||
}, | ||
"dependencies": { |
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.
Est ce qu'ici on pourrait ajouter le linter pour l'accessibilite?
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.
Oui complètement !
'antfu/import-dedupe': 'error', | ||
'antfu/no-import-node-modules-by-path': 'error', |
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.
antfu c'est plutot les erreurs et les mauvaises pratiques dans le code?
et est ce qu'on peut ajouter Prettier pour le formatage?
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.
AntFu c'est un des membres de plusieurs core team dont Vue et Nuxt qui a mis a créé des plugins pour ESLint pour répondre à certains besoins
Et pour Prettier, j'aime bien son avis https://antfu.me/posts/why-not-prettier, surtout qu'il existe maintenant https://eslint.style/ qui est dédié au formatage du code
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.
Merci! Je ne connaissais pas du tout ESLint Stylistic
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.
As tu des sources comme l'article que tu a envoye qui t'ont guides pour cette config ou c'est plus l'xp qui a parlee?
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.
Oui il y a notamment son repo de config https://github.com/antfu/eslint-config, et celui-ci https://github.com/sxzz/eslint-config
@@ -0,0 +1,13 @@ | |||
import { type FlatESLintConfigItem } from 'eslint-define-config' |
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.
A quoi sert unicorn?
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.
C'est un plugin https://github.com/sindresorhus/eslint-plugin-unicorn qui ajoute plein de règles assez puissantes
@@ -0,0 +1,5 @@ | |||
#!/usr/bin/env sh | |||
. "$(dirname -- "$0")/_/husky.sh" | |||
|
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.
est ce qu'on pourrait pas rajouter pnpm lint
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.
Oui complètement, j'essayais déjà de faire fonctionner les hooks correctement
@@ -0,0 +1,69 @@ | |||
import { type FlatESLintConfigItem } from 'eslint-define-config' |
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.
c'est pour avoir des données JSON avec des commentaires c'est bien ca?
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.
JSONC oui c'est bien ça
Pour les hooks tu pensais a quoi en plus de Husky? lint-staged? |
markdown,javascript,jsdoc,unicorn,vue,yaml,case-police)jsdoc, unicorn, vue,yaml,case-police)tests(pas besoin car typé fortement et pas de configuration)