For TypeScript, scope Unicorn to TypeScript files and configure a TypeScript parser for the same config object:
import typescriptEslintParser from '@typescript-eslint/parser';import unicorn from 'eslint-plugin-unicorn';import {defineConfig} from 'eslint/config';import globals from 'globals';export default defineConfig([ { files: ['**/*.ts'], languageOptions: { globals: globals.builtin, parser: typescriptEslintParser, }, plugins: { unicorn, }, rules: { 'unicorn/prefer-module': 'error', 'unicorn/…': 'error', }, }, // …
Rules
💼 Configurations enabled in.
✅ Set in the recommendedconfiguration.
🎨 Set in the recommended-cssconfiguration.
🌐 Set in the recommended-htmlconfiguration.
🧩 Set in the recommended-jsonconfiguration.
📚 Set in the .
💎 Set in the .
🛠️ Set in the .
📋 Set in the .
☑️ Set in the .
🔧 Automatically fixable by the .
💡 Manually fixable by .
💭 Requires .