-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't workingexternalThis issue is with another package, not typescript-eslint itselfThis issue is with another package, not typescript-eslint itselfpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginvueissues relating to vue supportissues relating to vue support
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Playground Link
Repro Code
https://github.com/laterdayi/tests
ESLint Config
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution');
module.exports = {
root: true,
env: {
node: true,
es6: true
},
parser: 'vue-eslint-parser',
plugins: ['standard-recommended'],
extends: [
'plugin:vue/vue3-essential',
'plugin:vue/vue3-strongly-recommended',
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
'./.eslintrc-auto-import.json',
'plugin:@typescript-eslint/recommended-requiring-type-checking'
],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true
},
project: './tsconfig.json'
},
rules: {
'standard-recommended/no-index': 'error',
'prettier/prettier': ['warn', { printWidth: 120 }],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
eqeqeq: 'error',
'no-alert': 'error',
quotes: 'off',
'no-const-assign': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
semi: 'off',
'no-multi-spaces': 'error',
'no-new-wrappers': 'error',
'no-script-url': 'error',
'no-self-compare': 'error',
'no-useless-return': 'error',
'no-void': 'error',
'require-await': 'error',
'wrap-iife': ['error', 'inside'],
yoda: 'error',
'no-undef': 'off',
'no-use-before-define': 'off',
'global-require': 'error',
'no-new-require': 'error',
camelcase: 'error',
'comma-dangle': 'error',
'line-comment-position': 'error',
'max-depth': 'error',
'max-nested-callbacks': 'error',
'multiline-comment-style': 'error',
'no-inline-comments': 'error',
'no-lonely-if': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'no-whitespace-before-property': 'error',
'operator-assignment': 'error',
'padded-blocks': ['error', 'never'],
'space-before-function-paren': 'off',
'spaced-comment': 'error',
'switch-colon-spacing': 'error',
'no-duplicate-imports': 'error',
'no-useless-rename': 'error',
'no-var': 'error',
'prefer-const': 'error',
'default-case': 'error',
'default-case-last': 'error',
'default-param-last': 'error',
'new-cap': 'error',
'no-else-return': 'error',
'no-empty-function': 'error',
'no-lone-blocks': 'error',
'no-return-await': 'error',
'array-bracket-spacing': 'error',
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'brace-style': 'error',
'comma-spacing': 'error',
'key-spacing': 'error',
'keyword-spacing': 'error',
'lines-between-class-members': 'error',
'no-multiple-empty-lines': 'error',
'nonblock-statement-body-position': 'error',
'object-curly-spacing': ['error', 'always'],
'rest-spread-spacing': 'error',
'space-before-blocks': 'error',
'space-in-parens': 'error',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/no-duplicate-enum-values': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/naming-convention': [
'error',
{ selector: ['interface', 'typeAlias', 'enum'], format: ['PascalCase'] },
{ selector: ['function', 'parameter'], format: ['camelCase'] },
{
selector: 'memberLike',
modifiers: ['private'],
format: ['camelCase'],
leadingUnderscore: 'require'
}
],
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
'vue/multiline-html-element-content-newline': 'error',
'vue/no-spaces-around-equal-signs-in-attribute': 'error',
'vue/no-template-shadow': 'error',
'vue/no-setup-props-destructure': 'off',
'vue/prop-name-casing': 'error',
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off'
},
overrides: [
{
files: [
'src/components/base-chart/**/*',
'src/components/base-curd/base-curd.vue',
'src/components/base-ui/**/*',
'src/types/global.d.ts',
'src/utils/component.ts',
'src/utils/extends.ts',
'src/utils/localstorage.ts'
],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
}
},
{
files: ['src/directive/index.ts', 'src/plugins/core/index.ts', 'src/service/index.ts', 'src/router/index.ts'],
rules: {
'standard-recommended/no-index': 'off'
}
}
]
};
### tsconfig
```jsonc
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue", "auto-imports.d.ts", "components.d.ts"],
"exclude": ["src/plugins/vite/plugins/index.ts"],
"compilerOptions": {
"jsx": "preserve",
"baseUrl": ".",
"paths": {
// TODO: delete https://github.com/userquin/unocss-browser-issue
"@unocss/preset-icons/browser": ["./node_modules/@unocss/preset-icons/dist/browser"],
"@/*": ["./src/*"],
"@c/*": ["./src/components/*"],
"@v/*": ["./src/views/*"]
},
"preserveValueImports": false,
"lib": ["es6", "es2017", "es2019", "es2022"],
"types": ["vite-plugin-svg-icons/client", "vite/client", "naive-ui/volar"]
},
"references": [
{
"path": "./tsconfig.config.json"
}
]
}
Expected Result
is work
Actual Result
[{
"resource": "/F:/my/E-fab/.eslintrc.cjs",
"owner": "eslint",
"severity": 8,
"message": "Parsing error: ESLint was configured to run on `<tsconfigRootDir>/.eslintrc.cjs` using `parserOptions.project`: <tsconfigRootDir>/tsconfig.json\nHowever, that TSConfig does not include this file. Either:\n- Change ESLint's list of included files to not include this file\n- Change that TSConfig to include this file\n- Create a new TSConfig that includes this file and include it in your parserOptions.project\nSee the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file",
"source": "eslint",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}]
[{
"resource": "/f:/my/E-fab/src/views/testing/basic-config/equipment-layout-manage/equipment-layout-manage.vue",
"owner": "eslint",
"severity": 8,
"message": "Parsing error: '>' expected.",
"source": "eslint",
"startLineNumber": 145,
"startColumn": 34,
"endLineNumber": 145,
"endColumn": 34
}]
Additional Info
https://github.com/laterdayi/tests
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingexternalThis issue is with another package, not typescript-eslint itselfThis issue is with another package, not typescript-eslint itselfpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-pluginvueissues relating to vue supportissues relating to vue support