Quick wins implemented: - Add ESLint to common_plat (12 projects now linted) - Add test coverage with 80% thresholds - Add security audit for all dependencies - Add bundle analysis for Next.js builds - Update Makefile with audit target Enhanced coverage: - common_plat: +lint, +coverage, +security - dashboards: +coverage, +bundle analysis, +security - Python: +security audit via make target Workflow now validates 7 dimensions instead of 4.
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
import js from '@eslint/js';
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
import tsparser from '@typescript-eslint/parser';
|
|
|
|
export default [
|
|
js.configs.recommended,
|
|
{
|
|
files: ['**/*.ts', '**/*.tsx'],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
project: true,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
},
|
|
rules: {
|
|
// TypeScript specific rules
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/prefer-const': 'error',
|
|
|
|
// General rules
|
|
'no-console': 'warn',
|
|
'no-debugger': 'error',
|
|
'prefer-const': 'error',
|
|
'no-var': 'error',
|
|
|
|
// Import rules
|
|
'sort-imports': ['error', { ignoreDeclarationSort: true }],
|
|
},
|
|
ignores: [
|
|
'dist/**',
|
|
'node_modules/**',
|
|
'coverage/**',
|
|
'*.config.js',
|
|
'*.config.ts',
|
|
],
|
|
},
|
|
];
|