fork of hey-api/openapi-ts because I need some additional things
at main 2.6 kB view raw
1import eslint from '@eslint/js'; 2import configPrettier from 'eslint-config-prettier'; 3import pluginSimpleImportSort from 'eslint-plugin-simple-import-sort'; 4import pluginSortDestructureKeys from 'eslint-plugin-sort-destructure-keys'; 5import pluginSortKeysFix from 'eslint-plugin-sort-keys-fix'; 6import pluginTypeScriptSortKeys from 'eslint-plugin-typescript-sort-keys'; 7// import pluginVue from 'eslint-plugin-vue' 8import globals from 'globals'; 9import tseslint from 'typescript-eslint'; 10 11import pluginLocalPaths from './eslint-rules/local-paths.js'; 12 13export default tseslint.config( 14 eslint.configs.recommended, 15 ...tseslint.configs.recommended, 16 pluginLocalPaths.configs.recommended, 17 { 18 languageOptions: { 19 ecmaVersion: 'latest', 20 globals: { 21 ...globals.node, 22 }, 23 }, 24 plugins: { 25 'local-paths': pluginLocalPaths, 26 'simple-import-sort': pluginSimpleImportSort, 27 'sort-destructure-keys': pluginSortDestructureKeys, 28 'sort-keys-fix': pluginSortKeysFix, 29 'typescript-sort-keys': pluginTypeScriptSortKeys, 30 }, 31 rules: { 32 '@typescript-eslint/ban-ts-comment': 'off', 33 '@typescript-eslint/ban-ts-ignore': 'off', 34 '@typescript-eslint/consistent-type-imports': 'warn', 35 '@typescript-eslint/explicit-function-return-type': 'off', 36 '@typescript-eslint/explicit-module-boundary-types': 'off', 37 '@typescript-eslint/no-explicit-any': 'off', 38 '@typescript-eslint/no-inferrable-types': 'off', 39 '@typescript-eslint/no-non-null-assertion': 'off', 40 '@typescript-eslint/no-var-requires': 'off', 41 'arrow-body-style': 'error', 42 'import/order': 'off', 43 'no-prototype-builtins': 'off', 44 'object-shorthand': 'error', 45 'simple-import-sort/exports': 'error', 46 'simple-import-sort/imports': 'error', 47 'sort-destructure-keys/sort-destructure-keys': 'warn', 48 'sort-imports': 'off', 49 'sort-keys-fix/sort-keys-fix': 'warn', 50 'typescript-sort-keys/interface': 'warn', 51 'typescript-sort-keys/string-enum': 'warn', 52 }, 53 }, 54 { 55 files: ['**/*.cjs'], 56 rules: { 57 '@typescript-eslint/no-require-imports': 'off', 58 }, 59 }, 60 configPrettier, 61 { 62 ignores: [ 63 '**/.tsdown/', 64 '**/dist/', 65 '**/node_modules/', 66 'temp/', 67 'dev/.gen/', 68 'examples/openapi-ts-openai/src/client/**/*.ts', 69 '**/test/generated/', 70 '**/__snapshots__/', 71 '**/.next/', 72 '**/.nuxt/', 73 '**/.output/', 74 '**/.svelte-kit/', 75 '**/.vitepress/cache', 76 '**/.vitepress/dist', 77 '**/.angular', 78 ], 79 }, 80);