Skip to content

eslinter configuration with strict typescript and vue rules

Notifications You must be signed in to change notification settings

Vyachean/eslint-config

Repository files navigation

eslint-config

Strict ESLint configuration for Vue projects with TypeScript.

Installation

npm i -D @vyachean/eslint-config eslint

Usage

// eslint.config.mjs

import { config } from '@vyachean/eslint-config';
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

// to add TS support, specify the path to the tsconfig.json file
const tsConfigPath = resolve(
  dirname(fileURLToPath(import.meta.url)),
  './tsconfig.json',
);

export default [
  ...config({
    // parserOptions for ts
    tsParserOptions: {
      project: tsConfigPath,

      // recommended for ts files, but doesn't work with vue yet
      EXPERIMENTAL_useProjectService: true,
    },
    vue: true, // to support vue files
  })
  // define rules
]

About

eslinter configuration with strict typescript and vue rules

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published