|
| 1 | +import tsStylistic from '@stylistic/eslint-plugin-ts'; |
| 2 | +import prettier from 'eslint-config-prettier'; |
| 3 | +import globals from 'globals'; |
| 4 | +import tsEslint from 'typescript-eslint'; |
| 5 | + |
| 6 | +import apify from '@apify/eslint-config'; |
| 7 | + |
| 8 | +export default [ |
| 9 | + { |
| 10 | + ignores: ['**/dist', 'node_modules', 'coverage', 'website', '**/*.d.ts'], |
| 11 | + }, |
| 12 | + ...apify, |
| 13 | + prettier, |
| 14 | + { |
| 15 | + languageOptions: { |
| 16 | + parser: tsEslint.parser, |
| 17 | + parserOptions: { |
| 18 | + project: 'tsconfig.eslint.json', |
| 19 | + }, |
| 20 | + globals: { |
| 21 | + ...globals.browser, |
| 22 | + ...globals.node, |
| 23 | + ...globals.jest, |
| 24 | + }, |
| 25 | + }, |
| 26 | + }, |
| 27 | + { |
| 28 | + plugins: { |
| 29 | + '@typescript-eslint': tsEslint.plugin, |
| 30 | + '@stylistic': tsStylistic, |
| 31 | + }, |
| 32 | + rules: { |
| 33 | + '@typescript-eslint/no-empty-object-type': 'off', |
| 34 | + '@typescript-eslint/no-explicit-any': 'off', |
| 35 | + 'max-classes-per-file': 'off', |
| 36 | + 'no-empty-function': 'off', |
| 37 | + 'consistent-return': 'off', |
| 38 | + 'no-use-before-define': 'off', |
| 39 | + 'no-param-reassign': 'off', |
| 40 | + 'no-void': 'off', |
| 41 | + 'no-underscore-dangle': 'off', |
| 42 | + 'no-console': 'off', |
| 43 | + 'import/no-extraneous-dependencies': 'off', |
| 44 | + 'import/extensions': 'off', |
| 45 | + 'import/no-default-export': 'off', |
| 46 | + '@typescript-eslint/array-type': 'error', |
| 47 | + '@typescript-eslint/ban-ts-comment': 0, |
| 48 | + '@typescript-eslint/consistent-type-imports': [ |
| 49 | + 'error', |
| 50 | + { |
| 51 | + 'disallowTypeAnnotations': false, |
| 52 | + }, |
| 53 | + ], |
| 54 | + '@typescript-eslint/consistent-type-definitions': ['error', 'interface'], |
| 55 | + '@stylistic/member-delimiter-style': [ |
| 56 | + 'error', |
| 57 | + { |
| 58 | + 'multiline': { 'delimiter': 'semi', 'requireLast': true }, |
| 59 | + 'singleline': { 'delimiter': 'semi', 'requireLast': false }, |
| 60 | + }, |
| 61 | + ], |
| 62 | + '@typescript-eslint/no-empty-interface': 'off', |
| 63 | + '@typescript-eslint/promise-function-async': 'off', |
| 64 | + 'no-promise-executor-return': 'off', |
| 65 | + '@typescript-eslint/prefer-destructuring': 'off', |
| 66 | + 'prefer-destructuring': 'off', |
| 67 | + '@typescript-eslint/no-empty-function': 'off', |
| 68 | + '@typescript-eslint/no-floating-promises': 'error', |
| 69 | + '@typescript-eslint/no-unused-vars': 'off', |
| 70 | + '@stylistic/comma-dangle': ['error', 'always-multiline'], |
| 71 | + }, |
| 72 | + }, |
| 73 | + { |
| 74 | + files: ['packages/templates/**/*'], |
| 75 | + rules: { |
| 76 | + 'no-unused-vars': 'off', |
| 77 | + '@typescript-eslint/no-unused-vars': 'off', |
| 78 | + }, |
| 79 | + }, |
| 80 | +]; |
0 commit comments