|
| 1 | +const { FlatCompat } = require('@eslint/eslintrc'); |
| 2 | +const js = require('@eslint/js'); |
| 3 | +const baseConfig = require('../../eslint.config.js'); |
| 4 | + |
| 5 | +const compat = new FlatCompat({ |
| 6 | + baseDirectory: __dirname, |
| 7 | + recommendedConfig: js.configs.recommended, |
| 8 | +}); |
| 9 | + |
| 10 | +module.exports = [ |
| 11 | + ...baseConfig, |
| 12 | + ...compat |
| 13 | + .config({ |
| 14 | + extends: ['plugin:@nx/angular', 'plugin:@angular-eslint/template/process-inline-templates'], |
| 15 | + }) |
| 16 | + .map((config) => ({ |
| 17 | + ...config, |
| 18 | + files: ['**/*.ts'], |
| 19 | + files: ['**/*.ts'], |
| 20 | + rules: { |
| 21 | + '@angular-eslint/directive-selector': 'off', |
| 22 | + '@angular-eslint/component-selector': 'off', |
| 23 | + '@angular-eslint/component-class-suffix': 'off', |
| 24 | + '@angular-eslint/directive-class-suffix': 'off', |
| 25 | + '@angular-eslint/no-input-rename': 'off', |
| 26 | + '@typescript-eslint/no-explicit-any': 'off', |
| 27 | + '@typescript-eslint/no-empty-function': 'off', |
| 28 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 29 | + '@typescript-eslint/ban-types': 'off', |
| 30 | + '@typescript-eslint/no-empty-interface': 'off', |
| 31 | + '@typescript-eslint/no-unused-vars': [ |
| 32 | + 'warn', |
| 33 | + { |
| 34 | + argsIgnorePattern: '^_', |
| 35 | + varsIgnorePattern: '^_', |
| 36 | + }, |
| 37 | + ], |
| 38 | + }, |
| 39 | + })), |
| 40 | + { |
| 41 | + files: ['**/*.spec.ts'], |
| 42 | + rules: { |
| 43 | + '@nx/enforce-module-boundaries': 'off', |
| 44 | + }, |
| 45 | + }, |
| 46 | + { |
| 47 | + files: ['web-gl-rendering-context.ts'], |
| 48 | + rules: { |
| 49 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 50 | + }, |
| 51 | + }, |
| 52 | + ...compat |
| 53 | + .config({ |
| 54 | + extends: ['plugin:@nx/angular-template'], |
| 55 | + }) |
| 56 | + .map((config) => ({ |
| 57 | + ...config, |
| 58 | + files: ['**/*.html'], |
| 59 | + rules: { |
| 60 | + ...config.rules, |
| 61 | + }, |
| 62 | + })), |
| 63 | + { |
| 64 | + files: ['**/*.json'], |
| 65 | + rules: { |
| 66 | + '@nx/dependency-checks': ['error'], |
| 67 | + }, |
| 68 | + languageOptions: { |
| 69 | + parser: require('jsonc-eslint-parser'), |
| 70 | + }, |
| 71 | + }, |
| 72 | + { |
| 73 | + files: ['**/*.ts'], |
| 74 | + rules: { |
| 75 | + '@angular-eslint/prefer-standalone': 'off', |
| 76 | + }, |
| 77 | + }, |
| 78 | +]; |
0 commit comments