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