up
This commit is contained in:
66
eslint.config.js
Normal file
66
eslint.config.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import js from '@eslint/js';
|
||||
import tsparser from '@typescript-eslint/parser';
|
||||
import tsplugin from '@typescript-eslint/eslint-plugin';
|
||||
import globals from 'globals';
|
||||
|
||||
export default [
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['**/*.ts'],
|
||||
languageOptions: {
|
||||
parser: tsparser,
|
||||
parserOptions: {
|
||||
ecmaVersion: 6,
|
||||
sourceType: 'module',
|
||||
},
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
...globals.mocha,
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
'@typescript-eslint': tsplugin,
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/naming-convention': [
|
||||
'warn',
|
||||
{
|
||||
selector: 'import',
|
||||
format: ['camelCase', 'PascalCase'],
|
||||
},
|
||||
],
|
||||
'curly': 'warn',
|
||||
'eqeqeq': 'warn',
|
||||
'no-throw-literal': 'warn',
|
||||
'semi': 'off',
|
||||
// Règles générales réutilisées de flatbay
|
||||
'prefer-const': ['error', { destructuring: 'all' }],
|
||||
'no-var': 'error',
|
||||
'object-shorthand': ['error', 'properties'],
|
||||
'prefer-template': 'error',
|
||||
'dot-notation': 'error',
|
||||
'no-unused-expressions': 'error',
|
||||
'no-nested-ternary': 'error',
|
||||
'one-var-declaration-per-line': ['error', 'always'],
|
||||
'one-var': ['error', 'never'],
|
||||
'vars-on-top': 'error',
|
||||
'yoda': 'error',
|
||||
'prefer-arrow-callback': 'error',
|
||||
'no-implicit-globals': 'error',
|
||||
'no-labels': 'error',
|
||||
'no-new-func': 'error',
|
||||
'no-script-url': 'error',
|
||||
'no-sequences': 'error',
|
||||
'no-unused-labels': 'error',
|
||||
'prefer-spread': 'error',
|
||||
'no-console': 0, // Garder les console.log pour debug
|
||||
'no-empty': 0,
|
||||
'no-redeclare': 0,
|
||||
'no-useless-escape': 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
ignores: ['out/', 'dist/', '**/*.d.ts'],
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user