Skip to content
Snippets Groups Projects
.eslintrc.js 5.96 KiB
Newer Older
  • Learn to ignore specific revisions
  • /*
    👋 Hi! This file was autogenerated by tslint-to-eslint-config.
    https://github.com/typescript-eslint/tslint-to-eslint-config
    
    It represents the closest reasonable ESLint configuration to this
    project's original TSLint configuration.
    
    We recommend eventually switching this configuration to extend from
    the recommended rulesets in typescript-eslint. 
    https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md
    
    Happy linting! 💖
    */
    module.exports = {
        "env": {
            "browser": true,
            "es6": true
        },
        "extends": [
            "prettier",
        ],
        "parser": "@typescript-eslint/parser",
        "parserOptions": {
            "project": `./src/frontend/core/tsconfig.app.json`,
            "sourceType": "module"
        },
        "plugins": [
            "eslint-plugin-import",
            "@angular-eslint/eslint-plugin",
            "@typescript-eslint",
            "@typescript-eslint/tslint"
        ],
        "rules": {
            "@angular-eslint/component-class-suffix": "error",
            "@angular-eslint/component-selector": [
                "error",
                {
                    "type": "element",
                    "prefix": "app",
                    "style": "kebab-case"
                }
            ],
            "@angular-eslint/directive-class-suffix": "error",
            "@angular-eslint/directive-selector": [
                "error",
                {
                    "type": "attribute",
                    "prefix": "app",
                    "style": "camelCase"
                }
            ],
            "@angular-eslint/no-host-metadata-property": "error",
            "@angular-eslint/no-input-rename": "error",
            "@angular-eslint/no-inputs-metadata-property": "error",
            "@angular-eslint/no-output-on-prefix": "error",
            "@angular-eslint/no-output-rename": "error",
            "@angular-eslint/no-outputs-metadata-property": "error",
            "@angular-eslint/use-lifecycle-interface": "error",
            "@angular-eslint/use-pipe-transform-interface": "off",
            "@typescript-eslint/consistent-type-definitions": "error",
            "@typescript-eslint/dot-notation": "off",
            "@typescript-eslint/explicit-member-accessibility": [
                "off",
                {
                    "accessibility": "explicit"
                }
            ],
            "@typescript-eslint/indent": "error",
            "@typescript-eslint/member-delimiter-style": [
                "error",
                {
                    "multiline": {
                        "delimiter": "semi",
                        "requireLast": true
                    },
                    "singleline": {
                        "delimiter": "semi",
                        "requireLast": false
                    }
                }
            ],
            "@typescript-eslint/member-ordering": "error",
            "@typescript-eslint/naming-convention": "warn",
            "@typescript-eslint/no-empty-function": "off",
            "@typescript-eslint/no-empty-interface": "error",
            "@typescript-eslint/no-inferrable-types": [
                "off",
                {
                    "ignoreParameters": true
                }
            ],
            "@typescript-eslint/no-misused-new": "error",
            "@typescript-eslint/no-non-null-assertion": "error",
            "@typescript-eslint/no-shadow": [
                "error",
                {
                    "hoist": "all"
                }
            ],
            "@typescript-eslint/no-unused-expressions": "error",
            "@typescript-eslint/prefer-function-type": "error",
            "@typescript-eslint/quotes": [
                "error",
                "single"
            ],
            "@typescript-eslint/semi": [
                "error",
                "always"
            ],
            "@typescript-eslint/type-annotation-spacing": "error",
            "@typescript-eslint/unified-signatures": "error",
            "arrow-body-style": "error",
            "brace-style": [
                "error",
                "1tbs"
            ],
            "constructor-super": "error",
            "curly": "error",
            "eol-last": "error",
            "eqeqeq": [
                "warn",
                "smart"
            ],
            "guard-for-in": "error",
            "id-blacklist": "off",
            "id-match": "off",
            "import/no-deprecated": "warn",
            "no-bitwise": "error",
            "no-caller": "error",
            "no-console": [
                "error",
                {
                    "allow": [
                        "log",
                        "warn",
                        "dir",
                        "timeLog",
                        "assert",
                        "clear",
                        "count",
                        "countReset",
                        "group",
                        "groupEnd",
                        "table",
                        "debug",
                        "dirxml",
                        "error",
                        "groupCollapsed",
                        "Console",
                        "profile",
                        "profileEnd",
                        "timeStamp",
                        "context"
                    ]
                }
            ],
            "no-debugger": "error",
            "no-empty": "off",
            "no-eval": "error",
            "no-fallthrough": "error",
            "no-new-wrappers": "error",
            "no-restricted-imports": [
                "error",
                "rxjs/Rx"
            ],
            "no-throw-literal": "error",
            "no-trailing-spaces": "error",
            "no-undef-init": "error",
            "no-underscore-dangle": "off",
            "no-unused-labels": "error",
            "no-var": "error",
            "prefer-const": "error",
            "radix": "error",
            "spaced-comment": [
                "error",
                "always",
                {
                    "markers": [
                        "/"
                    ]
                }
            ],
            "@typescript-eslint/tslint/config": [
                "error",
                {
                    "rules": {
                        "import-spacing": true,
                        "whitespace": [
                            true,
                            "check-branch",
                            "check-decl",
                            "check-operator",
                            "check-separator",
                            "check-type"
                        ]
                    }
                }
            ]
        }
    };