Comments (5)
I'm also confused by this. In the readme, it says to install @nuxt/eslint-config
, and then under "Usage" it says to install @nuxtjs/eslint-config
instead...?
From digging around I saw that the latter is the legacy package. Although the new one is better, it doesn't pick up no-undef
ย errors at all in .vue
files on my end. Am I doing it wrong?
const foo = thisDoesntExist();
๐ I was hoping to find a way for ESLint to still pick that one up, while allowing auto-imported stuff like composables.
from eslint.
Nuxt 3 needs @nuxtjs/eslint-config-typescript
for magic functions to resolve in ESlint.
from eslint.
I will describe what I got from this trip that can maybe help someone.
This one is the go-to for nuxt 3 and works for typescript also, but seems to be incomplete
@nuxt/eslint-config
Those two are legacy ones
@nuxtjs/eslint-config
@nuxtjs/eslint-config-typescript
For typescript conflict with no-undef
you don't even need this package, you just need to disable 'no-undef' rule since this will be handled by the ts itself.
For js I don't tested but maybe this line was supposed to do the trick https://github.com/nuxt/eslint-config/blob/84202f317657eb1dae8e287d74708c4fc4240e28/packages/eslint-config/index.js#L1 but I am not shure.
Also if you are extending some other config after this one, maybe the other config is conflicting and making it not work, for example if you are extending eslint-config-airbnb-base after this one.
And since the @nuxt/eslint-config
also extends some others configs https://github.com/nuxt/eslint-config/blob/84202f317657eb1dae8e287d74708c4fc4240e28/packages/eslint-config/index.js#L22, putting this one in the end of your extend array may override your previous configs and since the @nuxt/eslint-config
does not add any new rule, you may be better only copy pasting some configs from the file referenced above and pasting in your config, this was the best for me
from eslint.
Also if you are extending some other config after this one, maybe the other config is conflicting and making it not work, for example if you are extending eslint-config-airbnb-base after this one.
Yeah, airbnb-base
really does conflict with nuxt config
...
from eslint.
Dupe of #309
from eslint.
Related Issues (20)
- Stylistic rules do not apply HOT 5
- [NUXT] Cannot write file `eslint.config.mjs` because it would overwrite input file. HOT 1
- False positives for `vue/multi-word-component-names` rule
- `npx nuxi module add eslint` adds as main dependency and doesn't create config file HOT 8
- docs: document `autoInit` HOT 2
- docs: `i-ph-lightbulb-duotone` is not displayed HOT 3
- Cannot find module '[...]/.nuxt/eslint.config.mjs' HOT 3
- Include `eslint-plugin-regexp` in `tooling` preset HOT 2
- ConfigError: Key "plugins": Cannot redefine plugin "import" in Nuxt ESLint configuration HOT 2
- Constant Error: Cannot find module 'typescript' HOT 14
- Cannot find package 'vite-plugin-eslint2' HOT 5
- feat(config): add `no-import-type-side-effects` rule of `@typescript-eslint` HOT 1
- docs: add how to use composer HOT 3
- Add Tailwindcss class sorter HOT 8
- eslint/config-inspector custom host/port when using @nuxt/eslit HOT 1
- Question: Unexpected key "typescript" found HOT 4
- Nuxt Deployment on DigitalOcean // ERROR Cannot find module '/workspace/@nuxt/eslint' HOT 1
- Allow `no-undef` also on plain JavaScript files, not just Typescript HOT 12
- Add `public` folder to the ignore list
- `vue/no-ref-as-operand` does not trigger on `useState`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eslint.