Skip to content
Snippets Groups Projects
Commit 303c9465 authored by Lukáš Kratochvíl's avatar Lukáš Kratochvíl
Browse files

feat: added TypeScript rules to .eslintrc

parent 0b5f4b99
No related branches found
No related tags found
No related merge requests found
...@@ -17,42 +17,62 @@ module.exports = { ...@@ -17,42 +17,62 @@ module.exports = {
}, },
ignorePatterns: ['.eslintrc.js'], ignorePatterns: ['.eslintrc.js'],
rules: { rules: {
'@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/interface-name-prefix': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': ['error'],
'@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/prefer-nullish-coalescing': ['error'],
'@typescript-eslint/restrict-plus-operands': ['error'],
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/brace-style': ['error', '1tbs'],
'@typescript-eslint/comma-spacing': ['error', { 'before': false, 'after': true }],
'@typescript-eslint/default-param-last': ['error'],
'@typescript-eslint/dot-notation': ['error'],
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/keyword-spacing': ['error', { 'before': true, 'after': true }],
'@typescript-eslint/no-empty-function': ['error'],
'@typescript-eslint/no-extra-parens': ['error'],
'@typescript-eslint/no-extra-semi': ['error'],
'@typescript-eslint/no-magic-numbers': ['error'],
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-unused-expressions': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/quotes': ['error', 'single'],
'@typescript-eslint/require-await': ['error'],
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/space-before-blocks': ['error'],
'no-unreachable': 'error', 'no-unreachable': 'error',
'no-unused-vars': 'error', 'no-unused-vars': 'off',
'camelcase': 'error', 'camelcase': 'error',
'default-param-last': ['error'], 'default-param-last': 'off',
'dot-notation': 'error', 'dot-notation': 'off',
'eqeqeq': 'error', 'eqeqeq': 'error',
'no-confusing-arrow': 'error', 'no-confusing-arrow': 'error',
'no-else-return': 'error', 'no-else-return': 'error',
'no-empty': 'error', 'no-empty': 'error',
'no-empty-function': 'error', 'no-empty-function': 'off',
'no-extra-semi': 'error', 'no-extra-semi': 'off',
'no-lonely-if': 'error', 'no-lonely-if': 'error',
'no-magic-numbers': 'error', 'no-magic-numbers': 'off',
'no-mixed-operators': 'error', 'no-mixed-operators': 'error',
'no-multi-assign': 'error', 'no-multi-assign': 'error',
'no-negated-condition': 'error', 'no-negated-condition': 'error',
'no-nested-ternary': 'error', 'no-nested-ternary': 'error',
'no-param-reassign': 'error', 'no-param-reassign': 'error',
'no-shadow': 'error', 'no-shadow': 'off',
'no-shadow-restricted-names': 'error', 'no-shadow-restricted-names': 'error',
'no-throw-literal': 'error', 'no-throw-literal': 'error',
'no-unneeded-ternary': 'error', 'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error', 'no-unused-expressions': 'off',
'no-useless-rename': 'error', 'no-useless-rename': 'error',
'no-useless-return': 'error', 'no-useless-return': 'error',
'no-var': 'error', 'no-var': 'error',
'operator-assignment': ['error', 'always'], 'operator-assignment': ['error', 'always'],
'prefer-const': 'error', 'prefer-const': 'error',
'prefer-template': 'error', 'prefer-template': 'error',
'require-await': 'error', 'require-await': 'off',
'require-yield': 'error', 'require-yield': 'error',
'sort-imports': 'error', 'sort-imports': 'error',
'spaced-comment': ['error', 'always'], 'spaced-comment': ['error', 'always'],
...@@ -60,24 +80,24 @@ module.exports = { ...@@ -60,24 +80,24 @@ module.exports = {
'arrow-parens': ['error', 'always'], 'arrow-parens': ['error', 'always'],
'arrow-spacing': 'error', 'arrow-spacing': 'error',
'block-spacing': 'error', 'block-spacing': 'error',
'brace-style': ['error', '1tbs'], 'brace-style': 'off',
'comma-spacing': ['error', { 'before': false, 'after': true }], 'comma-spacing': 'off',
'comma-style': ['error', 'last'], 'comma-style': ['error', 'last'],
'func-call-spacing': ['error', 'never'], 'func-call-spacing': ['error', 'never'],
'implicit-arrow-linebreak': ['error', 'beside'], 'implicit-arrow-linebreak': ['error', 'beside'],
'indent': ['error', 2], 'indent': 'off',
'jsx-quotes': ['error', 'prefer-single'], 'jsx-quotes': ['error', 'prefer-single'],
'keyword-spacing': ['error', { 'before': true, 'after': true }], 'keyword-spacing': 'off',
'no-mixed-spaces-and-tabs': 'error', 'no-mixed-spaces-and-tabs': 'error',
'no-multi-spaces': 'error', 'no-multi-spaces': 'error',
'no-multiple-empty-lines': 'error', 'no-multiple-empty-lines': 'error',
'no-tabs': 'error', 'no-tabs': 'error',
'no-trailing-spaces': 'error', 'no-trailing-spaces': 'error',
'no-whitespace-before-property': 'error', 'no-whitespace-before-property': 'error',
'quotes': ['error', 'single'], 'quotes': 'off',
'rest-spread-spacing': ['error', 'never'], 'rest-spread-spacing': ['error', 'never'],
'semi': ['error', 'always'], 'semi': 'off',
'space-before-blocks': 'error', 'space-before-blocks': 'off',
'space-in-parens': 'error', 'space-in-parens': 'error',
'switch-colon-spacing': 'error', 'switch-colon-spacing': 'error',
'template-curly-spacing': ['error', 'always'], 'template-curly-spacing': ['error', 'always'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment