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

🔧 Setup lint #3165

Open
wants to merge 8 commits into
base: v2-bridge
Choose a base branch
from
Open

🔧 Setup lint #3165

wants to merge 8 commits into from

Conversation

deraw
Copy link
Member

@deraw deraw commented Oct 9, 2023

  • Setup des plugins (markdown, javascript, jsdoc, unicorn, vue, yaml, case-police)
  • Configs des plugins (typescript, markdown, javascript, jsdoc, unicorn, vue, yaml, case-police)
  • tests (pas besoin car typé fortement et pas de configuration)
  • Config VS Code
  • stylelint
  • cspell (doit être configuré par projet, non inclut dans le package)
  • git hooks

@deraw deraw force-pushed the bridge/lint branch 9 times, most recently from 397283b to 62e25da Compare October 11, 2023 21:48
@deraw deraw force-pushed the bridge/lint branch 5 times, most recently from 65bcf1f to 3b722dd Compare October 19, 2023 18:09
"peerDependencies": {
"eslint": ">=8.0.0"
},
"dependencies": {
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oui complètement !

Comment on lines +33 to +34
'antfu/import-dedupe': 'error',
'antfu/no-import-node-modules-by-path': 'error',
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Contributor

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?

Copy link
Member Author

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'
Copy link
Contributor

Choose a reason for hiding this comment

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

A quoi sert unicorn?

Copy link
Member Author

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"

Copy link
Contributor

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

Copy link
Member Author

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'
Copy link
Contributor

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?

Copy link
Member Author

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

@VachetVirginie
Copy link
Contributor

Pour les hooks tu pensais a quoi en plus de Husky? lint-staged?

@4dr1en 4dr1en marked this pull request as ready for review March 25, 2024 10:54
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.

Configuration de VS Code Configuration du lint
3 participants