Skip to content

[feature] Angular-eslint for Taiga-UI #163

Open
splincode opened this issue Dec 15, 2021 · 0 comments
Open

[feature] Angular-eslint for Taiga-UI #163

splincode opened this issue Dec 15, 2021 · 0 comments

Comments

@splincode
Copy link
Contributor

module.exports = {
    overrides: [
        {
            files: ['*.ts'],
            plugins: ['@angular-eslint/eslint-plugin'],
            rules: {
                '@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-conflicting-lifecycle': 'error',
                '@angular-eslint/no-empty-lifecycle-method': 'error',
                '@angular-eslint/no-output-native': 'error',
                '@angular-eslint/no-output-on-prefix': '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/use-lifecycle-interface': 'error',
                '@angular-eslint/use-pipe-transform-interface': 'error',
                // off
                '@angular-eslint/no-forward-ref': 'off',
                '@angular-eslint/no-pipe-impure': 'off',
                '@angular-eslint/no-lifecycle-call': 'off',
                '@angular-eslint/no-host-metadata-property': 'off',
                '@angular-eslint/sort-ngmodule-metadata-arrays': 'off',
                '@angular-eslint/use-injectable-provided-in': 'off',
                '@angular-eslint/no-output-rename': 'off',
                '@angular-eslint/use-component-view-encapsulation': 'off',
                '@angular-eslint/no-attribute-decorator': 'off',
                '@angular-eslint/no-input-prefix': 'off',
                '@angular-eslint/no-input-rename': 'off',
                '@angular-eslint/no-inputs-metadata-property': 'off',
                '@angular-eslint/no-outputs-metadata-property': 'off',
                '@angular-eslint/component-class-suffix': 'off',
                '@angular-eslint/use-component-selector': 'off',
                '@angular-eslint/prefer-on-push-component-change-detection': 'off',
                '@angular-eslint/component-max-inline-declarations': 'off',
            },
        },
        {
            files: ['*.html'],
            parser: '@angular-eslint/template-parser',
            plugins: ['html', '@angular-eslint/template'],
            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-label-for': 'error',
                '@angular-eslint/template/accessibility-label-has-associated-control':
                    'error',
                '@angular-eslint/template/accessibility-table-scope': 'error',
                '@angular-eslint/template/accessibility-valid-aria': 'error',
                '@angular-eslint/template/banana-in-box': 'error',
                '@angular-eslint/template/eqeqeq': 'error',
                '@angular-eslint/template/mouse-events-have-key-events': 'error',
                '@angular-eslint/template/no-autofocus': 'error',
                '@angular-eslint/template/no-call-expression': 'error',
                '@angular-eslint/template/no-distracting-elements': 'error',
                '@angular-eslint/template/no-duplicate-attributes': 'error',
                '@angular-eslint/template/no-negated-async': 'error',
                '@angular-eslint/template/no-positive-tabindex': 'error',
                '@angular-eslint/template/no-any': 'error',
                // off
                '@angular-eslint/template/use-track-by-function': 'error',
                '@angular-eslint/template/click-events-have-key-events': 'off',
                '@angular-eslint/template/conditional-complexity': 'off',
                '@angular-eslint/template/cyclomatic-complexity': 'off',
                '@angular-eslint/template/i18n': 'off',
                'max-len': 'off', // use prettier
            },
        },
    ],
};
@splincode splincode mentioned this issue Sep 21, 2022
11 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant