{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/2099","repository_url":"https://api.github.com/repos/palantir/tslint","labels_url":"https://api.github.com/repos/palantir/tslint/issues/2099/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/2099/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/2099/events","html_url":"https://github.com/palantir/tslint/issues/2099","id":202374984,"number":2099,"title":"Support linting vue/html file","user":{"login":"nrip-monotype","id":22932714,"avatar_url":"https://avatars3.githubusercontent.com/u/22932714?v=4","gravatar_id":"","url":"https://api.github.com/users/nrip-monotype","html_url":"https://github.com/nrip-monotype","followers_url":"https://api.github.com/users/nrip-monotype/followers","following_url":"https://api.github.com/users/nrip-monotype/following{/other_user}","gists_url":"https://api.github.com/users/nrip-monotype/gists{/gist_id}","starred_url":"https://api.github.com/users/nrip-monotype/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrip-monotype/subscriptions","organizations_url":"https://api.github.com/users/nrip-monotype/orgs","repos_url":"https://api.github.com/users/nrip-monotype/repos","events_url":"https://api.github.com/users/nrip-monotype/events{/privacy}","received_events_url":"https://api.github.com/users/nrip-monotype/received_events","type":"User","site_admin":false},"labels":[{"id":243410757,"url":"https://api.github.com/repos/palantir/tslint/labels/P2","name":"P2","color":"bbbbbb","default":false},{"id":234815875,"url":"https://api.github.com/repos/palantir/tslint/labels/Status:%20Accepting%20PRs","name":"Status: Accepting PRs","color":"0052cc","default":false},{"id":194790477,"url":"https://api.github.com/repos/palantir/tslint/labels/Type:%20Feature%20Request","name":"Type: Feature Request","color":"FFac4e","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2017-01-22T10:35:21Z","updated_at":"2018-02-25T21:35:25Z","closed_at":null,"author_association":"NONE","body":"### Feature Request\r\n\r\n- __TSLint version__: `4.3.1`\r\n- __TypeScript version__: `2.1.5`\r\n- __Running TSLint via__: Node.js API\r\n\r\n#### TypeScript code being linted\r\n\r\n```html\r\n<template>\r\n  <q-layout>\r\n    <div slot=\"header\" class=\"toolbar\">\r\n      <q-toolbar-title :padding=\"0\">\r\n        Quasar Framework v{{quasarVersion}}\r\n      </q-toolbar-title>\r\n    </div>\r\n\r\n    <!--\r\n      Replace following \"div\" with\r\n      \"<router-view class=\"layout-view\">\" component\r\n      if using subRoutes\r\n    -->\r\n    <div class=\"layout-view\">\r\n      <div class=\"logo-container non-selectable no-pointer-events\">\r\n        <div class=\"logo\" :style=\"position\">\r\n          <img src=\"~assets/quasar-logo.png\">\r\n          <p class=\"caption text-center\">\r\n            <span class=\"desktop-only\">Move your mouse!!!.</span>\r\n            <span class=\"touch-only\">Touch screen and move.</span>\r\n          </p>\r\n        </div>\r\n      </div>\r\n    </div>\r\n  </q-layout>\r\n</template>\r\n\r\n<script lang=\"ts\">\r\n  import * as Quasar from 'quasar';\r\n  import { Utils } from 'quasar';\r\n  import * as Vue from 'vue';\r\n  import Component from 'vue-class-component';\r\n\r\n  const moveForce = 30;\r\n  const rotateForce = 40;\r\n\r\n  @Component({\r\n  })\r\n  export default class Index extends Vue {\r\n    rotateX: number;\r\n    rotateY: number;\r\n    moveY: number;\r\n    moveX: number;\r\n    quasarVersion: string;\r\n   ...  \r\n }\r\n</script>\r\n\r\n<style lang=\"stylus\">\r\n....\r\n</style>\r\n```\r\n\r\nwith `tslint.json` configuration:\r\n\r\n```json\r\n{\r\n  \"rules\": {\r\n    \"class-name\": true,\r\n    \"curly\": true,\r\n    \"eofline\": false,\r\n    \"expr\" : true,\r\n    \"forin\": true,\r\n    \"indent\": [true, \"spaces\"],\r\n    \"label-position\": true,\r\n    \"label-undefined\": true,\r\n    \"max-line-length\": [true, 140],\r\n    \"no-arg\": true,\r\n    \"no-bitwise\": true,\r\n    \"no-console\": [true,\r\n      \"debug\",\r\n      \"info\",\r\n      \"time\",\r\n      \"timeEnd\",\r\n      \"trace\"\r\n    ],\r\n    \"no-construct\": true,\r\n    \"no-debugger\": true,\r\n    \"no-duplicate-key\": true,\r\n    \"no-duplicate-variable\": true,\r\n    \"no-empty\": true,\r\n    \"no-eval\": true,\r\n    \"no-string-literal\": false,\r\n    \"no-switch-case-fall-through\": true,\r\n    \"no-trailing-comma\": true,\r\n    \"no-trailing-whitespace\": true,\r\n    \"no-unused-expression\": false,\r\n    \"no-unused-variable\": true,\r\n    \"no-unreachable\": true,\r\n    \"no-use-before-declare\": true,\r\n    \"one-line\": [true,\r\n      \"check-open-brace\",\r\n      \"check-catch\",\r\n      \"check-else\",\r\n      \"check-whitespace\"\r\n    ],\r\n    \"quotemark\": [true, \"single\"],\r\n    \"radix\": false,\r\n    \"semicolon\": [false],\r\n    \"triple-equals\": [true, \"allow-null-check\"],\r\n    \"variable-name\": false,\r\n    \"whitespace\": [true,\r\n      \"check-branch\",\r\n      \"check-decl\",\r\n      \"check-operator\",\r\n      \"check-separator\",\r\n      \"check-type\"\r\n    ]\r\n  }\r\n}\r\n```\r\n\r\n#### Actual behavior\r\n\r\nTries to lint the whole file and fails.\r\n\r\n#### Expected behavior\r\n\r\ncheck for code inside script tags only, similar to eslint.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/palantir/tslint/issues/comments/368346858","html_url":"https://github.com/palantir/tslint/issues/2099#issuecomment-368346858","issue_url":"https://api.github.com/repos/palantir/tslint/issues/2099","id":368346858,"user":{"login":"ajafff","id":11968040,"avatar_url":"https://avatars0.githubusercontent.com/u/11968040?v=4","gravatar_id":"","url":"https://api.github.com/users/ajafff","html_url":"https://github.com/ajafff","followers_url":"https://api.github.com/users/ajafff/followers","following_url":"https://api.github.com/users/ajafff/following{/other_user}","gists_url":"https://api.github.com/users/ajafff/gists{/gist_id}","starred_url":"https://api.github.com/users/ajafff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajafff/subscriptions","organizations_url":"https://api.github.com/users/ajafff/orgs","repos_url":"https://api.github.com/users/ajafff/repos","events_url":"https://api.github.com/users/ajafff/events{/privacy}","received_events_url":"https://api.github.com/users/ajafff/received_events","type":"User","site_admin":false},"created_at":"2018-02-25T21:35:25Z","updated_at":"2018-02-25T21:35:25Z","author_association":"COLLABORATOR","body":"I'm back with even greater news for everyone on this thread:\r\n\r\nThe latest version of [wotan](https://github.com/fimbullinter/wotan) can execute TSLint rules according to your `tslint.json` and adds support for processors. That means you don't have to change your config and can start linting your Vue files now:\r\n\r\n1. Install\r\n    ```sh\r\n    yarn add -D @fimbul/wotan @fimbul/ve @fimbul/valtyr\r\n    # or\r\n    npm install --save-dev @fimbul/wotan @fimbul/ve @fimbul/valtyr\r\n    ```\r\n2. Configure\r\n    Add a new file `.fimbullinter.yaml` in the root directory of your project and add the following content:\r\n    ```yaml\r\n    modules: \"@fimbul/valtyr\"\r\n    valtyr:\r\n      overrides:\r\n        - files: \"*.vue\"\r\n          processor: \"@fimbul/ve\"\r\n    ```\r\n3. Run\r\n    See examples below and adapt for your own use. Read the docs for more information about available CLI arguments.\r\n    ```sh\r\n    wotan # finds tsconfig.json and lints the whole project with type information according to your tslint.json\r\n    wotan 'src/**/*.vue' -f verbose # lint all Vue files, use TSLint's verbose formatter\r\n    wotan -p tsconfig.json -c tslint.json --fix # lint the whole project with tslint.json and fix failures\r\n    ```\r\n4. Further Reading\r\n    Wotan - CLI and configuration: https://github.com/fimbullinter/wotan/tree/master/packages/wotan#readme\r\n    Valtýr - plugin for TSLint rules and formatters - \"the TSLint runtime that's better than TSLint\": https://github.com/fimbullinter/wotan/tree/master/packages/valtyr#readme\r\n    Vé - processor for Vue single file components: https://github.com/fimbullinter/wotan/tree/master/packages/ve#readme\r\n    Fimbullinter - why you should start using this project now: https://github.com/fimbullinter/wotan#readme\r\n5. Like, Share and Subscribe :star: "}}
{"actor":{"display_login":"ajafff"}}