Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md to feature a tasks 2.0.0 example #407

Closed
wants to merge 1 commit into from

Conversation

jackrl
Copy link

@jackrl jackrl commented Feb 20, 2018

No description provided.

@msftclas
Copy link

msftclas commented Feb 20, 2018

CLA assistant check
All CLA requirements met.

@dbaeumer
Copy link
Member

@jackrl thanks for the PR. A better 2.0.0 task definition would be to have a named task and not use a single global task. That allows giving it a nice name. Something like

		{
			"label": "ESLint",
			"type": "shell",
			"windows": {
				"command": ".\\node_modules\\.bin\\eslint *.js"
			},
			"linux": {
				"command": "./node_modules/.bin/eslint *.js"
			},
			"osx": {
				"command": "./node_modules/.bin/eslint *.js"
			},
			"presentation": {
				"reveal": "silent",
			},
			"problemMatcher": "$eslint-stylish"
		}

Even better would be if the ESLint extension would be a task provider and provides this task out of the box without the need of having an entry in the tasks.json file. You could use this as an example on how to do this is you are interested: https://github.com/Microsoft/vscode-extension-samples/blob/master/task-provider-sample\src\extension.ts#L14

@dbaeumer
Copy link
Member

Would you be willing on working on such a task provider.

@jackrl
Copy link
Author

jackrl commented Feb 21, 2018

@dbaeumer I created something that should work: https://github.com/jackrl/vscode-eslint/tree/workspace-lint-task

I added a new configuration, 'eslint.enableLintTask', with a false default so that the people who don't need or want it are not affected.

It is a shame that you can't open the 'problems' tab after the task is done, or at least I wasn't able to find how it would be done.

Let me know if you want a separate PR for it. I suppose that if this is added there is no need for the task example in the README.md anymore.

@dbaeumer
Copy link
Member

There is a issue in VS Code to allow tasks to open the problems pane when errors are detected. So no need to file a new one.

@dbaeumer
Copy link
Member

@jackrl can you create a PR for the work in https://github.com/jackrl/vscode-eslint/tree/workspace-lint-task

@jackrl
Copy link
Author

jackrl commented Feb 22, 2018

Done #410

@dbaeumer
Copy link
Member

I will close this PR then. I removed the tasks.json from the README.

@dbaeumer dbaeumer closed this Feb 23, 2018
@jackrl jackrl deleted the patch-1 branch February 23, 2018 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants