UNPKG

json-schema-to-typescript

Version:
48 lines (46 loc) 1.6 kB
import tsPlugin from '@typescript-eslint/eslint-plugin' import tsParser from '@typescript-eslint/parser' import prettierRecommended from 'eslint-plugin-prettier/recommended' export default [ { ignores: ['dist/', 'example/'], }, prettierRecommended, { files: ['**/*.ts'], languageOptions: { parser: tsParser, parserOptions: { ecmaVersion: 2020, project: ['./tsconfig.json', './tsconfig.test.json'], sourceType: 'module', }, }, plugins: { '@typescript-eslint': tsPlugin, }, rules: { '@typescript-eslint/adjacent-overload-signatures': 'error', '@typescript-eslint/consistent-type-assertions': 'error', '@typescript-eslint/naming-convention': 'off', '@typescript-eslint/no-array-constructor': 'error', '@typescript-eslint/no-empty-function': 'error', '@typescript-eslint/no-empty-object-type': ['error', {allowInterfaces: 'never'}], '@typescript-eslint/no-inferrable-types': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'error', '@typescript-eslint/no-this-alias': 'error', '@typescript-eslint/no-unsafe-function-type': 'error', '@typescript-eslint/no-unused-vars': 'warn', '@typescript-eslint/no-wrapper-object-types': 'error', camelcase: 'off', 'no-array-constructor': 'off', 'no-empty-function': 'off', 'no-unused-vars': 'off', 'no-var': 'error', 'prefer-const': 'error', 'prefer-rest-params': 'error', 'prefer-spread': 'error', }, }, ]