UNPKG

@wise/eslint-config

Version:
56 lines (55 loc) 1.84 kB
import parser from '@typescript-eslint/parser'; import simpleImportSort from 'eslint-plugin-simple-import-sort'; import tseslint from 'typescript-eslint'; import { defineConfig } from './_defineConfig.js'; import base from './base.js'; export default defineConfig([ ...base, { plugins: { 'simple-import-sort': simpleImportSort, }, languageOptions: { parser, parserOptions: { project: true, }, }, rules: { 'no-nested-ternary': 'warn', '@typescript-eslint/consistent-type-assertions': [ 'error', { assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter', }, ], '@typescript-eslint/consistent-type-definitions': 'warn', '@typescript-eslint/consistent-type-exports': [ 'warn', { fixMixedExportsWithInlineTypeSpecifier: true, }, ], '@typescript-eslint/consistent-type-imports': [ 'warn', { fixStyle: 'inline-type-imports', }, ], '@typescript-eslint/no-unnecessary-condition': 'off', '@typescript-eslint/parameter-properties': 'error', 'simple-import-sort/imports': 'warn', 'simple-import-sort/exports': 'warn', 'sort-imports': 'off', 'import/order': 'off', 'regexp/require-unicode-regexp': 'error', 'require-unicode-regexp': 'off', curly: 'warn', }, }, { files: ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'], ...tseslint.configs.disableTypeChecked, }, ]);