|
| 1 | +import angularEslintPlugin from "@angular-eslint/eslint-plugin"; |
| 2 | +import angularEslintPluginTemplate from "@angular-eslint/eslint-plugin-template"; |
| 3 | +import angularEslintTemplateParser from "@angular-eslint/template-parser"; |
| 4 | +import js from "@eslint/js"; |
| 5 | +import prettier from "eslint-config-prettier"; |
| 6 | +import deprecation from "eslint-plugin-deprecation"; |
| 7 | +import globals from "globals"; |
| 8 | +import tseslint from "typescript-eslint"; |
| 9 | + |
| 10 | +export default [ |
| 11 | + js.configs.recommended, |
| 12 | + { ignores: ["dist/", ".angular/", "**/*.js"] }, |
| 13 | + { |
| 14 | + files: ["**/*.ts"], |
| 15 | + languageOptions: { |
| 16 | + parser: tseslint.parser, |
| 17 | + parserOptions: { |
| 18 | + project: [ |
| 19 | + "./projects/angular-ecmascript-intl/tsconfig.lib.json", |
| 20 | + "./projects/angular-ecmascript-intl/tsconfig.spec.json", |
| 21 | + "./projects/angular-intl-demo/tsconfig.app.json", |
| 22 | + ], |
| 23 | + }, |
| 24 | + globals: { |
| 25 | + ...globals.browser, |
| 26 | + }, |
| 27 | + }, |
| 28 | + plugins: { |
| 29 | + "@typescript-eslint": tseslint.plugin, |
| 30 | + deprecation, |
| 31 | + "@angular-eslint": angularEslintPlugin, |
| 32 | + }, |
| 33 | + processor: angularEslintPluginTemplate.processors["extract-inline-html"], |
| 34 | + rules: { |
| 35 | + ...tseslint.configs.strictTypeChecked.rules, |
| 36 | + ...tseslint.configs.stylisticTypeChecked.rules, |
| 37 | + ...angularEslintPlugin.configs.recommended.rules, |
| 38 | + "@typescript-eslint/no-extraneous-class": "off", |
| 39 | + "no-unused-vars": "off", |
| 40 | + "@typescript-eslint/no-unused-vars": "error", |
| 41 | + "@typescript-eslint/prefer-literal-enum-member": "off", |
| 42 | + "deprecation/deprecation": "error", |
| 43 | + "@angular-eslint/prefer-standalone-component": "error", |
| 44 | + }, |
| 45 | + }, |
| 46 | + { |
| 47 | + files: ["**/*.spec.ts"], |
| 48 | + languageOptions: { |
| 49 | + globals: { |
| 50 | + ...globals.jasmine, |
| 51 | + }, |
| 52 | + }, |
| 53 | + }, |
| 54 | + { |
| 55 | + files: ["**/*.html"], |
| 56 | + plugins: { |
| 57 | + "@angular-eslint/template": angularEslintPluginTemplate, |
| 58 | + }, |
| 59 | + languageOptions: { |
| 60 | + parser: angularEslintTemplateParser, |
| 61 | + }, |
| 62 | + rules: { |
| 63 | + ...angularEslintPluginTemplate.configs.recommended.rules, |
| 64 | + "@angular-eslint/template/prefer-control-flow": "error", |
| 65 | + }, |
| 66 | + }, |
| 67 | + prettier, |
| 68 | +]; |
0 commit comments