eslint-config-markusand

1.0.1 • Public • Published

markusand's ESLinft config

Very opinionated linting configuration for TypeScript and Vue.

  • Airbnb style guide for Javascript and TypeScript
  • Recommended style for Vue and TypeScript
  • ⚠️ Very opinionated custom rules overrides
  • Support for import linting

Usage

Install the dependency

npm i -D eslint-config-markusand

Add the config to the .eslintrc file. Use eslint-config-markusand/vue if the project uses Vue.

{
  "extends": ["eslint-config-markusand"],
}

Aliased imports

To resolve aliased imports, add the paths the option in tsconfig.json

{
  "compilerOptions": {
    "paths": {
      "/@/*": ["./src/*"],
    },
  },
}

If using Vite, add configuration in vite.config.ts

import { defineConfig } from 'vite';
import path from 'path';

export default defineConfig({
  resolve: {
    alias: [
      { find: '/@', replacement: path.resolve(__dirname, './src') },
    ],
  },
});

/eslint-config-markusand/

    Package Sidebar

    Install

    npm i eslint-config-markusand

    Weekly Downloads

    59

    Version

    1.0.1

    License

    ISC

    Unpacked Size

    5.38 kB

    Total Files

    5

    Last publish

    Collaborators

    • markusand