1,706
questions
-3
votes
1
answer
32
views
npm : how to disable eslint and prettier [closed]
When I am using the command : npm start, I am getting all prettier and eslint formatting error (space before and after brackets, etc.).
Is there a way to disable it?
Eslint and Prettier are not called ...
0
votes
0
answers
12
views
How can one generate the list of all files a prettier invocation will consider?
I have a step in my CI pipeline in which I want to process exactly the same list of files that our standard command-line invocation of prettier will parse/check. But because of things like our ....
0
votes
0
answers
26
views
Why doesn't Prettier configuration sort the imports correctly?
I have this Prettier configuration:
module.exports = {
plugins: ["@trivago/prettier-plugin-sort-imports"],
importOrder: [
"@las/(.*)$",
"<THIRD_PARTY_MODULES>...
-6
votes
1
answer
63
views
How to configure code indentation in VSCode?
I would like to clarify a question about VSCode indentation.
My employee is using the Prettier extension for code formatting.
A function that was supposed to look like this:
function evaluateCandidate(...
-1
votes
1
answer
47
views
Why does Prettier wrap my anonymous function with another anonymous function call and how do I turn it off?
Here is the original code:
namespace.namespace2 = new function() {/* logic here*/}
After using Prettier:
namespace.namespace2 = new (function() {/* logic here*/})();
Why? I want an option to disable ...
0
votes
1
answer
76
views
Eslint and prettier with Typescript React configuration
I have recently integrated eslint and prettier with react application based on typescript. I am having an issue where when I run npm run lint, I am able to see the warnings given by eslint, but when I ...
0
votes
0
answers
14
views
How to change indent size to 4 in Nx workspace for all files including config files at root level?
I created workspace using Nx, i managed to changed indent size to 4 using generated .editorconfig file.
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
...
0
votes
0
answers
9
views
Format object property array on single line while having array new line
I would like to enforce ruling on object property arrays like this:
{ foo: [ "foo", "foo" ] }
While still having the array outside objects like this:
[
"foo",
&...
0
votes
1
answer
24
views
Sometimes the "printWidth" option in "prettier" is applied, but sometimes it is not
How to reproduce the phenomenon
Install "Prettier - Code formatter" extention in Vscode
write file .prettierrc
{
"tabWidth": 2,
"singleQuote": true,
"...
0
votes
0
answers
155
views
How to fix eslint - node version compatibilty issue?
I am trying to configure eslint & prettier in my node project
When i run npm i i am getting version compatibility warning for eslint.How can i fix this ? I tried to specify node version within ...
0
votes
1
answer
24
views
NX Build Fails After Upgrading Prettier and using in an app a Webpack-Obfuscator Plugin
I'm working on an Angular project using Nx and have set up a custom Webpack plugin that includes webpack-obfuscator for code obfuscation. Everything was working fine until I upgraded the prettier ...
0
votes
0
answers
24
views
Prettier VSCode ignore meta commands in .sql files
I'm new to SQL, and trying to use SQL Formatter VSCode, successor of Prettier SQL VSCode to format my .sql files with prettier in VSCode, with psql to run my files. It manages to format the files ...
1
vote
2
answers
41
views
Prevent vscode prettier wrap jsx attributes which has template literals in it
I found that prettier will wrap my jsx attributes which has more than one template literal to new line.
For examples in my jsx file:
// before formatted and expected result
<DemoFrame html={`${...
2
votes
1
answer
47
views
prettier change multi line into single line despite not crossing print width
VS Code 1.92.1
Ubuntu 24.04
Astro based project
Prettier extension installed and set formatter for code-snippets extension as below
.prettierrc file content
printWidth: 140,
semi: true,
...
0
votes
0
answers
26
views
How to remove trailing spaces in all files except Markdown?
I use Prettier to format my code. By default Prettier removes/trims trailing whitespaces. This is a good thing but an inconvenience in Markdown files. I use trailing whitespaces in Markdown for ...