|
| 1 | +/* eslint-disable */ |
| 2 | +module.exports = { |
| 3 | + root: true, |
| 4 | + parser: 'vue-eslint-parser', |
| 5 | + parserOptions: { |
| 6 | + ecmaVersion: 2022, // Allows for the parsing of modern ECMAScript features |
| 7 | + sourceType: 'module', // Allows for the use of imports |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + ecmaFeatures: { |
| 10 | + jsx: true // Allows for the parsing of JSX |
| 11 | + }, |
| 12 | + }, |
| 13 | + extends: [ |
| 14 | + 'materya', |
| 15 | + 'materya/typescript', |
| 16 | + "plugin:vue/vue3-recommended", |
| 17 | + "eslint:recommended", |
| 18 | + "@vue/typescript/recommended" |
| 19 | + ], |
| 20 | + env: { |
| 21 | + node: true, |
| 22 | + }, |
| 23 | + settings: { |
| 24 | + 'import/resolver': { |
| 25 | + node: { |
| 26 | + extensions: [".js", ".jsx", ".ts", ".tsx", '.vue'], |
| 27 | + paths: ['@types'], |
| 28 | + }, |
| 29 | + }, |
| 30 | + }, |
| 31 | + rules: { |
| 32 | + '@typescript-eslint/naming-convention': 'off', |
| 33 | + 'max-len': ['error', { |
| 34 | + code: 79, |
| 35 | + ignoreComments: true, |
| 36 | + ignoreTemplateLiterals: true, |
| 37 | + ignoreStrings: true, |
| 38 | + ignoreUrls: true, |
| 39 | + }], |
| 40 | + semi: ['error', 'never'], |
| 41 | + 'import/extensions': 'off', |
| 42 | + 'import/no-cycle': 'off', |
| 43 | + 'import/named': 'off', // Does not work well with TS |
| 44 | + camelcase: ['off', { ignoreDestructuring: true }], |
| 45 | + 'no-unused-expressions': ['off', { allowShortCircuit: true }], |
| 46 | + 'arrow-parens': ['error', 'as-needed', { requireForBlockBody: false }], |
| 47 | + 'space-before-function-paren': ['off'], |
| 48 | + '@typescript-eslint/no-unused-vars': ['error', { |
| 49 | + varsIgnorePattern: '^\\\$', |
| 50 | + }], |
| 51 | + 'object-curly-newline': ['error', { |
| 52 | + ObjectExpression: { consistent: true }, |
| 53 | + }], |
| 54 | + 'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], |
| 55 | + 'template-tag-spacing': ['error', 'always'], |
| 56 | + 'no-console': process.env.NODE_ENV === 'dev' ? 'off' : 'error', |
| 57 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 58 | + 'comma-dangle': [2, 'always-multiline'], |
| 59 | + 'import/no-unresolved': ['error', { |
| 60 | + ignore: ['^@/@types/cresh-ui$', '^@', 'config'], |
| 61 | + }], |
| 62 | + 'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }], |
| 63 | + '@typescript-eslint/member-delimiter-style': ['error', { |
| 64 | + "multiline": { |
| 65 | + 'delimiter': 'none', |
| 66 | + 'requireLast': false |
| 67 | + }, |
| 68 | + 'singleline': { |
| 69 | + 'delimiter': 'semi', |
| 70 | + 'requireLast': false |
| 71 | + } |
| 72 | + }], |
| 73 | + 'vue/component-name-in-template-casing': ['error', 'PascalCase', { |
| 74 | + 'registeredComponentsOnly': true, |
| 75 | + 'ignores': [], |
| 76 | + }], |
| 77 | + 'vue/html-indent': 'off', |
| 78 | + 'vue/attributes-order': 'off', |
| 79 | + 'vue/no-boolean-default': ['error', 'default-false'], |
| 80 | + 'vue/no-reserved-component-names': ['error'], |
| 81 | + 'vue/padding-line-between-blocks': ['error', 'always'], |
| 82 | + 'vue/require-name-property': ['error'], |
| 83 | + 'vue/one-component-per-file': ['error'], |
| 84 | + 'vue/custom-event-name-casing': ['error'], |
| 85 | + 'vue/no-arrow-functions-in-watch': ['error'], |
| 86 | + 'vue/no-custom-modifiers-on-v-model': ['error'], |
| 87 | + 'vue/no-dupe-v-else-if': ['error'], |
| 88 | + 'vue/no-multiple-template-root': ['off'], |
| 89 | + 'no-undef': 'off', // @typescript-eslint/no-undef |
| 90 | + 'no-param-reassign': ['error', { "props": false }], |
| 91 | + 'no-shadow': 'off', // @typescript-eslint/no-shadow |
| 92 | + 'vue/custom-event-name-casing': 'off', |
| 93 | + 'no-nested-ternary': ['warn'], |
| 94 | + 'vue/max-len': ['off'], // max-len exists |
| 95 | + 'import/no-extraneous-dependencies':[ |
| 96 | + 'error', |
| 97 | + { |
| 98 | + 'devDependencies':[ |
| 99 | + '**/*.test.ts', |
| 100 | + ] |
| 101 | + } |
| 102 | + ] |
| 103 | + }, |
| 104 | + overrides: [ |
| 105 | + { |
| 106 | + files: [ |
| 107 | + '**/__tests__/*.{j,t}s?(x)', |
| 108 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', |
| 109 | + '**/tests/unit/**/*.test.{j,t}s?(x)' |
| 110 | + ], |
| 111 | + env: { |
| 112 | + mocha: true |
| 113 | + } |
| 114 | + } |
| 115 | + ], |
| 116 | + ignorePatterns: [ |
| 117 | + 'src/pages/*', // pages for examples purposes only |
| 118 | + 'cypress.config.ts', |
| 119 | + ] |
| 120 | +} |
0 commit comments