Skip to content
Snippets Groups Projects
.eslintrc.json 4.31 KiB
Newer Older
  • Learn to ignore specific revisions
  • Bastien DUMONT's avatar
    Bastien DUMONT committed
    {
      "root": true,
    
      "ignorePatterns": ["projects/**/*"],
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
      "overrides": [
        {
    
          "files": ["*.ts"],
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
          "parserOptions": {
    
            "project": ["tsconfig.json"],
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
            "createDefaultProgram": true
          },
    
          "extends": ["plugin:@angular-eslint/recommended", "plugin:@angular-eslint/template/process-inline-templates"],
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
          "rules": {
            "@angular-eslint/directive-selector": [
              "error",
              {
                "type": "attribute",
                "prefix": "app",
                "style": "camelCase"
              }
            ],
            "@angular-eslint/component-selector": [
              "error",
              {
                "type": "element",
                "prefix": "app",
                "style": "kebab-case"
              }
            ]
          }
        },
        {
    
          "files": ["*.html"],
          "extends": ["plugin:@angular-eslint/template/recommended"],
          "rules": {
            "@angular-eslint/template/accessibility-alt-text": "error",
            "@angular-eslint/template/accessibility-elements-content": "error",
    
            "@angular-eslint/template/accessibility-interactive-supports-focus": "error",
    
            "@angular-eslint/template/accessibility-label-has-associated-control": "error",
    
            "@angular-eslint/template/accessibility-role-has-required-aria": "error",
    
            "@angular-eslint/template/accessibility-table-scope": "error",
    
            "@angular-eslint/template/accessibility-valid-aria": "error",
            "@angular-eslint/template/attributes-order": "warn",
    
            "@angular-eslint/template/banana-in-box": "error",
    
            "@angular-eslint/template/button-has-type": "error",
    
            "@angular-eslint/template/click-events-have-key-events": "error",
    
            "@angular-eslint/template/conditional-complexity": "warn",
            "@angular-eslint/template/cyclomatic-complexity": "off",
            "@angular-eslint/template/eqeqeq": "error",
    
            "@angular-eslint/template/mouse-events-have-key-events": "error",
    
            "@angular-eslint/template/no-any": "error",
    
            "@angular-eslint/template/no-autofocus": "error",
    
            "@angular-eslint/template/no-call-expression": "off",
            "@angular-eslint/template/no-distracting-elements": "error",
            "@angular-eslint/template/no-duplicate-attributes": "error",
            "@angular-eslint/template/no-inline-styles": "off",
            "@angular-eslint/template/no-interpolation-in-attributes": "off",
            "@angular-eslint/template/no-negated-async": "error",
            "@angular-eslint/template/no-positive-tabindex": "error",
            "@angular-eslint/template/use-track-by-function": "off",
    
            "@angular-eslint/component-class-suffix": "error",
            "@angular-eslint/component-max-inline-declarations": "error",
            "@angular-eslint/component-selector": "error",
            "@angular-eslint/contextual-decorator": "error",
            "@angular-eslint/contextual-lifecycle": "error",
            "@angular-eslint/directive-class-suffix": "error",
            "@angular-eslint/directive-selector": "error",
            "@angular-eslint/no-attribute-decorator": "error",
            "@angular-eslint/no-conflicting-lifecycle": "error",
            "@angular-eslint/no-empty-lifecycle-method": "error",
            "@angular-eslint/no-forward-ref": "error",
            "@angular-eslint/no-host-metadata-property": "error",
            "@angular-eslint/no-input-prefix": "error",
            "@angular-eslint/no-input-rename": "error",
            "@angular-eslint/no-inputs-metadata-property": "error",
            "@angular-eslint/no-lifecycle-call": "error",
            "@angular-eslint/no-output-native": "error",
            "@angular-eslint/no-output-on-prefix": "error",
            "@angular-eslint/no-output-rename": "error",
            "@angular-eslint/no-outputs-metadata-property": "error",
            "@angular-eslint/no-pipe-impure": "error",
            "@angular-eslint/no-queries-metadata-property": "error",
            "@angular-eslint/pipe-prefix": "error",
            "@angular-eslint/prefer-on-push-component-change-detection": "error",
            "@angular-eslint/prefer-output-readonly": "error",
            "@angular-eslint/relative-url-prefix": "error",
            "@angular-eslint/sort-ngmodule-metadata-arrays": "error",
            "@angular-eslint/use-component-selector": "error",
            "@angular-eslint/use-component-view-encapsulation": "error",
            "@angular-eslint/use-injectable-provided-in": "error",
            "@angular-eslint/use-lifecycle-interface": "error"