ikappas / vscode-phpcs

PHP CodeSniffer for Visual Studio Code
MIT License
128 stars 56 forks source link

Is it simple to add js and css as languages checked with phpcs. #17

Closed LiamKarlMitchell closed 7 years ago

LiamKarlMitchell commented 8 years ago

How would one do this?

ikappas commented 7 years ago

@LiamKarlMitchell This is not available at this time.

bwaindwain commented 4 years ago

To do this, modify out/src/extension.js and change

documentSelector: ["php"],

to

documentSelector: ["php", "css", "javascript"],

also, modify package.json and change

"activationEvents": [
    "onLanguage:php"
],

to

"activationEvents": [
    "onLanguage:php", "onLanguage:css", "onLanguage:javascript"
],

also, see #159 about --extensions command line argument. You'll need to add ,css,js to the list.

I should do a pull request someday...

EDITED Sept-2020 to add some things I missed, maybe to keep up with VSCode's changes (?).