Comments (8)
Things to confirm:
- Are there only
tslint-plugin-prettier
issues reported?- it might be suppressed by other rules if they report on the same place
Can you run prettier CLI directly to see if it's a prettier unstable problem?- Can you share the code snippet here so I can copy-paste to reproduce the issue?
from tslint-plugin-prettier.
Can you run prettier CLI directly to see if it's a prettier unstable problem?
Running prettier directly works fine: https://www.dropbox.com/s/kfv7694qfksrzaj/prettier.mov?dl=0
Can you share the code snippet here so I can copy-paste to reproduce the issue?
tslint.json
:
{
"defaultSeverity": "error",
"extends": ["tslint-config-prettier"],
"jsRules": {},
"rulesDirectory": [
"tslint-plugin-prettier"
],
"rules": {
"no-var-requires": false,
"interface-name": false,
"no-console": false,
"curly": false,
"object-literal-sort-keys": false,
"prettier": {
"severity": "warning"
}
}
}
.prettierrc
{
"semi": false,
"singleQuote": true
}
Code snippet:
function bar () {
console.log("bar");
console.log("bar");
}
class Hello {
constructor () {
}
someMethod () {
}
}
This is what happens, step for step:
function foo () {
console.log("bar");
console.log("bar" );
^ cursor is here
}
After first auto fix:
function foo () {
console.log("bar");
console.log("bar" );
^ cursor is here
}
After second auto fix:
function bar() {
console.log('bar')
console.log('bar')
}
class Hello {
constructor() {}
someMethod() {}
}
function foo() {
console.log('bar')
console.log('bar')
}
from tslint-plugin-prettier.
Sorry, I cannot reproduce the issue.
from tslint-plugin-prettier.
That's so weird, I disabled all plugins except for TSLint and created a new workspace with just the config and code from above and I'm still having the issue :/.
This is my package.json by the way:
{
"devDependencies": {
"prettier": "^1.7.4",
"tslint": "^5.7.0",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.5.3"
}
}
Maybe we're using different versions of TSLint or Prettier?
from tslint-plugin-prettier.
Looks like the same, weird.
{
"dependencies": {
"prettier": "^1.7.4",
"tslint": "^5.7.0",
"tslint-config-prettier": "^1.5.0",
"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.5.3"
}
}
VSCode 1.16.1
TSLint extension: eg2.tslint v1.0.9
from tslint-plugin-prettier.
Yep, same plugin and VSCode version. And I don't have any formatting settings in my personal preferences. I'll check if coworkers are having the same issue.
from tslint-plugin-prettier.
I know this doesn't help much- but I've seen the same issue.
from tslint-plugin-prettier.
Closing this issue for housekeeping purposes but feel free to open a new issue or comment here if you found how to reproduce.
from tslint-plugin-prettier.
Related Issues (15)
- Difference to existing project? HOT 7
- Not report the error when prettier fails. HOT 2
- Not support .editorconfig file
- Use prettier-linter-helpers HOT 1
- Prettier Parsing Error While Typing
- Update Dependencies (Renovate Bot)
- Try to resolve config path relative to tslint.json if config file not found. HOT 2
- Respect prettierignore HOT 1
- Is it possible to run prettier on save? HOT 3
- when using space-before-function-paren , getting conflicted rules HOT 3
- "tslint.configFile" absolute file path required with VSCode HOT 3
- support prettier v2
- readme.md seems wrong about configuration HOT 4
- Resolve configuration using current directory HOT 6
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 tslint-plugin-prettier.