GithubHelp home page GithubHelp logo

Comments (15)

nandorojo avatar nandorojo commented on June 9, 2024 1

See this commit to see the fix: d9e40a4

You can also run npx create-solito-app@latest if you want, but since you already have an app started, you'll probably want to copy over those changes.

Thanks for opening the issue, hope that fixes it on your end! Please let me know if it does.

from solito.

RobinLindhout avatar RobinLindhout commented on June 9, 2024

When we add

yarn add @next/eslint-plugin-next --dev -W

we got
Schermafbeelding 2022-03-17 om 10 20 17

from solito.

RobinLindhout avatar RobinLindhout commented on June 9, 2024

When we use

module.exports = {
  extends: 'next/core-web-vitals',
}

as base + yarn add next eslint eslint-config-next --dev -W in the root package it starts working.

But no errors in IDE on not existing properties
Schermafbeelding 2022-03-17 om 10 27 40

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

I was getting issues with ESLint too…I wonder if that eslint file should be in the Next app folder? As you’ll see in the starter, I some ESLint config issues from the new Next.js linter.

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

the image you sent shouldn’t break, since background color accepts any string. Is that what you’re referring to?

When we use

module.exports = {
  extends: 'next/core-web-vitals',
}

as base + yarn add next eslint eslint-config-next --dev -W in the root package it starts working.

But no errors in IDE on not existing properties Schermafbeelding 2022-03-17 om 10 27 40

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

But in your demo video it gave errors when e.g. wrong spacing was being used?

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

It does give errors in the terminal though just not in the IDE.

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

It does give errors in the terminal though just not in the IDE.

I had this same issue. I got around it by silently breaking the next lint command with an incorrect ESLint config. Looking into this now for a fix

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

I don't know if eslint can understand it if we use eslintrc for expo and in nextjs folder we can use nextjs linting too

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

Should be nice if we could use nextjs things only in next project and react native + web linting in packages/app

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

Yeah, that's more of a monorepo question in general. It feels like it should be possible if we extend the ones we want in each folder. That said, I'm a bit confused why this error comes up, only when I install next's ESLint plugin and run yarn build:

yarn run v1.22.5
$ next build
info  - Checking validity of types  

Failed to compile.

./pages/_app.tsx
1:1  Error: Parsing error: The keyword 'import' is reserved

./pages/_document.tsx
1:1  Error: Parsing error: The keyword 'export' is reserved

./pages/index.tsx
1:1  Error: Parsing error: The keyword 'import' is reserved

./pages/user/[id].tsx
1:1  Error: Parsing error: The keyword 'import' is reserved

info  - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
error Command failed with exit code 1.

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

Made some progress with this in the apps/next/.eslintrc.js file:

module.exports = {
  extends: 'next',
}

I also installed @next/eslint-plugin-next in apps/next. Still some errors but it builds.

from solito.

nandorojo avatar nandorojo commented on June 9, 2024

Okay, I think I fixed it!

Put this in .eslintrc.js in apps/next:

module.exports = {
  extends: 'next',
  root: true, // don't check from parent folder
}

And install eslint-config-next inside of apps/next

It looks like root: true fixed it for the monorepo. I think this field should allow what @RichardLindhout proposed:

Should be nice if we could use nextjs things only in next project and react native + web linting in packages/app

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

Amazing we will try it out soon!

from solito.

RichardLindhout avatar RichardLindhout commented on June 9, 2024

Moti is amazing btw <3. First time I used it and it's so easy to write cool animations.

from solito.

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.