Closed
Description
Hello everyone and thanks for your support.
I open an issue here because I don't reproduce the issue when using the npx eslint
command on my project but vscode does.
I get the following issues
Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: ../../../../../home/papyelgringo/workspace/material-shell/src/manager/stateManager.ts.
The file must be included in at least one of the projects provided.
Please not the wierd file path used for the check.
eslintrc.js
/* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
env: {
es6: true,
},
extends: ['eslint:recommended', 'plugin:prettier/recommended', 'prettier'],
plugins: ['prettier', '@typescript-eslint'],
rules: {
'prettier/prettier': 'error',
camelcase: [
'off',
{
properties: 'never',
},
],
/* Allow unused variables starting with underscores */
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
},
overrides: [
{
files: ['*.ts', '*.tsx'],
extends: [
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/strict',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parserOptions: {
project: ['./tsconfig.json'],
ecmaVersion: 2020,
},
},
],
globals: {
ARGV: false,
Debugger: false,
GIRepositoryGType: false,
imports: false,
Intl: false,
logError: false,
print: false,
printerr: false,
window: false,
global: false,
_: false,
C_: false,
N_: false,
ngettext: false,
},
};
tsconfig.json
{
"version": "1.1.0",
"compileOnSave": true,
"compilerOptions": {
"module": "es2020",
"target": "es2018",
"outDir": "./build",
"forceConsistentCasingInFileNames": true,
"downlevelIteration": true,
"lib": ["es2018", "dom"],
"pretty": true,
"sourceMap": false,
"declaration": false,
"removeComments": true,
"incremental": true,
"noImplicitAny": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"strictNullChecks": true,
"noFallthroughCasesInSwitch": true,
"allowJs": true,
"strict": true,
"moduleResolution": "node",
"importHelpers": true,
"baseUrl": ".",
"paths": {
"*": ["@gi-types/*", "*"],
"ui": ["src/types/ui"],
"gjs": ["src/types/gjs"]
},
"experimentalDecorators": true
},
"include": ["src"]
}
I figured out that If I change the "include": ["src"]
with "include": ["../../../../../home/papyelgringo/workspace/material-shell/src"]
it does fix the issue but it's not a solution.
Any idea?
Thanks in advance