Giter Site home page Giter Site logo

Comments (7)

antfu avatar antfu commented on June 9, 2024 1

@vctrtvfrrr, This is not relevant. Set noEmit: true in your tsconfig.json

from eslint.

antfu avatar antfu commented on June 9, 2024

Any reason to use eslint.config.cjs instead of eslint.config.mjs?

from eslint.

vctrtvfrrr avatar vctrtvfrrr commented on June 9, 2024

Any reason to use eslint.config.cjs instead of eslint.config.mjs?

When I use eslint.config.mjs I receive this error:

Cannot write file '/path/to/project/eslint.config.mjs' because it would overwrite input file.ts

from eslint.

mitjans avatar mitjans commented on June 9, 2024

The error mentioned (Cannot write file...) appears in the server/tsconfig.json file of any Nuxt project when using the new @nuxt/eslint module along with the flat config file.

Setting noEmit: true works, but it would be nice if the module handled this internally.
Can the module add this setting to .nuxt/tsconfig.server.json?

from eslint.

mitjans avatar mitjans commented on June 9, 2024

Maybe by adding the following hook?

nuxt.hook('nitro:config', (config) => {
  config.typescript.tsConfig.compilerOptions.noEmit = true;
});

from eslint.

brownsugar avatar brownsugar commented on June 9, 2024

@antfu I was trying to make a minimal shared config without using bundlers so just wrote it in CJS format.

from eslint.

antfu avatar antfu commented on June 9, 2024

We would suggest always use eslint.config.mjs as there is almost no reason to not to (it works even in a CJS project). If you absolutely need CJS, I'd suggest you to use dynamic import then.

from eslint.

Related Issues (20)

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.