Skip to content

Commit

Permalink
Merge pull request #2 from WildCodeSchool/Configuration_prettier_eslint
Browse files Browse the repository at this point in the history
Configuration prettier eslint
  • Loading branch information
Jhanemba64 authored Feb 12, 2025
2 parents e562a9c + cc29ee5 commit 9a41c46
Show file tree
Hide file tree
Showing 20 changed files with 6,958 additions and 5,365 deletions.
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"vueIndentScriptAndStyle": true,
"endOfLine": "lf",
"arrowParens": "always"
}
25 changes: 25 additions & 0 deletions backend/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import pluginTs from '@typescript-eslint/eslint-plugin';
import parserTs from '@typescript-eslint/parser';
import globals from 'globals';

export default [
{
ignores: ['dist', 'node_modules'], // Ignore les dossiers de build et node_modules
},
{
files: ['**/*.ts'], // Lint uniquement les fichiers TypeScript
languageOptions: {
ecmaVersion: 2020,
sourceType: 'module',
globals: globals.node, // Ajoute les globals Node.js (comme process, __dirname)
parser: parserTs, // Utilise le parser TypeScript
},
plugins: {
'@typescript-eslint': pluginTs, // Charge le plugin TypeScript
},
rules: {
'@typescript-eslint/no-unused-vars': ['warn'], // Alerte pour les variables inutilisées
'@typescript-eslint/explicit-function-return-type': 'off', // Pas besoin de typer explicitement les retours de fonction
},
},
];
Loading

0 comments on commit 9a41c46

Please sign in to comment.