43 lines
979 B
JavaScript
43 lines
979 B
JavaScript
export default [
|
|
{
|
|
// Basic settings
|
|
files: ['**/*.js', '**/*.ts'],
|
|
ignores: ['dist/**', 'node_modules/**'],
|
|
languageOptions: {
|
|
ecmaVersion: 2025,
|
|
sourceType: 'module',
|
|
},
|
|
|
|
// Core rules
|
|
rules: {
|
|
'no-unused-vars': 'error',
|
|
'no-undef': 'error',
|
|
'no-console': 'warn',
|
|
|
|
'node/no-deprecated-api': 'error',
|
|
'node/no-missing-import': 'error',
|
|
'performance/no-costly-loop': 'warn',
|
|
'promise/prefer-await-to-then': 'error',
|
|
'security/detect-eval-with-expression': 'error',
|
|
'security/detect-non-literal-fs-filename': 'error',
|
|
'security/detect-non-literal-regexp': 'error',
|
|
'security/detect-object-injection': 'warn',
|
|
'security/detect-possible-timing-attacks': 'warn',
|
|
},
|
|
|
|
// Use recommended presets
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:node/recommended',
|
|
'plugin:security/recommended',
|
|
],
|
|
},
|
|
{
|
|
files: ['**/*.js', '**/*.ts'],
|
|
plugins: ['prettier'],
|
|
rules: {
|
|
'prettier/prettier': 'error',
|
|
},
|
|
},
|
|
];
|