Coder Social home page Coder Social logo

lint-staged-tsc's People

Contributors

spidy88 avatar

Stargazers

 avatar

Watchers

 avatar

lint-staged-tsc's Issues

[Error] TypeError: Cannot read properties of null (reading 'toString')

I will try to add kind of the environment I am working on right now:
it's a NextJS project using typescript, NextJS is version 12.3.

Typescript: "typescript": "5.4.5"

tsconfig.json

{
  "compilerOptions": {
    "target": "ES2015",
    "baseUrl": ".",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": false,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "incremental": false,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "jsx": "preserve",
    "paths": {
      "@components/*": ["src/components/*"],
      "@hooks/*": ["src/hooks/*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
  "exclude": ["node_modules", "svgo.config.js"]
}

related packages versions: (not full package.json)

{
    "@spidy88/lint-staged-tsc": "^1.0.0",
    "tsc-files": "^1.1.4",
    "husky": "7.0.2",
    "lint-staged": "^15.2.2",
}

I am using babel at the moment to get code test coverage using istanbul ;
.babelrc file in root.

{
  "presets": ["next/babel"],
  "env": {
    "development": {
      "plugins": ["istanbul"]
    }
  }
}

And this is the error:

โœ– lint-staged-tsc --noEmit --strict:
xxxxxxxxxxx\node_modules\@spidy88\lint-staged-tsc\cli.js:26
const outputLines = stdout.toString().split(/[\r\n]+/);
                           ^

TypeError: Cannot read properties of null (reading 'toString')
    at Object.<anonymous> (xxxxxxxxxxxxxxxxxxxxx\node_modules\@spidy88\lint-staged-tsc\cli.js:26:28)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.10.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.