Comments (6)
Thanks for reporting. Can you give an example of code that causes this issue?
from eslint-plugin-prettier.
Here is the relevant file:
module.exports = {
rules: {
'accessor-pairs': 2,
'array-callback-return': 2,
'babel/no-invalid-this': 2,
'block-scoped-var': 2,
'class-methods-use-this': 0,
"complexity": 0,
'consistent-return': 0,
"curly": 2,
'default-case': 2,
'dot-location': [2, 'property'],
'dot-notation': 2,
"eqeqeq": 2,
'guard-for-in': 2,
'no-alert': 2,
'no-caller': 2,
'no-case-declarations': 0,
'no-div-regex': 2,
'no-else-return': 2,
'no-empty-function': 2,
'no-empty-pattern': 2,
'no-eq-null': 2,
'no-eval': 2,
'no-extend-native': [2, {exceptions: ['String']}],
'no-extra-bind': 2,
'no-extra-label': 2,
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-global-assign': 2,
'no-implicit-coercion': 2,
'no-implicit-globals': 2,
'no-implied-eval': 2,
'no-iterator': 2,
'no-labels': 2,
'no-lone-blocks': 2,
'no-loop-func': 2,
'no-magic-numbers': 0,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-new': 2,
'no-new-func': 2,
'no-new-wrappers': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-param-reassign': 0,
'no-proto': 2,
'no-redeclare': 2,
'no-return-assign': 0,
'no-script-url': 2,
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-throw-literal': 2,
'no-unmodified-loop-condition': 2,
'no-unused-expressions': 2,
'no-unused-labels': 2,
'no-useless-call': 2,
'no-useless-concat': 2,
'no-useless-escape': 2,
'no-void': 2,
'no-warning-comments': 2,
'no-with': 2,
'prefer-promise-reject-errors': [2, {allowEmptyReject: true}],
"radix": 2,
'vars-on-top': 2,
'wrap-iife': 2,
"yoda": 2,
},
};
from eslint-plugin-prettier.
Are you running any other eslint rules on that file?
from eslint-plugin-prettier.
I am but none that would replace anything with double quotes, is it possible a conflict, even between both rules trying to do the same thing, might accomplish the opposite? I know Prettier doesn't just replace everything with single quotes so
from eslint-plugin-prettier.
I don't remember exactly how ESLint's conflict resolution prioritizes fixes, but in general there is no guarantee that a given fix will be applied if it conflicts with another fix. So my guess is that one of the other rules you have enabled is indirectly causing this issue.
This plugin works best if you disable all other formatting-related ESLint rules -- you can use eslint-config-prettier
to do that.
from eslint-plugin-prettier.
Will give this a shot, reopen if it still happens but I'm guessing that's most likely it, thanks!
from eslint-plugin-prettier.
Related Issues (20)
- Issue parsing `.svelte` files when using Flat Config HOT 1
- Support ESLint flat config HOT 3
- Linting fails importing prettier config. HOT 2
- Invalid suggestion (no changes)
- Support for new experimental ternaries formatting on prettier 3.1.0 HOT 1
- Is this tool still needed?
- New prettier break plugin rules? HOT 2
- Allow only formatting code snippets in markdown, not the markdown file itself HOT 14
- Not working with PUG template HOT 5
- Synckit seems incompatible with Node 14.18.1 HOT 2
- use es6's import syntax to import eslint-plugin-prettier/recommended
- [feat] fallback `ignorePath` to `.eslintignore` if `.prettierignore` not found HOT 3
- Setting "trailingComma" to "all" does not work HOT 4
- Importing `eslint-plugin-prettier/recommended` in ESM syntax results in a lint error. HOT 1
- case study: `eslint-plugin-prettier-vue`
- Removal of eslint-config-prettier from peerDependencies HOT 1
- Prettier enforces adding unnecessary parentheses HOT 1
- Linebreak error when using with `nest new` project HOT 13
- Unable to Deploy App Due to ESLint/Prettier Errors HOT 1
- eslint-plugin-prettier version `3.1.1` and newest prettier version `3.2.5` mismatch causing issues 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-plugin-prettier.