Comments (12)
Oh - just reading this again and I see the issue.
I don't use the prettier vs code extension, and if you followed my steps, you will see that we turned it off.
So, if you want to overwrite any settings that I have, you need to do so in your .eslintrc
, and not in your VS Code settings file.
It would then look like this:
{
"extends": [
"wesbos"
],
"rules": {
"prettier/prettier": [
"error",
{
"printWidth": 135,
}
]
}
}
from eslint-config-wesbos.
Sorry to interject.
This might be what is causing the unwanted behaviour:
https://github.com/prettier/eslint-plugin-prettier#options
But it's always cutting my lines at 80.
This line could be taking precedence over the rule you set in settings.json
https://github.com/wesbos/eslint-config-wesbos/blob/master/.eslintrc.js#L120
from that first link:
NB: This option will merge and override any config set with .prettierrc files
(I'm making the leap here that a setting in the settings.json file acts like a global .prettierrc file)
edit: the rule in settings.json
is probably not active since prettier is being ran through an ESLint-plugin and not the VSCode extension. I wonder if it is aware of settings given to the editor extension π€
from eslint-config-wesbos.
well im glad you logged this issue because that is exactly what I wanted to find out - little sticking points like this is what cause people to abandon tools like this. Glad we could get it figured out!
from eslint-config-wesbos.
Hmm - let me take a look into this. You are sure you don't have a prettier config file in your folder?
from eslint-config-wesbos.
I'm testing in a single file in a folder, there's no .eslintrc
or .prettierrc
file
from eslint-config-wesbos.
and was this with a global or local install?
from eslint-config-wesbos.
Global install
from eslint-config-wesbos.
hmm I don't recall this being an issue for me and I've always used it this way. Will investigate :)
from eslint-config-wesbos.
Going to leave this open so I can document how to add custom eslint and prettier settings to overwrite any that my config sets
from eslint-config-wesbos.
I followed the steps and disabled the vs code extension, but I wasn't aware that I have to add the prettier rules to the .eslintrc
file, didn't even know it was possible π
It's working now, though.
Thanks!
from eslint-config-wesbos.
Same here. Through some trial and error I realized I could remove the settings from both VS Code and my project's .prettierrc file. Having everything in one place (.eslintrc) is prettier nice! ;)
from eslint-config-wesbos.
Okay ive documented this in the readme now. Opted against using a .prettierrc
from eslint-config-wesbos.
Related Issues (20)
- no-use-before-define HOT 1
- Command returns ERR undefined with new updates dependencies HOT 3
- eslint not running with npm run lint HOT 6
- ERR undefined on Next.js HOT 2
- npm install fails on new Gatsby v4 HOT 2
- Deprecated dependencies HOT 1
- Parsing error: Cannot find module '@babel/preset-react' HOT 1
- Update readme.md for WSL HOT 1
- Investigate "Bundling" Eslint peer Deps HOT 6
- Switch instructions to using "prettier" config in package.json
- Add { "allowShortCircuit": true, "allowTernary": true } HOT 2
- prefer-arrow-callback
- @typescript-eslint/no-unused-expressions
- /*eslint no-unused-vars: ["error", { "destructuredArrayIgnorePattern": "^_" }]*/
- allow importing of `.js` files that resolve to `.ts` on filesystem
- VS Code: ESLint extension no longer supports `eslint.alwaysShowStatus` HOT 1
- stop double quote error
- @typescript-eslint/comma-dangle in .eslintrc.js HOT 1
- es lint command not found HOT 9
- Conflicting plug ins? HOT 1
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-config-wesbos.