1.0.1 • Published 1 year ago

eslint-config-markusand v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

markusand's ESLinft config

Very opinionated linting configuration for TypeScript and Vue.

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') },
    ],
  },
});