eslint-config-typescript
eslint-config-typescript copied to clipboard
Add recommended-type-checked
This can be used like this:
// @ts-check
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript/recommended-type-checked',
'@vue/eslint-config-prettier',
],
parserOptions: {
ecmaVersion: 'latest',
tsconfigRootDir: __dirname,
project: [
'./tsconfig.app.json',
'./tsconfig.vitest.json',
'./tsconfig.node.json',
'./e2e/tsconfig.json',
],
},
};
And adding typescript-eslint-parser-for-extra-files
to devDependencies
See https://github.com/vuejs/vue-eslint-parser/issues/104 & https://github.com/vuejs/eslint-config-typescript/issues/29
cc @ota-meshi
@sodatea