bshambaugh / did-key-creator

Other
2 stars 4 forks source link

Linter error. This may be a problem with tsconfig.json #2

Open bshambaugh opened 2 years ago

bshambaugh commented 2 years ago

I have a linter error:

/home/ubuntu/Documents/exploringCIDs/elliptic-piece/did-key-creator/src/index.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: src/index.ts.
The file must be included in at least one of the projects provided

bshambaugh 3 hours ago This is a potential solution:https://stackoverflow.com/questions/63879049/what-means-parsing-error-parseroptions-project-has-been-set-for-typescript This is my tsconfig.json:

{
   "compilerOptions": {
     "module": "commonjs",
     "lib": ["es6", "dom", "esnext"],
     "target": "ES2020",
     "declaration": true,
     "declarationMap": true,
     "skipLibCheck": true,
     "resolveJsonModule": true,
     "removeComments": true,
     "esModuleInterop": true,
     "emitDecoratorMetadata": true,
     "experimentalDecorators": true,
     "sourceMap": true,
     "typeRoots": [
       "./types", "node_modules/@types"
     ],
     "outDir":"lib",
     "rootDir":"src"
  },
  "include": [
    "src/*","src/**/*","src/"
  ]
}

include is a mess because I have been playing around with it thinking that changing it is the way.

"include": [
    "src/*","src/**/*","src/"
  ]
bshambaugh commented 2 years ago

Try this and see if it helps:

https://www.typescriptlang.org/docs/handbook/tsconfig-json.html