Skip to content

Commit

Permalink
Optimization/eslint migration (#38)
Browse files Browse the repository at this point in the history
* update eslint config

* remove unused files

* lint code

* update linter setup

* update example
  • Loading branch information
tiavina-mika authored Oct 12, 2024
1 parent ede4fee commit bfd459c
Show file tree
Hide file tree
Showing 24 changed files with 2,011 additions and 1,436 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{ts,tsx}": "eslint --fix"
}
78 changes: 53 additions & 25 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,59 @@
{
// only use words from .cspell.json
"cSpell.userWords": [],
"cSpell.enabled": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"// editor": "-------------------------------------",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.insertSpaces": true,
"files.exclude": {
"**/node_modules/**": true,
"htmlcov/": true,
".coverage": true,
"coverage.xml": true,
"**/.eslintcache": true,
"yarn-error.log": true
"editor.tabSize": 2,
"eslint.format.enable": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
},
"// files": "-------------------------------------",
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true,
"files.insertFinalNewline": true,
"[json]": {
"editor.tabSize": 2
},
"[typescript][typescriptreact][javascript][javascriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.tabSize": 2
},
"eslint.workingDirectories": [{ "mode": "auto" }],
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"files.associations": {
"*.ignore": "plaintext",
"*.txt": "plaintext",
"*.tsx": "typescriptreact", // Associe .tsx à TypeScript pour React
"*.ts": "typescript"
},
"files.exclude": {
"**/*.js": {
"when": "$(basename).ts"
} // Cache les fichiers .js générés si vous utilisez TypeScript
},
"// typescript": "-------------------------------------",
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"typescript.validate.enable": true,
"// eslint": "-------------------------------------",
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"markdown",
"json",
"jsonc",
"yaml"
],
"prettier.enable": true,
"typescript.tsserver.allowLocalPluginLoads": true,
"typescript.tsserver.pluginPaths": ["./"]
}
112 changes: 0 additions & 112 deletions airbnb.mjs

This file was deleted.

Loading

0 comments on commit bfd459c

Please sign in to comment.